 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
Ron
Joined: 26 Feb 2005 Posts: 8 Location: London
|
Posted: Sat Feb 26, 2005 3:57 am Drop down menu does not open in the frame i want |
|
|
|
Hi, pls can somebody help me? I am working on a website for a university assignment and am really stuck! I have three frames-tittle, links and one called 'main'. Basically....
When a link is clicked on the links frame, it loads up a page in the 'main' frame that contains a drop down menu. Now, the way i had planned was to have the drop down thingy open up more pages inside the 'main' frame. What actually happens is that when one of the drop down box links is clicked, the page opens up by taking up the whole window, instead of nicely opening in the 'main' frame.
Below is the code I am using for the links in the drop down box:
<HTML>
<HEAD>
<TITLE>Bodykits</TITLE>
</HEAD>
<frame>main
<body background="Main.jpg">
<b><body><font face="tahoma" color="#ffffff">
<form name="cngtng">
<div align="center">
<select name="url" size="1" onChange="window.open(this.options[this.selectedIndex].value,'_top')">
<option selected>Aero kits</option>
<option value="Bodykits invader.htm" target="home">Veilside Invader</option>
<option value="Bodykits aggressor.htm" target="home">Veilside Aggressor</option>
<option value="Bodykits c-one.htm" target="home">C-ONE Vent</option>
</select>
</div>
</ form>
<p align="right">
Please make a selection.<BR>
</BODY>
</HTML>
I have already specified 'home' as a name in the frameset page, so not adding '.hthm' can't be a problem.
I'm totally lost because every website I go to either shows what I have already done as the correct way, or they are near enough?!?!?
Pls help....thanx  |
|
degsy

Joined: 23 Feb 2005 Posts: 2440 Location: North East, UK
|
Posted: Sat Feb 26, 2005 7:29 am |
|
|
|
| Quote: |
| onChange="window.open(this.options[this.selectedIndex].value,'_top')"> |
How about changing _top to home?
If that doesn't work then change your code.
Get rid of the Window.Open and use parent.frames['home'].location |
|
Ron
Joined: 26 Feb 2005 Posts: 8 Location: London
|
Posted: Tue Mar 01, 2005 3:41 pm |
|
|
|
i tried the above, but no joy. the menu doesn't do anything now.
hmm...anyone else for a pop?
 |
|
degsy

Joined: 23 Feb 2005 Posts: 2440 Location: North East, UK
|
Posted: Tue Mar 01, 2005 8:09 pm |
|
|
|
Post your code using parent.frames['home'].location
It should be
| Code: |
onChange="parent.frames['home'].location=this.options[this.selectedIndex].value"
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
|
 |
|
|
|
|
|
|