Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transferring Data

Status
Not open for further replies.

simoncpage

Programmer
Apr 4, 2002
256
GB
Hi all, is there anyway to transfer data from one web page to another via vbscript. For instance either:

1. Can I make some "public" type constant that could be stored and retrieved on viewing another page from the page declaring the constants. e.g I have page one that has a number of comboboxes and the results of this is carried over to another page once a button is clicked.

or

2. Open up a popup page in front of the main page and so the results of the popup page can be transferred directly to the main page??

Any help would be great....

Simon


 
Im not actually....I know of the asp way..is there another you know of for html only?
Simon
 
hidden form fields!!
[bomb]
I may not get it the 1st or 2nd time,
but how sweet that 15th time can be.
admin@onpntwebdesigns.com
 
I was think of that so can I have a hidden frame with a separate form holding hidden details which can be picked up my new frames opening???
 
you know I had to do this years ago in school and now I can't remember how I did it. I have this at home and will post it if it has not been answered by then. Sorry couldn't help [bomb]
I may not get it the 1st or 2nd time,
but how sweet that 15th time can be.
admin@onpntwebdesigns.com
 
ok I'm not sure if this is what you want but this was something I played with and it may help you.
There are four pages here. frameset.htm which is the main then frame1 frame2 frame3
what happens is of course you open frameset to test everything
you enter something into the form which is frame2. (can be hidden already with set values)
click submit and it sends the data to frame1 which stores it in var's and after the submit button was submitted it also loaded frame3 into where frame1 was and read the var's from frame1 and printed them to the screen.

that was confusing! [lol]

here try it out

<HTML><HEAD><TITLE>frame set</TITLE>
<FRAMESET cols=&quot;150,*&quot;>
<FRAME src=&quot;frame1.htm&quot; name=&quot;left_side&quot;>
<FRAME src=&quot;frame2.htm&quot; name=&quot;right_side&quot;>
</FRAMESET>
<NOFRAMES>
Use this link to go to a frameless setting if your browser does not support frames.
<a href=&quot;noframes.htm&quot;>Frameless Pages</a>
</NOFRAMES>
</HTML>

<HTML><HEAD><TITLE>Frame1</TITLE>
<SCRIPT language=&quot;javascript&quot;>
{
var thename =&quot;&quot;;
var thecolor =&quot;&quot;;
var thecar =&quot;&quot;;
}
</SCRIPT>
</HEAD>
<body bgcolor=&quot;tan&quot;>
<font face=&quot;Roman&quot;><b><h4>
I store it here!</font>
</body>
</HTML>

<HTML><HEAD><TITLE>Frame2</TITLE>
<SCRIPT language=&quot;javascript&quot;>
function store()
{
top.left_side.thename= document.myform.text1.value;
top.left_side.thecolor= document.myform.text2.value;
top.left_side.thecar= document.myform.text3.value;
self.location=&quot;frame3.htm&quot;;
}
</SCRIPT>
</HEAD>
<body bgcolor=&quot;red&quot;>
<table><tr>
<FORM name=&quot;myform&quot;><font face=&quot;Roman&quot; text color=&quot;white&quot;><b><h5>
Enter your name here:<INPUT type=&quot;text&quot; name=&quot;text1&quot;> </tr><tr>
Enter your favorite color here:<INPUT type=&quot;text&quot; name=&quot;text2&quot;> </tr><tr>
Enter your favorite car here:<INPUT type=&quot;text&quot; name=&quot;text3&quot;> </h5>
<INPUT type=&quot;button&quot; Value=&quot;Enter&quot; onClick=&quot;store()&quot;;>
</FORM>
</tr></table>
</body>
</HTML>

<HTML><HEAD><TITLE>frame3</TITLE>
<SCRIPT language=&quot;javascript&quot;>
function printit(){
var firstofit= &quot;Thanks for remembering your name is, &quot;+top.left_side.thename+&quot; ! &quot;;
var lastofit= &quot;Don't forget your favorite color is &quot;+top.left_side.thecolor+&quot; and your favorite car is a &quot;+top.left_side.thecar+&quot;!&quot;;
document.write(firstofit.fontcolor(&quot;white&quot;));
document.write(lastofit.fontcolor(&quot;white&quot;));
}
</SCRIPT>
<body bgcolor=&quot;red&quot;>
<SCRIPT language=&quot;javascript&quot;>
printit();
</SCRIPT>
</body>
</HTML> [bomb]
I may not get it the 1st or 2nd time,
but how sweet that 15th time can be.
admin@onpntwebdesigns.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top