Jump to content
xisto Community
Sign in to follow this  
kvarnerexpress

Frames And Links

Recommended Posts

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

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

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.