Usually a frameset file has just the html that defines the frameset. If you were to put other html elements like a form and hidden field in that html, is it possible to refer to the hidden field from a script located in one of the frames the frameset produces?
@DayStar56authorAug 12.2008 — #First of all, thank you so much for your reply.
Because you asked: I am also using perl. My perl script sends the frameset to the client along with a form and hidden field, which contains data from the server.
When I first wrote this post, I could not get the javascript located in the "TopFrame" of my frameset to access the hidden field data. I did, however, get it to work late yesterday.
Before yesterday the <form tag and hidden field html were physically located below the frameset html. Once I moved it to the location you see below, [B][U]I was able to access it through this line of javascript:[/U][/B][B]parent.framesetForm.questionStrg.value; [/B]
[B][U]The part of my perl script that creates the frameset and hidden field:[/U][/B]
Although you got it to work, I must warn you that the <BODY> tag is not vaild HTML in a <FRAMESET>. It will not validate, and may not work in some browsers.
Since a frameset should not contain a <body>, there will also be no document structure. That is probably why it didn't find it to begin with.
@DayStar56authorAug 13.2008 — #Thank you. I see... have you any suggestions?
Please bare with me. What do you mean when you say, "will not validate" ?
[B][U]Further explanation of what I am attempting: [/U][/B]
I am taking a very long string from a hidden field and passing it through the server by way of "post" and then sending it back to the client with the frameset. The string is too big for a client-side cookie (which is what my website would normally use to persist the data.
The page has to be framed (I think, based on my limited knowledge). The top frame has javascript that generates html to the bottom frame based on the data in the string passed through the server.
@gil_davisAug 13.2008 — #What do you mean when you say, "will not validate" ?[/quote]There are free HTML validators that will tell you if your web page is valid W3C compliant HTML. If you want your pages to work reliably (now and in the future), you should follow the recommendations of the W3C. The rules say that <BODY> is not valid syntax if <FRAMESET> is present. You should understand that, being a programmer. That is all I'm saying. Find a valid way to pack your data into the page.
You can write out the string as a var in a script in the head section of the frameset instead of fooling around with a hidden field in a form.
Or, you can put the hidden form in either of the pages that get loaded into the frameset and have a script move the string into the desired field.
If you don't know how to do that, try posting on the perl group for suggestions. I don't know about perl or what is capable of. There may be someone there that knows exactly what you want to do.
@DayStar56authorAug 13.2008 — #As you can tell, I am a work in progress. Still in all, it is nice to be called a programmer. Thanks for playing a part in maturing me. Some day, I hope to have an answer for the next up-in-coming.
Thanks for the advice... well taken... you've helped a lot!