HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Drop down menu does not open in the frame i want
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Frame
View previous topic :: View next topic  
Author Message
Ron



Joined: 26 Feb 2005
Posts: 8
Location: London

PostPosted: Sat Feb 26, 2005 3:57 am     Drop down menu does not open in the frame i want Reply with quote

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>
Confused

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 Question
degsy



Joined: 23 Feb 2005
Posts: 2440
Location: North East, UK

PostPosted: Sat Feb 26, 2005 7:29 am     Reply with quote

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

PostPosted: Tue Mar 01, 2005 3:41 pm     Reply with quote

i tried the above, but no joy. the menu doesn't do anything now.

hmm...anyone else for a pop?
Question
degsy



Joined: 23 Feb 2005
Posts: 2440
Location: North East, UK

PostPosted: Tue Mar 01, 2005 8:09 pm     Reply with quote

Post your code using parent.frames['home'].location

It should be
Code:

onChange="parent.frames['home'].location=this.options[this.selectedIndex].value"
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Frame All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
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
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial