Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Can't call javascript from mozilla XUL? Probably trival, beginner troubles..

10 views
Skip to first unread message

Nick Reyntjes

unread,
Feb 15, 2009, 5:16:37 AM2/15/09
to
Hi everybody,
I'm new to mozilla XUL and am trying to play around a bit, but having
some problem starting..

Can anywone please tell me what is wrong with this:

<?xml version="1.0"?>

<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>

<window id="example-window" title="Example 8.6.2"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/
there.is.only.xul">
<script type="application/x-javascript">
function myfunction() {
alert("HELLO");
}
</script>
<button label="test" onclick="myfunction()"/>
</window>

If the button is clicked it does not show hello in my firefox 3.0.6
(Mozilla/5.0).

Thx!

0 new messages