Click to See Complete Forum and Search --> : stylechange script query


munna
08-29-2003, 04:13 AM
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>

hammerslane
08-29-2003, 04:18 AM
<form name="Jump">
<font face="arial" color=gold size=4>Choose Stylesheet:</font><br>
<select name="Menu">
<option value="setActiveStyleSheet('fire'); return false;">Fire</option>

<option value="setActiveStyleSheet('forest'); return false;">Forest</option>

<option value="setActiveStyleSheet('ice'); return false;">Ice</option>

<option value="setActiveStyleSheet('stripe'); return false;">Stripe</option>

</select>
<input type="button" onClick="location=document.Jump.Menu.options[document.Jump.Menu.selectedIndex].value;" value="OK" name="button">
</form>


perhaps that'll work
:confused:

let me know if it does or not, i can't really test it unless i create style sheets with those names... and i can't be arsed :p
:)

munna
08-29-2003, 04:43 AM
hi,
I tried it, but it just goes to a 404 error page!

hammerslane
08-29-2003, 04:45 AM
ok, i'm just guessing now: but put

javascript:

before all the "setActiveSt....."etc.

if that doesn't work, i can't help nemore, sorry :(

l8rz