Jump to content
xisto Community
Sign in to follow this  
iGuest

An URL that links 2 pages...

Recommended Posts

Hi!I'm doing my website and I have a little problem, I use 2 Frames on my website one for the menu and another one for content of the site and all that stuff... What i want is... maybe simple:When u enter my website u have a menu on rightLink 1Link 2Link 3Now what I want is when u click on Link one, it will show the new page in the Menu iframe and it will show too, a new page in the Content iframe...It's simple no? I want that Link1 shows 2 page in same time, one in Menu iframe and another one in content iframe... :roll:

Share this post


Link to post
Share on other sites

Hi cloud03,
I could solve your problem using javascript like god said. You just need to put a little javascript inside you targeted page. For example, if you have a link to a main.htm page in your menu and you like that the main page calls a menu_main.htm in your menu. You need to use the following code inside the main page:

<html><head><title>Main page</title></head><body><script language="JavaScript">window.open("menu_main.htm",'leftFrame');</script>Main content ...</body></html>
This little script just open you menu_main.htm in the leftFrame.
I hope you can solve your problem now.
See you around.

Share this post


Link to post
Share on other sites

Ok! I'm gonna try it right now! Hope it will workEdit: Nope it didn't work...First I tried ur code and it opened a popup at the page load.. after I tried to change the code for this<script language="JavaScript" type="text/JavaScript"><!-- Beginfunction popUp2(URL) {day = new Date();id = day.getTime();window.open("ff8_menu.html",'iframe2', "ff8_intro.html",'iframe');// End --></script>id didn't work... (my pages are... ff8 menu and ff8 intro... the menu goes in frame2 and the intro in frame...) :cry:

Share this post


Link to post
Share on other sites

Yeah, that's not the correct JS code for it. Here:

<script type="text/javascript">function gotopages(url1,url2){parent.iframe2.location.href=url1;parent.iframe.location.href=url2;}</script>

Put that into your head section. Then put this for your links:
<a href="javascript:gotopages('page1.html','page2.html');">

Change page1.html to the page you want to load in the iframe2 frame, and page2.html to the page you want to load in the iframe frame.

Share this post


Link to post
Share on other sites

The code that didn't work was not considering IFRAME. I'm sorry, I just missed the IFRAME part. But, I tried with simple frames and that worked.I'm happy that you solved your problem.See you around

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.