kvarnerexpress 0 Report post Posted December 23, 2004 I don't often use frames and I am having a problem linking from page to page. I am using php. I have a link with goes:<a href="results.php?results1" target="result1">result 1<a>In results.php I create my frames and use 'if' queries to select a frameset depending on the variable passed in the link, so it goes:if ($_GET['result1']) {<frame src=results.php name=results1 id=results1>else...and so on. My problem is this - when I use target="result1", a new window opens and loads the page the way I want it, but I don't want a new window to open. If i put target="_self", then the page loads in the same window, but the page 'results.php' appears in the frame, so the page basically repeats on itself. I tried declaring target="_self" and target="result1" in the same <a> tag but it either does one or he other - the last one declared in the tag. Is there a way around this? I hope I have been clear enough. Share this post Link to post Share on other sites
splehati 0 Report post Posted December 28, 2004 Hmm... you are clear enogh but, i think the problem is in dynamic creating framset, because when you click on link <a href=.... target="result1"> you reffered to frame named "result1" that in that moment don't exist, why, because in your php function after that you are creating frameset... to solve problem post the code, because with this 3 line of code i don't get idea what you wanna do exacly... I don't often use frames and I am having a problem linking from page to page. I am using php. I have a link with goes: <a href="results.php?results1" target="result1">result 1<a> In results.php I create my frames and use 'if' queries to select a frameset depending on the variable passed in the link, so it goes: if ($_GET['result1']) { <frame src=results.php name=results1 id=results1> else ...and so on. My problem is this - when I use target="result1", a new window opens and loads the page the way I want it, but I don't want a new window to open. If i put target="_self", then the page loads in the same window, but the page 'results.php' appears in the frame, so the page basically repeats on itself. I tried declaring target="_self" and target="result1" in the same <a> tag but it either does one or he other - the last one declared in the tag. Is there a way around this? I hope I have been clear enough. <{POST_SNAPBACK}> Share this post Link to post Share on other sites
nancmu 0 Report post Posted December 30, 2004 You can not send variable on <a href="results.php?results1" target="result1">result 1<a> go to frame. i used to use but it didn't work. I think, it will be easy to use iframe if you want to send variable.OR.. try to use frame without php code if it work you might change later.for example// main.html<a href=results.php target=result1>// frame.html<frameset.......><frame src=results.php name=results1 id=results1></frameset> Share this post Link to post Share on other sites
SENV 0 Report post Posted January 7, 2005 I think you have a small typo. <a href=results.php target=result1> <frame src=results.php name=results1 id=results1> You just need to delete the underlined s in frame's name. And a small advice, use " in HTML. When you include it in PHP it will look like this. if ($_GET['result1']) { <frame src=\"results.php\" name=\"results1\" id=\"result1\"> else Greetz! Share this post Link to post Share on other sites