[luci] template javascript problem

Michael Fung mike at cmsweb.com
Sat Feb 14 05:54:05 CET 2009


Hi All,


I want to include a simple button in a template to jump to another page but cannot get it to work:
...
<script language="javascript">
    function SwitchPage(URL) {
        document.location = URL;
    }
</script>

<input  type="button"
name="OK" 
value="OK" 
onClick="SwitchPage('/cgi-bin/luci/mini/gpio');">
</input>
...

Nothing happans when the button is clicked. I tried removing <%+header%> and <%+footer%> and then it worked!
Could anyone tell me what is affecting the execution of my javascript? I want to stick with <%+header%> and <%+footer%> for theme consistency.


Thanks,
Michael


More information about the luci mailing list