View Full Version : click event for <select> <option>
HockeyFan
09-14-2005, 09:41 PM
Is there a method I can call to click on a particular <option> within a <Select>?
I've got a select with several <option> lines,and I have the ID of the one I want to click, but have tried .click() but that doesn't work. It always picks the top of the list, and reading up on it, it sounds like the click isn't what I'd choose. Is there another?
Wizard13335
09-15-2005, 02:16 AM
ok... srry i didnt understand
jscheuer1
09-15-2005, 05:07 AM
There is nothing I know of you can call to click on an option. I have heard of simulated events but, as far as I can tell they are unreliable. You could ask a friend to do it for you. Mostly, only the user can click on something. Sounds like you might want to have a certain item from the list selected on the basis of some other event on the page or just upon page load. If it is just upon page load, give the desired option the selected attribute:
<option selected>This is selected</option>
L0rd_Aryan
09-17-2005, 04:24 PM
I think he meant that by selecting an option to further access it, without providing any submit button,
dude, that has to go with asp
jscheuer1
09-17-2005, 04:57 PM
Well, did you, HockeyFan? That can be done with javascript. This is the HTML forum.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.