Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drop Down onclick not working IE

Status
Not open for further replies.

snowboardr

Programmer
Joined
Feb 22, 2002
Messages
1,401
Location
PH
Is there something different when it comes to ie... I could have swore my functions working a few days ago... now these functions are not! I have even made my function an alert box only... What can i do to fix this?

Jason

Code:
 <select name="SelectIt">
                <option value="1">More Actions....</option>
                <option onClick="statuschange('1');" style="color:#666666;font-weight:bold;">&nbsp;&nbsp;Mark as unread</option>
                <option onClick="statuschange('0');" style="color:#666666;">&nbsp;&nbsp;&nbsp;Mark as read</option>
                <option onClick="makestar('1');" style="color:#666666;">&nbsp;&nbsp;&nbsp;Star checked</option>
                <option onClick="makestar('0');" style="color:#666666;">&nbsp;&nbsp;&nbsp;Un-Star checked</option>
                <option>-------------</option>
                <option>Trash</option>
                <option>-------------</option>
                
                <option style="color:#666666;">Move to folder...</option>
                
                <option onclick="movetofolder('kayla',160);">&nbsp;&nbsp;&nbsp;kayla</option>
                
                <option onclick="movetofolder('kaylaa',176);">&nbsp;&nbsp;&nbsp;kaylaa</option>
                
                <option onclick="movetofolder('lallala',174);">&nbsp;&nbsp;&nbsp;lallala</option>
                
                <option onclick="movetofolder('lolly pop',180);">&nbsp;&nbsp;&nbsp;lolly pop</option>
                
                <option onclick="movetofolder('poo',178);">&nbsp;&nbsp;&nbsp;poo</option>
                
                <option onclick="movetofolder('silly goose',177);">&nbsp;&nbsp;&nbsp;silly goose</option>
                
                <option onclick="movetofolder('snickle',182);">&nbsp;&nbsp;&nbsp;snickle</option>
                
                <option onclick="movetofolder('suzi',159);">&nbsp;&nbsp;&nbsp;suzi</option>
                
                <option onclick="movetofolder('test',173);">&nbsp;&nbsp;&nbsp;test</option>
                
                <option onclick="movetofolder('test test',179);">&nbsp;&nbsp;&nbsp;test test</option>
                
                <option onclick="movetofolder('testing',183);">&nbsp;&nbsp;&nbsp;testing</option>
                
                <option onclick="movetofolder('Testing folders',155);">&nbsp;&nbsp;&nbsp;Testing folders</option>
                
                <option onclick="movetofolder('this is my folder',164);">&nbsp;&nbsp;&nbsp;this is my folder</option>
                
                <option onclick="movetofolder('what the heck',172);">&nbsp;&nbsp;&nbsp;what the heck</option>
                
                <option onclick="movetofolder('whats up',166);">&nbsp;&nbsp;&nbsp;whats up</option>
                
              </select>
 
So how would i do it because there is multiple functions so how can i do it with on one select tag.
 
you will need to check the selectedIndex of the select and then go from there...

something like:

Code:
function doThing(s) {
    switch ( s ) {
        case 0, 1, 2:
            doThingForFirstThreeOptions();
            break;
        case 3, 4, 5:
            doThingForNextThreeOptions();
            break;
        default:
            allOtherThings();
            break;
    }
}



<select name="s" onchange="doThing(this.selectedIndex);">



*cLFlaVA
----------------------------
[tt]somebody set up us the bomb![bomb][/tt]

[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
thanks alot Cory..



...
...
..

[evil] IE needs to burn in hell. [evil]

..
...
...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top