Can anyone help me?? I'm so confused . . . .
This is a strange one, and I feel that I probably already know the answer (but have just forgotten it today), but I've been working at this problem so long today that I've forgotten everything I thought I knew.
Also, this thread may properly belong in an HTML forum, rather than a JavaScript forum: if so, please let me know and I'll copy and paste it over there.
OK, here goes. It's harder than it looks at first, so keep reading until you've seen the WHOLE description . . . .
I've got a form I'm building, and the browser window needs to display two frames. All the "unchanging" stuff will stay in Frame A, and the form (one single HTML page) will stay in Frame B. The user will click on links within Frame A to jump to various sections of the form in Frame B. Because this is a form the user is going to submit, the user's actions MUST NOT cause the contents of Frame B to be refreshed or reloaded -- if this happens, the information already entered by the user will be lost (right?). The HTML page that loads into Frame B MUST NOT be called again when the user clicks on a link in Frame A -- it must instead scroll to the various desired points within the HTML document loading into Frame B.
Perhaps easy enough to do, using <a name="anchor-name"> to anchor the target locations within the document loading into Frame B, and <a href="form.html#anchor-name">Jump to anchor-name</a> for the links in Frame A. Well, here's the twist:
I want the "unchanging" stuff in Frame A to change also. I know how to call a new frameset and load it into _top, and have that frameset call two documents, one for Frame A and one for Frame B . . . . . but doing so reloads the form page into Frame B, defeating the whole purpose.
The links in Frame A are graphics, with the different states handled by a simple JavaScript rollover function. Actually, they're all one graphic, with separate areas defined the usual way in an image map, and the areas change state using onmouseover and onmouseout within the <area> tags. I could even add an onclick to try to "set" the new appearance of the button, I suppose. Maybe.
But the real problem is that, because the overall page is built in two frames, clicking any link in Frame A to update BOTH frames (so I can change the appearance of the image map AND scroll around in the form) apparently means reloading the document in Frame B. This might not matter under ordinary circumstances (but what if it's a huge file??), but I can't lose the information the user has already entered into that form.
I'll be happy to switch to individual images for the buttons, instead of using an image map, if necessary, but (a) I don't see how that will solve the larger problem, and (b) would prefer not to if I don't have to.
If it's necessary to use JavaScript to pass the already-entered values to another page, populating the fields of the form on that new page, I suppose I could try this, but there are reasons why I might not be able to use this approach, even if it's the best way.
Any ideas??
Lost, Confused, and Grateful for Any Help . . . .
John Herring
jhherring@yahoo.com