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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to pass information to child frame

Status
Not open for further replies.

bsharm1

MIS
Mar 24, 2003
5
US
I am new to HTML/JS/CGI. I would like to pass information to a child frame along the line of the 'hidden' field. How can I do this? FRAMESET does not appear to support hidden fields. Any ideas?
 
It all depends on where the information is coming from. Are you talking about passing information from one frame to another in the same frameset? Or passing information from the previous page to a frame?
 
Thanks for responding. I should have been more specific. I would like to pass information from a previous page (a userid/pw). Encrypt this information (perl). Then create two frames (FRAMESET) and pass this encrypted information to one of the child frames.
 
Well, Perl is entirely not my scene, but If you can get the information into the URL a la:
Code:
[URL unfurl="true"]http://yourserver/yourdirectory/yourframeset.html?username=Joe&pwd=blahblah[/URL]

Then you can use a javascript function within the frameset page to strip the information out of the URL and pass it to the child frame.

The other way, which might be better (hide the username and password from prying eyes that might see the url)would be to use javascript to write a cookie on the first page then use javascript again to read the cookie in the child frame document.

So barring any sort of database back end, those are the only two ways of passing information from one page to the next.
 
You wrote:

"FRAMESET does not appear to support hidden fields. Any ideas?".

You can pass query strings or hidden fields between frames. The only reason that you don't appear to see them is because the "address window" reflects the url of the frameset not each frame.

Clive
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top