|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
css stylechange query
Hi,
I have the following at the moment to switch between stylesheets on my page. Please could someone tell me how to turn this into a drop-down option box, rather than a list of links? <div class="gentable"> <b>Stylechanger</b><br /> <a style="menu" href="#" onclick="setActiveStyleSheet('sixblocks'); return false;">Default</a> <br /> <a href="#" onclick="setActiveStyleSheet('fire'); return false;">Fire</a> <br /> <a href="#" onclick="setActiveStyleSheet('forest'); return false;">Forest</a> <br /> <a href="#" onclick="setActiveStyleSheet('ice'); return false;">Ice</a> <br /> <a href="#" onclick="setActiveStyleSheet('stripe'); return false;">Stripe</a> <br /> </div> |
|
#2
|
|||
|
|||
|
onChange
|
|
#3
|
|||
|
|||
|
Hi,
I'm afraid I don't know much javascript & don't understand what you mean -- could you explain a bit more? |
|
#4
|
||||
|
||||
|
You should add this to the onchange event in your select box:
Code:
functionName(this.form.SelectName.options[this.SelectName.options.selectedIndex].value) This basicly calls a javascript function each time you select an option from the drop down list and in this function you can define what to do with the value submitted. For example this function: Code:
function(mix) {
self.location.href=mix;
}
Would redirect the user to a page with the address that is the value of the droplist menu ![]() |
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > css stylechange query |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|