The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
changing a select box value with js
ok what i've got is a page with an image on it, it has an impage map and clickable areas on it, what i'm wanting is for whenever an area is clicked it to change the value of a select box to something else.
i tried: onmousedown='document.forms[6].selectbox.value=newvalue it came up with the error: forms[6] has no properties i also tried using the forms name in place of forms[6] same error... any ideas as to what this error means and how to fix it? |
#2
|
||||
|
||||
Selectbox isn't clear to me. Do you mean a dropdown box?
Or a radio button? Or checkboxes? if you have a checkbox, then make it selectbox.checked = newvalue; and not value. If you happen to know german, Selfhtml has a good reference for javascript (http://de.selfhtml.org/javascript/objekte/elements.htm) |
#3
|
|||
|
|||
drop down box. ie <select><option> etc
|
#4
|
|||
|
|||
Shouldnt be approachable with the name of the form and check box?
|
#5
|
||||
|
||||
AFAIK you can't have trigger events on <option> tags, you need to apply the javascript event to the select
|
#6
|
|||
|
|||
i know that, i'm trying to attatch it to the image map, to change the option selected in the select box; which should be possible by changing its value...
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|