[luci] template javascript problem

Michael Fung mike at cmsweb.com
Mon Feb 16 03:40:59 CET 2009


Sorry for asking this stupid question. I haven't touched html for a quite a while and the world is changing rapidly. Problem solved after I read some XHTML tutorial.


----- Original Message ----- 
From: "Michael Fung" <mike at cmsweb.com>
To: <luci at lists.subsignal.org>
Sent: Saturday, 14 February, 2009 12:54 PM
Subject: [luci] template javascript problem


> 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
> _______________________________________________
> luci mailing list
> luci at lists.subsignal.org
> https://lists.subsignal.org/mailman/listinfo/luci


More information about the luci mailing list