Hi there,

I'm using javascript (frames.js) in PHP to load frames into my website.
When I use a query to retrieve information with $_GET out of the db (e.g. mydomain.com/article.php?cat=news), the result of $_GET puts a '?' question mark behind the result (e.g. news?)

I know this is because of the frames.js. But I don't know how I can solve it.
Below you'll find the script and it comes with '<frame src="'+ window.location +'?". Notice the question mark behind window.location. This makes the result of the query comes with a '?'.

The problem is that when I remove the question mark the frames will not load. My knowledge about JS is really minimum, so I'm wondering if anybody here can tell me what to do and what will be the right code.

Thanks in advance.

if(parent.frames.length == 0){
document.write('<frameset cols="*,900,*" border="0" frameborder="0">'
+ '<frame src="left.php" name="left" target="_self" scrolling="no" />'
+ '<frameset rows="136,*" />'
+ '<frame src="top.php" name="top" scrolling="no" noresize target="_self" />'
+ '<frameset cols="160,740" />'
+ '<frame src="links.php" name="links" target="middle" scrolling="no" noresize />'
+ '<frame src="'+ window.location +'?" name="middle" target="_self" scrolling="auto" />'
+ '</frameset> />'
+ '</frameset> />'
+ '<frame src="right.php" name="right" scrolling="no" />'
+ '<noframes>');
}