[xul-interop] Using colorpicker in xul

Jane <[email protected]> Wed, 6 Sep 2006 04:56:39 +0000 (UTC)
Newsgroups gmane.comp.lang.xul.general
Message-ID <[email protected]>
I have problem to  see how's colorpicker work in Mozilla by trying the following
.xul get from net. Anyone has any idea?

<?xml version="1.0"?>
<!DOCTYPE window>
<window 
    xmlns:html="http://www.w3.org/1999/xhtml"
    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

<html:script>
  function doSomethingUseful(cp)
  {
    var color = cp.getAttribute('color');

    document.getElementById("input").value = color;
    document.getElementById("mydiv").style.backgroundColor = color;
  }
</html:script>

<colorpicker id="cp" onclick="doSomethingUseful(this);"/>
<html:p/>
<html:input id="input"/>
<html:p/>
<html:div id="mydiv" style="width:100px; height:100px; background-color:white"/>
 

<html:hr/>
</window>



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
XUL News Wire      - http://xulnews.com
XUL Job Postings   - http://xuljobs.com
Open XUL Alliance - http://xulalliance.org