Forum Moderators: open

Message Too Old, No Replies

form and frame question

         

paul_j

4:41 am on Jun 26, 2002 (gmt 0)



I need the following:
I'v got 2 frames-left and right. What i need is to change right frame when changing option in left frame's form.
You can see what i need at <snip> in shop section.
I suppose it can be done without Perl or php.. maybe using html and javascrit?

Tahnks in advance:-)

[edited by: papabaer at 4:52 am (utc) on June 26, 2002]
[edit reason] edited for terms of service [/edit]

papabaer

5:00 am on Jun 26, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello paul_j and Welcome to Webmaster World!

Please review our terms of service regarding posts and urls.

Could you post a code snippet? And a bit more explanation?

Purple Martin

5:19 am on Jun 26, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi paul_j. Obviously I can't see you shop section example (personal URLs are not allowed here, hence the snipping), but I'm assuming that you want to load a new document in the right frame when something happens in the left frame.

JavaScript will do it for you, for example you'd use this script in the left frame for IE. You'll need to sniff for browser and change the code appropriately for others. I've used "rightFrame" for the id of the right frame in the frameset, change it to whatever you've used.

top.document.all.rightFrame.src = "newFile.htm"

rewboss

8:02 am on Jun 26, 2002 (gmt 0)

10+ Year Member



A simpler (and cross-browser compatible) approach would be:

parent.right.location='...';

(That assumes that the <frame> tag for the right-hand frame includes name="right".)

The pitfall of this approach is that it won't work at all if JavaScript is disabled. You will need to arrange some way of making the site usable without JavaScript.