Recent activity
Subscribe to this feed
mitch marked one of Bryant's replies in LUCI as useful. Bryant replied to the idea "Useful resources for assignment 5".
mitch replied on February 22, 2008 05:03 to the idea "Useful resources for assignment 5" in LUCI:
Bryant:
You should be able to access the element; if you couldn't you'd most likely be getting something akin to a null pointer exception.
I looked in the Mozilla DOM documentation, but couldn't find an "element.value" attribute. The closest I could find is the "element.nodeValue," which returns null for all elements, and has no effect when set.
Rather than trying to assign the value directly to the node I prune all the children of the element, and then append a new new text node containing the updated label. Check out the following methods...
- element.hasChildNodes
- element.firstChild
- element.removeChild
- element.appendChild
- document.createTextNode
I suspect there's an easier way to achieve this.
--
Patrick:
I'm not sure what placing the Javascript in the sidebar xul will do; it sounds plausible that it's only run when the sidebar is open?
mitch shared an idea in LUCI on February 21, 2008 19:23:
Useful resources for assignment 5Adding HTML to a sidebar:
http://developer.mozilla.org/en/docs/...
(note: I had to wrap my HTML elements in a block-level HTML container, i.e. a div or span tag.)
--
Working with Mozilla's implementation of the DOM:
http://developer.mozilla.org/en/docs/...
--
Responding to the page load event:
http://developer.mozilla.org/en/docs/...
(note: you can just add Javascript within <script> tags in you firefox overlay XUL document)
--
Targeting links to the browser's main content area:
http://devedge-temp.mozilla.org/views...
(note: the page is pretty long and probably very out of date, but setting target="_content" worked for me.)
Loading Profile...
