[Project_owners] Have some problem with changing listbox label.

eric.jung at yahoo.com eric.jung at yahoo.com
Thu Jul 5 04:41:18 PDT 2007


There's more than one way to do it, but the easiest:

1. Add an id attribute to the listcell:
<listcell id="changeme" label="Not Set"/>

2. Add onclick handler to <label/>:
<label id="MyId" value="Click here to edit font" onclick="document.getElementById("changeme").label='something'"/>

----- Original Message ----
From: joe ertaba <belaviyo at gmail.com>
To: Mozdev Project Owners List <project_owners at mozdev.org>
Sent: Thursday, July 5, 2007 4:19:11 AM
Subject: [Project_owners] Have some problem with changing listbox label.

Hi

any body can help me to change text of first line in below list "Not Set" to "something" when user click on label with id="MyId" 


<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window id="yourwindow" xmlns="
http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="text/javascript">
<![CDATA[
// put some js code here

]]>
</script>
<label id="MyId" value="Click Here to Edit font"/>


                <listbox>
                        <listhead >
                            <listheader label="URL"/>

                            <listheader label="Font Size"/>
                        </listhead>

                        <listcols>
                                <listcol/>

                            <listcol flex="1"/>
                        </listcols>
                        <listitem >
                            http://......1"/>

                            <listcell  label="Not Set"/>
                        </listitem>
                        <listitem >
                            http://......2"/>

                            <listcell label="Not Set"/>
                        </listitem>

                </listbox>
</window>

_______________________________________________
Project_owners mailing list
Project_owners at mozdev.org
http://mozdev.org/mailman/listinfo/project_owners




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mozdev.org/pipermail/project_owners/attachments/20070705/b5f3f8a7/attachment-0001.html 


More information about the Project_owners mailing list