Go Back  HTML Forums - Free Webmaster Forums and Help Forums > WEBSITE DEVELOPMENT > Client Side Scripting
User Name:
Password:
 

Reply
Thread Tools   Display Modes
  View First Unread
 
Old 09-21-2005, 12:56 AM
  #1
animepixel
Veteran (Level 7)
 
Join Date: Feb 2005
Posts: 65
iTrader: (0)
animepixel is on a distinguished road
Pull down menu targeting an i-frame

Well i have a pull down menue , and i want to target an i-frame . Well her is the code . I have tried the target="iframe" code , but it dosent work . Or maybe could you direct me to a also good pull down menue that can target and i-frame .


<HEAD>

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
function formHandler(form){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
}
// End -->
</SCRIPT>
</HEAD>



<BODY>

<form name="form">
<select name="site" size=1 onChange="javascript:formHandler()">
<option value="">Music
<option value="music.html" target="iframe">Yahoo
<option value="http://www.metacrawler.com">Metacrawler
<option value="http://www.altavista.digital.com">Altavista
<option value="http://www.webcrawler.com">Webcrawler
<option value="http://www.lycos.com">Lycos
<option value="http://javascript.internet.com">JavaScript Source
</select>
</form>
animepixel is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 09-21-2005, 03:18 AM
  #2
maskd
Swordman (Level 9)
 
maskd's Avatar
 
Join Date: Sep 2005
Location: NSW, Australia
Posts: 88
iTrader: (0)
maskd is an unknown quantity at this point
Try this:
Code:
<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
function formHandler(form){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
frames['name-iframe'].location.href = URL;
}
// End -->
</SCRIPT>
and in your iframe, put name="name-iframe" or change it.

Got this from this page: http://www.xs4all.nl/~ppk/js/iframe.html

Haven't tested it so I don't know if it would work, but I'm pretty sure that's how you'd get it to work
maskd is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 09-21-2005, 10:41 PM
  #3
animepixel
Veteran (Level 7)
 
Join Date: Feb 2005
Posts: 65
iTrader: (0)
animepixel is on a distinguished road
Well i have another question , how would i customize the pull down menu . Such ad making bold one name such as MUSIC instead of music . Also thanks for the suggestion it worked .
animepixel is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 09-22-2005, 12:43 AM
  #4
Pegasus
Extremely Flighty Admin
 
Pegasus's Avatar
 
Join Date: Nov 2001
Location: 35º South of Santa Claus
Posts: 21,472
iTrader: (0)
Pegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to allPegasus is a name known to all
<option value=""><b>Music</b>

Would that work?
__________________


Decaf is the root of all evil...
HTMLForums Awards 2008
Pegasus is online now   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 09-22-2005, 12:50 AM
  #5
_Aerospace_Eng_
The CSS Master (somewhat)
 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a galaxy far far away...
Posts: 11,154
iTrader: (0)
_Aerospace_Eng_ has disabled reputation
No only gecko browsers allow you to style the options. Gecko as in Firefox and Netscape.
__________________

76 invites left. PM me for a Gmail invite along with email addy.
Why we won't help you .::. Web Developer's Handbook .::. Why Tables for Layout is Stupid?
_Aerospace_Eng_ is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 09-22-2005, 01:07 AM
  #6
animepixel
Veteran (Level 7)
 
Join Date: Feb 2005
Posts: 65
iTrader: (0)
animepixel is on a distinguished road
Quote:
Originally Posted by Pegasus
<option value=""><b>Music</b>

Would that work?

I tried that , but it wouldnt work . But really , only gecko , Hmm, well thanks anyway .
animepixel is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote

Reply
KEEP TABS
SPONSORS
 
Boxedart
 
 


 
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
  
 
 
 



 
  POSTING RULES
 
 
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Thread Tools
Display Modes

Forum Jump

 

All times are GMT -5. The time now is 07:57 PM.

   

Mascot team created by Drawshop.com

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

Server Monitoring by ENIACmonitor 0.01
HTMLforums.com © Big Resources, Inc. Web Design by BoxedArt.com
vRewrite 1.5 beta SEOed URLs completed by Tech Help Forum and Chalo Na.