iframe question

liunx

Guest
Ive got a menu set up using an iframe but all the links are opened in a new window. Is this normal, and is their some tag i can use to open an entirely new html but still in the same window?<br />
<br />
thanks<!--content-->Fill me in please.<br />
You have a page that has an iframe in it.<br />
Where are the links?Are they on the main page?.If so where you want to open the new page.<br />
in the Iframe?<br />
<br />
Khalid<!--content--><table align="left"><br />
<tr><td><br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"http://yahoo.com/" target="mainframe">Yahoo.com</a><br><br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"http://msn.com/" target="mainframe">MSN.com</a><br><br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"http://htmlgoodies.com/" target="mainframe">HTMLGoodies</a><br><br />
</td></tr><br />
</table><br />
<table align="right"><tr><td><br />
<IFRAME width="250" height="400" src=http://www.webdeveloper.com/forum/archive/index.php/"main.html" name="mainframe"><br />
</IFRAME></td></tr></table><!--content-->Sorry, it's kind of the opposite of that. I've got the menu on the left which is an iframe (so it can be updated remotely), and every seperate html file i make has the an iframe with the menu in it. <br />
<br />
When I click a selection on the iframe menu, it opens the html file in a new window... not replace the entire html page with the page you request form the menu (the same way it would if you typed in a new url in the address bar). Makes sense? probably not. I'll try and get my damned proxy to accept my ftp client so i can load it on the web.<!--content-->Believe it or not, I get it. There's only one lengthy and painful way to do that...<br />
<br />
Make the main page (index.html) with the navigation frame (nav.html) in the IFRAME. Now, when you want to update the page, simply reload it all, keeping nav.html inside the frame... get it? Let me put it in another way...<br />
<br />
Say you have index.html, and it has nav.html as the main frame. You click, "about us" on the nav.html IFRAME, and it reloads the IFRAME AND the index.html, but this time, index.html is now about_us.html. So in the index.html source you'd have something like this:<br />
<br />
<table align="left"><br />
<tr><td><br />
Content, content, text, text, whatever....<br><br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"http://msn.com/">MSN.com</a><br><br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"http://htmlgoodies.com/">HTMLGoodies</a><br><br />
</td></tr><br />
</table><br />
<table align="right"><tr><td><br />
<IFRAME width="250" height="400" src=http://www.webdeveloper.com/forum/archive/index.php/"nav.html"><br />
</IFRAME></td></tr></table><br />
<br />
<br />
and in the nav.html have something like<br />
<br />
<br />
<a href=http://www.webdeveloper.com/forum/archive/index.php/"about_us.html">About Us</a><br />
<br />
<br />
Now, in your About Us page, put:<br />
<br />
<br />
<table align="left"><br />
<tr><td><br />
Text for the About Us page, blah blah blah blah blah blah blah!!<br />
</td></tr><br />
</table><br />
<table align="right"><tr><td><br />
<IFRAME width="250" height="400" src=http://www.webdeveloper.com/forum/archive/index.php/"nav.html"><br />
</IFRAME></td></tr></table><br />
<br />
<br />
It will reload the IFRAME each time, but it's the only way... it's the only way I can think of that's client-side...<!--content-->Here's a second, slightly less painful method... target="_top" in the href properties in menu's html. *strikes forehead with palm*. <br />
<br />
it just opens it in the whole new page over the top of the old one. From now on, i'm trying the simple method first. But yours sure was a creative solution. It works too, thanks.<!--content-->Yea--that might work as well. I was just making sure that it would work... the one I suggested will definitelly work..<!--content-->
 
Back
Top