View Full Version : window.location.search problem in frameset!

05-10-2004, 03:53 PM
Hello there!
I've got a problem with location.search string in my webpage, if someone can help me I really appreciatte:

I got a webpage index.htm wich include a frameset:

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<frameset cols="550,107" frameborder="yes" border="0" framespacing="0">
<frame name="fmain" src="ind-main.htm?parameters">
<frame name="fright" src="ind-thumb.htm">
<body bgcolor="#FFCC99" text="#000000">

when the frame FMAIN is loaded the thing works perfectly if I write the parameters "?parameters" between quotes but I need to change the "parameters" every time I access my site, using window.location.search,
the idea is call index.htm with the parameters:


and then locate the "parameters" into src of FMAIN frame, I tried everything:

<frame name="fmain" src="ind-main.htm"+location.search>
<frame name="fmain" src="javascript:'ind-main.htm'+location.search'">
<frame name="fmain" src="ind-main.htm?"+String_parameters_without?">
<frame name="fmain" src="ind-main.htm?"+{variable}">
<frame name="fmain" src="javascript: functionparam()">

always ind-main.htm receive " empty " in its location.search but if I write the parameters ind-main receive location.search correctly, so someone can helpme to embbeded a string into a frame's SRC attribute .

05-10-2004, 07:47 PM
Ok, when you manually type in the parameters, how does ind-main.htm pickup these parameters?

I know using PHP you would use the $_GET array. I'm not sure what mechanism you're using in ind-main.htm, but you'd probably use a similar mechanism in index.htm and then concatenate to the ind-main.htm line.

Hope that helps,