Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-07-2003, 07:00 PM   PM User | #1
Bengal313
Regular Coder

 
Bengal313's Avatar
 
Join Date: Jun 2002
Location: Metro Detroit
Posts: 298
Thanks: 8
Thanked 0 Times in 0 Posts
Bengal313 is an unknown quantity at this point
drop down menu with a target

I need a little help friends.

I need to insert a drop down menu with about 30 links. Having a viewing area of about 10 links at a time. Each link should open on the same page within a iframe named "body". Can this be done, if so where can I find it? Thank you.
__________________
"Knowledge Speaks But Wisdom Listens"
Bengal313 is offline   Reply With Quote
Old 04-07-2003, 07:23 PM   PM User | #2
beetle
Senior Coder

 
Join Date: Aug 2002
Posts: 3,467
Thanks: 0
Thanked 0 Times in 0 Posts
beetle has a little shameless behaviour in the past
You can't (to my knowledge) control the number of items displayed when the menu drops-down.

Everything else, is doable.
Code:
<html>
<head>
<title>Test</title>

<script type="text/javascript">

function jumpMenu( sel )
{
    var val = sel.options[sel.selectedIndex].value;
    if ( val != "" )
    {
        top.frames['body'].location.href = val;
    }
}

</script>


</script>

</head>
<body>
<select onchange="jumpMenu( this )">
    <option value="">Choose one</option>
    <option value="http://www.google.com">Google</option>
    <option value="http://www.yahoo.com">Yahoo</option>
    <option value="http://www.lycos.com">Lycos</option>
</select>
<iframe name="body" width"=500" height"300"></iframe>
</body>
</html>
__________________
My Site | fValidate | My Brainbench | MSDN | Gecko | xBrowser DOM | PHP | Ars | PVP
“Minds are like parachutes. They don't work unless they are open”
“Maturity is simply knowing when to not be immature”
beetle is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:02 PM.


Advertisement
Log in to turn off these ads.