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.

HTML Forum


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



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Drop down select box behaviour
Old 12-06-2007, 08:52 PM Drop down select box behaviour
Novice Talker

Posts: 6
Trades: 0
I have a drop down box and when a letter is pressed on the keyboard it jumps to the first item in the list and highlights it. No probs there. But the highlighted selection appears right at the bottom of the list, i would like it to jump to the top, allowing users to see whats under it eg: sub categories.

Any help would be greatly appreciated.

thanks
Greg
HWD Greg is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-07-2007, 04:25 AM Re: Drop down select box behaviour
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,380
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
It will be the code at line 31.
__________________
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 offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-07-2007, 06:16 AM Re: Drop down select box behaviour
Novice Talker

Posts: 6
Trades: 0
Thats pretty funny.

Anyone able to reply with a serious answer ?

Thanks
Greg
HWD Greg is offline
Reply With Quote
View Public Profile
 
Old 12-07-2007, 06:21 AM Re: Drop down select box behaviour
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 961
Name: Darren
Location: England
Trades: 0
I think what Chris was hinting at is can we see the code please...
__________________
I Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."
rolda hayes is offline
Reply With Quote
View Public Profile
 
Old 12-07-2007, 08:18 AM Re: Drop down select box behaviour
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,380
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
can we see the code please
Exactly
__________________
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 offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-07-2007, 03:52 PM Re: Drop down select box behaviour
Novice Talker

Posts: 6
Trades: 0
Yes, sorry its been a very long week, my sense of humour failed me!

Here is the form code..

I removed many of the options because there were too many ! to post here.

Like my first post said, my goal is for highlighted options(when a ltter is pressed to appear at the top and not the bottom, so users can see whats underneath it eg: sub categories.

PHP Code:
<form name="search" id="search" method="get" action="searchresults.php">





<
table class="tableborder">

    <
tr>

      <
th><strong>Search</strong></th>

    </
tr>
    <
tr>

         <
td class="formstrip">Please enter your search criteria below</td>

    </
tr>

    <
tr>

        <
td>

            <
table width="100%" cellpadding="0" cellspacing="0">

            <
tr>

                <
td valign="top" class="formleft" width="50%">Search Text:</td>

                  <
td valign="top" class="formright" width="50%"><input name="searchtext" type="text" id="searchtext" /></td>

            </
tr>

            <
tr>
                 <
td valign="top" class="formleft">In Category:</td>

                  <
td valign="top" class="formright">

                       <
select name="type" id="type" onChange="displaySec(this);">

                           <
option value=''>Search All</option>

                                         
                <
option style="font-weight: bold;font-size: 12px" value="498">Antiques</option>
                                                                <
option value="499">&nbsp;&nbsp;&raquo;&nbsp;Accessories</option>
                                                                <
option value="500">&nbsp;&nbsp;&raquo;&nbsp;Equipment</option>
                                                 
                <
option style="font-weight: bold;font-size: 12px" value="28">Biotechnology/Biomedical</option>
                                                                <
option value="281">&nbsp;&nbsp;&raquo;&nbsp;Biotechnology Equipment</option>
                                                                <
option value="282">&nbsp;&nbsp;&raquo;&nbsp;Cell Counters</option>
                                                                <
option value="283">&nbsp;&nbsp;&raquo;&nbsp;Densitometers</option>
                                                                                                                
                <
option style="font-weight: bold;font-size: 12px" value="353">Wanted Items</option>
                                
                    </
select>

                </
td>

            </
tr>

            
            
            
            
                        
            <
tr>
                <
td align="left" class="formleft">Condition:</td>
                <
td align="left" class="formright">
                    <
select name="condition" id="condition">
                        <
option value="">New & Used</option>
                        <
option value="1">New Only</option>
                        <
option value="2">Used Only</option>
                    </
select>
                </
td>
            </
tr>

            </
table>

    <
div id="response" name="response"></div>

    <
div id="optResponse" name="optResponse"></div>

        </
td>

    </
tr>

    <
tr>
        <
td class="formstrip">

            <
div align="center"><input type="submit" name="Submit" value="Search" /></div>

        </
td>

    </
tr>

</
table
Thank You
Greg
HWD Greg is offline
Reply With Quote
View Public Profile
 
Old 12-08-2007, 05:23 AM Re: Drop down select box behaviour
rolda hayes's Avatar
Wannabe Adventurer...

Posts: 961
Name: Darren
Location: England
Trades: 0
Not sure I quite get what your asking...

If i press "B" key, it jumps to Biotechnology/Biomedical, the menu stays open and then I can click the sub cats below it...?

I cant see it jumping anywhere? Prob just me though!
__________________
I Just a test to see what happens...
Please login or register to view this content. Registration is FREE

"Let us be thankful for the fools. But for them the rest of us could not succeed..."
rolda hayes is offline
Reply With Quote
View Public Profile
 
Old 12-08-2007, 05:42 PM Re: Drop down select box behaviour
Novice Talker

Posts: 6
Trades: 0
Hi,

Ok, my fault, because I removed many options to trim it down for the post, the problem does not happen.

I have attached zip file with an html file with the all the code so you can see what I mean.



Thanks
Greg
Attached Files
File Type: zip test.zip (6.5 KB, 2 views)
HWD Greg is offline
Reply With Quote
View Public Profile
 
Old 12-09-2007, 02:21 PM Re: Drop down select box behaviour
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,380
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
is it that you are asking how to make the options list appear open when an option is selected?

The normal behaviour being to show the selected option then close the list.
__________________
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 offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-09-2007, 03:09 PM Re: Drop down select box behaviour
Novice Talker

Posts: 6
Trades: 0
Chris,

What I am asking is how can I make the highlighted option (when a letter is pressed) to appear at the top of the list instead of the bottom, allowing the user to see what is underneath it.

Thank you

Greg
HWD Greg is offline
Reply With Quote
View Public Profile
 
Old 12-10-2007, 03:45 AM Re: Drop down select box behaviour
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,380
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Ok
The problem here is that select box behaviour is very much OS & browser dependant, because the select box list is a "windowed control".

You are probably using FF which does leave the selected option at the bottom. IE on the other hand puts the selected item at the top.

There isn't even a cross browser method to open the list programatically. So about your only hope of forcing this behaviour would be to code your own in a CSS drop down style menu.
__________________
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 offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 12-10-2007, 03:55 AM Re: Drop down select box behaviour
Novice Talker

Posts: 6
Trades: 0
Chris,

Thank you for replies.

For the record IE6 behaves the same way as FF, well it does on my WINXP anyways. Thanks again.

Greg
HWD Greg is offline
Reply With Quote
View Public Profile
 
Old 12-10-2007, 04:26 AM Re: Drop down select box behaviour
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,380
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Ok,
I was looking at it on Win2k from my machine.
__________________
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 offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Drop down select box behaviour
 

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 3.02618 seconds with 13 queries