Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Drop down boxes, controlling direction
Old 08-27-2006, 01:44 PM Drop down boxes, controlling direction
Junior Talker

Posts: 1
Name: Kev
Trades: 0
Hi All,

This is probably a silly question with a straighforward answer but I am having a problem with this and wonder if someone would be kind enough to point me in the right direction.

I am using a simple drop down box in Dreamweaver that navigates to the destination page when you click a link in the drop box, the problem I am having is that when I have more than 18 items in the list the drop down box opens upwards toward the top of the page instead of dropping down as I want it to. Is there any way to control this so that it always drops down, I dont mind a scroll bar appearing in it when it drops to the bottom of the page as this is what happens anyway when it opens upward.

The script I'm using is as follows:

In the head section:

<script language="JavaScript" type="text/javascript">
<!--
var myChoice, mySelection;

function CK_MenuItemRedirectPage(){
myChoice = document.myForm.myMenu.selectedIndex;
mySelection=document.myForm.myMenu.options[myChoice].value;
location=mySelection;
}
</script>

And in the body:

<form method="post" action="" name="myForm">
<p>
<select name="myMenu" onchange="CK_MenuItemRedirectPage()">

<option value="#" selected="selected">Choose your event</option>


<option value=">
<option value="> etc etc etc.

</select>


Any help appreciated..

Cheers

Kev
kevdsn is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-27-2006, 02:54 PM Re: Drop down boxes, controlling direction
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
select inputs are controlled by the client OS NOT HTML. The proximity to the bottom edge of the clients screen will determine which way the list will be generated, not where the element is within the browser viewport.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Drop down boxes, controlling direction
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.24316 seconds with 12 queries