Click to See Complete Forum and Search --> : frameset


plucker
01-11-2004, 06:37 PM
Hey all!

How do you capture a var in a URL and set it as a frame src?

Thanks

pyro
01-11-2004, 07:26 PM
To get the URL: window.location.href

To set a frames location to the URL: top.framename.location.href = "someurl.htm";

plucker
01-11-2004, 08:13 PM
I'm not sure if you understood me. I want to set a framesrc in a frameset according to what the var in the URL is

eg. if var=products
then framesrc=products.htm

but
if var=somthing_else
then framesrc=some_other_page.htm

or somethin like that


cheers

pyro
01-11-2004, 08:16 PM
Ah, I see. You will want to parse the query string then. Jeff Mott has written a nice function (or, set of functions) to do this: http://forums.webdeveloper.com/showthread.php?s=&threadid=10893#post58250