|
|
|
|
![]() ![]() |
Dec 23 2004, 11:02 PM
Post
#1
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 407 Joined: 13-December 04 Member No.: 2,696 |
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. |
|
|
|
Dec 28 2004, 10:37 AM
Post
#2
|
|
|
Newbie [Level 2] ![]() ![]() Group: Members Posts: 35 Joined: 28-December 04 Member No.: 2,987 |
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... QUOTE(kvarnerexpress @ Dec 24 2004, 01:02 AM) 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. |
|
|
|
Dec 30 2004, 05:23 AM
Post
#3
|
|
|
Advanced Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 136 Joined: 20-October 04 From: Thailand Member No.: 1,840 |
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> |
|
|
|
Jan 7 2005, 02:05 PM
Post
#4
|
|
|
Newbie [Level 2] ![]() ![]() Group: Members Posts: 31 Joined: 6-January 05 Member No.: 3,138 |
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! |
|
|
|
![]() ![]() |
Similar Topics
| Topics | Topics | |
|---|---|---|
|
|
|
|
Lo-Fi Version | Time is now: 8th September 2008 - 09:09 AM |