Closed Bug 37512 Opened 24 years ago Closed 10 years ago

XULNotes feedback and log bug

Categories

(Documentation Graveyard :: Web Developer, defect, P3)

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: oeschger, Assigned: danielwang)

References

()

Details

Write comments, feedback, and suggestions for the XULNotes here. -ian
Status: NEW → ASSIGNED
You used perl style elsif statement in javascript example code on 
http://www.mozilla.org/docs/xul/xulnotes/xulnote_events.html
Great the XUL notes and samples. I am really starting with XUL right now and
Ian' samples and technotes are helping a lot! :-)

Marcio / Taboca
Geckonnection.com
Updated xulnote cheatsheet with edits from Peter Annema (jag on #mozilla)
any idea when the hello world xpcom docs will be there?
On the page "Skinning XUL Files by Hand" 
(http://www.mozilla.org/docs/xul/xulnotes/xulnote_skins.html)
about 1/3 down the page, a link to "Mozilla's CSS Extensions" 
(http://www.mozilla.org/docs/xul/xulnotes/xulnote_moz-ext.html) does not exist. 
Any idea where this page is? Thanks!
Hi !

I am a french student and I am realizing a module for the construtct project
(http://cs.aue.auc.dk/construct) in Denmark with mozilla, and I have a problem
with the XUL interface (Bug ?).

With the following code (That resume my problem) , nothing happends when I click
on the "Link" button.

Thanks to report me if it is a bug or not.

Yann Le Doare, University of Esjberg, Denamrark.

<?xml version="1.0"?>

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

<window title="Button Test" id="button-test"
   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
   onload="showLinks();">
<script>

function showLinks()
{   
  var box=document.getElementsByTagName("urlBox").item(0);   
  var Lien = document.createElement("button");
  box.appendChild(Lien);
  Lien.label="Link";  
  Lien.oncommand="window.open('http://www.google.com', null,
'http,width=600,height=300');";
  Lien.onclick="window.open('http://www.google.com', null,
'http,width=600,height=300');";
}  

</script>
    <urlBox 
        orient="vertical">
    </urlBox>
</window>

Salut, Yann
Let me play with this example a little bit and see if I can figure out what's wrong.
Here's are a couple of fixes, Yann. I used document.getElementById("id") instead
of document.getElementsByTagName("name") because there was only one box (though
both methods will work). I also used setAttribute() on the two attributes you
need to create, the label itself and the oncommand. I am pretty sure you can't
set an  event handler directly on the object. Finally, I include the type of
script. Recently, I think it's become necessary to specify the type of script in
your xul as being type="application/x-javascript." It looks like the script
wasn't being executed until this was added.

Bonne chance!
-ian

<?xml version="1.0"?>

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

<window title="Button Test" id="button-test"
   xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
   onload="showLinks();">
<script type="application/x-javascript">
function showLinks()
{   
  var box=document.getElementById("url");
  var Lien = document.createElement("button");
  box.appendChild(Lien);
  Lien.setAttribute("label", "Lien");  
  Lien.setAttribute("oncommand", "window.open('http://www.google.com', null,
'http,width=600,height=300')");
}  
</script>
<urlBox orient="vertical" id="url"/>
</window>
*** Bug 92090 has been marked as a duplicate of this bug. ***
Bernard Tremblay just came up with a nice, "live" event handler example for
xulnote_events.html. Checked that in and updated the event xulnote to point to
it. It appears in the Event Bubbling section of that article. Thanks Bernard!
from: Credit Where Credit Is Due Department
The snippet I suggested to handle a demo of propagation in
http://www.mozilla.org/docs/xul/xulnotes/xulnote_events.html#bubbles comes from 
a demo ( http://www.xulplanet.com/tutorials/xultu/#apps ) in Neil Deakin's XUL 
Tutorial. I'm glad to imitate a phase-locked loop in "hunt" mode.

How about an ETA or update on when the final 4 bullet points will be added or at
least temporary pointers to other resources addressing the topics, especially
"Mozilla's CSS Extensions".
I suggest adding reference to http://jslib.mozdev.org/libraries/io/io.html for
help with "File I/O: Using the nsIFile Interface". JSlib provides a nice library
for dealing with such things.


Index: mozilla-org/html/docs/xul/xulnotes/index.html
===================================================================
RCS file: /cvsroot/mozilla-org/html/docs/xul/xulnotes/index.html,v
retrieving revision 1.29
diff -u -r1.29 index.html
--- mozilla-org/html/docs/xul/xulnotes/index.html	4 Oct 2000 23:07:08 -0000	1.29
+++ mozilla-org/html/docs/xul/xulnotes/index.html	23 May 2002 17:43:58 -0000
@@ -42,10 +42,13 @@
 <li><a href="xulnote_diagnostic.html">XUL Parser in Python</a>
<li><a href="xulnote_packages.html">Creating New Packages in Mozilla</a>
<li>The Mozilla Application Object Model
-<li>File I/O: Using the nsIFile Interface
+<li>File I/O: Using the nsIFile Interface [1]
 <li>Mozilla's CSS Extensions
 <li>The "Hello World" XPCOM Application
 </ul>
+
+[1] See <a href="http://jslib.mozdev.org/libraries/io/io.html">jslib</a> for
help with this.
+
 <p>&nbsp;
 </td></tr></table>
</blockquote>
documentation graveyard <http://www.mozilla.org/classic/> lists
XULNotes. Is XULNotes going to die?
Blocks: 57237
hrmph. I think some of those xulnotes might be aging ungracefully, but certainly
there is still some useful content there. I would hesitate to put the whole
thing in the graveyard. Perhaps we can evaluate them each for currency.
It's that time of year, and there's likely to be some stale curft around 
. *sniff* ... It might be time to check the best-before date. (Features list 
for 2.0?)
moving stuff over to an outside-the-firewall email for the time being, looking
for people to pick these Help and doc bugs up for me.
Assignee: oeschger → oeschger
Status: ASSIGNED → NEW
taking over some of Ian's bugs
Assignee: oeschger → stolenclover
No activity in 10 years. Closing. Please open new issues against the MDN XUL docs in the "Developer Documentation" product.

https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/A_XUL_Bestiary
https://developer.mozilla.org/en-US/docs/XUL_Event_Propagation
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.