Click to See Complete Forum and Search --> : Possible to change more than 3 frames at once?


cgildenhuys
02-23-2003, 07:51 AM
I'm using this code to change 3 frames at the same time but would like to add a 4th. 3 works so far but not when I add a fourth. Is this possible or just better to completely reload the frameset and pass the vars in the url. I'm using php and many vars need to be passed in the url and it gets very intricate quickly.
the code:
<SCRIPT LANGUAGE="JavaScript">
function loadFrames(frame1,page1,frame2,page2,frame3,page3) {
eval("parent."+frame1+".location='"+page1+"'");
eval("parent."+frame2+".location='"+page2+"'");
eval("parent."+frame3+".location='"+page3+"'");
}
</script>

any help appreciated.
thanks

Timbuck2
02-23-2003, 08:28 AM
I cant give you a literal because I can't see how you are laid out.
However I normally use I frames and There is a Main Parent.
such as

[main document]
[iframe Classes][iframe Members]
[ ][ ]
[ ][ ]
[Iframe Params ]
[ ]
[Iframe Notes ]
[ ]
[Iframe Source Code ]
[ ]

So for example if in Iframe Classes if that is what is selected then
parent.setClass(selectedClass)
if in Members it contained a class as a member and that were selected then
parent.setClass(selectedClass)
which sets all Iframes

if they selected a function then
parent.setFunction(selectedFunction)
which in parent sets Params , notes, sourceCode

I guess the main point being
there is a function for each type of selection and the function is in the main parent.

Does that help any?

cgildenhuys
02-23-2003, 12:47 PM
thanks for the help.
I'm working with a difficult interface designer and for esthetics need to do something like this, otherwise I would surely not even be using frames. Or rather more than 2 frames.