Re: [xul-interop] Using colorpicker in xul

"Christophe Charron" <[email protected]> Wed, 6 Sep 2006 08:04:27 +0200
Newsgroups gmane.comp.lang.xul.general
Message-ID <[email protected]>
--===============1488081582==
Content-Type: multipart/alternative; 
	boundary="----=_Part_181855_4366416.1157522667458"

------=_Part_181855_4366416.1157522667458
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi,
2006/9/6, Jane <[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
> _______________________________________________
> xul-talk mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/xul-talk
>

Maybe you should have a look on setAttributes there
http://www.xulplanet.com/tutorials/xultu/dommodify.html

-- 
Best regards
Christophe Charron

------=_Part_181855_4366416.1157522667458
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi,<br><div><span class="gmail_quote">2006/9/6, Jane &lt;<a href="mailto:[email protected]">[email protected]</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I have problem to&nbsp;&nbsp;see how's colorpicker work in Mozilla by trying the following<br>.xul get from net. Anyone has any idea?<br><br>&lt;?xml version=&quot;1.0&quot;?&gt;<br>&lt;!DOCTYPE window&gt;<br>&lt;window<br>&nbsp;&nbsp;&nbsp;&nbsp;xmlns:html=&quot;
<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;xmlns=&quot;<a href="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul
</a>&quot;&gt;<br><br>&lt;html:script&gt;<br>&nbsp;&nbsp;function doSomethingUseful(cp)<br>&nbsp;&nbsp;{<br>&nbsp;&nbsp;&nbsp;&nbsp;var color = cp.getAttribute('color');<br><br>&nbsp;&nbsp;&nbsp;&nbsp;document.getElementById(&quot;input&quot;).value = color;<br>&nbsp;&nbsp;&nbsp;&nbsp;document.getElementById
(&quot;mydiv&quot;).style.backgroundColor = color;<br>&nbsp;&nbsp;}<br>&lt;/html:script&gt;<br><br>&lt;colorpicker id=&quot;cp&quot; onclick=&quot;doSomethingUseful(this);&quot;/&gt;<br>&lt;html:p/&gt;<br>&lt;html:input id=&quot;input&quot;/&gt;
<br>&lt;html:p/&gt;<br>&lt;html:div id=&quot;mydiv&quot; style=&quot;width:100px; height:100px; background-color:white&quot;/&gt;<br><br><br>&lt;html:hr/&gt;<br>&lt;/window&gt;<br><br><br><br>-------------------------------------------------------------------------
<br>Using Tomcat but need to do more? Need to support web services, security?<br>Get stuff done quickly with pre-integrated technology to make your job easier<br>Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
<br><a href="http://sel.as-us.falkag.net/sel?cmd=lnk&amp;kid=120709&amp;bid=263057&amp;dat=121642">http://sel.as-us.falkag.net/sel?cmd=lnk&amp;kid=120709&amp;bid=263057&amp;dat=121642</a><br>_______________________________________________
<br>XUL News Wire&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- <a href="http://xulnews.com">http://xulnews.com</a><br>XUL Job Postings&nbsp;&nbsp; - <a href="http://xuljobs.com">http://xuljobs.com</a><br>Open XUL Alliance - <a href="http://xulalliance.org">http://xulalliance.org
</a><br>_______________________________________________<br>xul-talk mailing list<br><a href="mailto:[email protected]">[email protected]</a><br><a href="https://lists.sourceforge.net/lists/listinfo/xul-talk">
https://lists.sourceforge.net/lists/listinfo/xul-talk</a><br></blockquote></div><br>Maybe you should have a look on setAttributes there <a href="http://www.xulplanet.com/tutorials/xultu/dommodify.html">http://www.xulplanet.com/tutorials/xultu/dommodify.html
</a><br clear="all"><br>-- <br>Best regards<br>Christophe Charron

------=_Part_181855_4366416.1157522667458--


--===============1488081582==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
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
--===============1488081582==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
XUL News Wire      - http://xulnews.com
XUL Job Postings   - http://xuljobs.com
Open XUL Alliance - http://xulalliance.org  
_______________________________________________
xul-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xul-talk

--===============1488081582==--