473,394 Members | 1,778 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

NS_ERROR_DOM_HIERARCHY_REQUEST _ERR YUI Example

This is a clip from the new book Learning the Yahoo! User Interface
Library ...

(An example of doing things and not using YUI)

Why does this return a NS_ERROR_DOM_HIERARCHY_REQUEST _ERR code 3
error?

Thanks,

/Users/emmett>cd Desktop
/Users/emmett/Desktop>ls yui*.zip
ls: yui*.zip: No such file or directory
/Users/emmett/Desktop>ls *.zip
ls: *.zip: No such file or directory
/Users/emmett/Desktop>ls y*
Icon? Info.plist yui_2.5.1.zip
/Users/emmett/Desktop>ls y*
Icon? Info.plist yui_2.5.1.zip
/Users/emmett/Desktop>ls *.zip
ls: *.zip: No such file or directory
/Users/emmett/Desktop>cd yui
/Users/emmett/Desktop/yui>ls
README assets/ build/ docs/
examples/ index.html tests/
/Users/emmett/Desktop/yui>cd build
/Users/emmett/Desktop/yui/build>ls
animation/ container/
fonts/ menu/ tabview/
assets/ cookie/
get/ profiler/ treeview/
autocomplete/ datasource/
grids/ profilerviewer/ uploader/
base/ datatable/
history/ reset/ utilities/
button/ dom/
imagecropper/ reset-fonts/ yahoo/
calendar/ dragdrop/
imageloader/ reset-fonts-grids/ yahoo-dom-event/
charts/ editor/
json/ resize/ yuiloader/
colorpicker/ element/
layout/ selector/ yuiloader-dom-event/
connection/ event/
logger/ slider/ yuitest/
/Users/emmett/Desktop/yui/build>ls docs
ls: docs: No such file or directory
/Users/emmett/Desktop/yui/build>cd ..
/Users/emmett/Desktop/yui>ls docs
Anim.js.html
YAHOO.util.Subscriber.html
AnimMgr.js.html
YAHOO.util.UnexpectedError.html
ArrayAssert.js.html
YAHOO.util.UnexpectedValue.html
Assert.js.html
YAHOO.util.UserAction.html
Attribute.js.html
YAHOO.util.YUILoader.html
AttributeProvider.js.html
YAHOO.widget.AutoComplete.html
AutoComplete.js.html
YAHOO.widget.Axis.html
Axis.js.html
YAHOO.widget.BarChart.html
Bezier.js.html
YAHOO.widget.BarSeries.html
Calendar.js.html
YAHOO.widget.Button.html
CalendarGroup.js.html
YAHOO.widget.ButtonGroup.html
CalendarNavigator.js.html
YAHOO.widget.Calendar.html
CartesianChart.js.html
YAHOO.widget.Calendar2up.html
CategoryAxis.js.html
YAHOO.widget.CalendarGroup.html
Chain.js.html
YAHOO.widget.CalendarNavigator.html
Chart.js.html
YAHOO.widget.Calendar_Core.html
ChartTypes.js.html
YAHOO.widget.CartesianChart.html
Color.js.html
YAHOO.widget.CartesianSeries.html
ColorAnim.js.html
YAHOO.widget.CategoryAxis.html
ColorPicker.js.html
YAHOO.widget.Chart.html
ColumnSet.js.html
YAHOO.widget.ColorPicker.html
Config.js.html
YAHOO.widget.Column.html
ContainerEffect.js.html
YAHOO.widget.ColumnChart.html
Cookie.js.html
YAHOO.widget.ColumnSeries.html
CustomEvent.js.html
YAHOO.widget.ColumnSet.html
DD.js.html
YAHOO.widget.ContainerEffect.html
DDProxy.js.html
YAHOO.widget.ContextMenu.html
DDTarget.js.html
YAHOO.widget.ContextMenuItem.html
DataSource.js.html
YAHOO.widget.DS_JSArray.html
DataTable.js.html
YAHOO.widget.DS_JSFunction.html
DateAssert.js.html
YAHOO.widget.DS_ScriptNode.html
DateMath.js.html
YAHOO.widget.DS_XHR.html
Dialog.js.html
YAHOO.widget.DataSource.html
Dom.js.html
YAHOO.widget.DataTable.html
DragDrop.js.html
YAHOO.widget.DateMath.html
DragDropMgr.js.html
YAHOO.widget.Dialog.html
DualSlider.js.html
YAHOO.widget.DualSlider.html
Easing.js.html
YAHOO.widget.Editor.html
Element.js.html
YAHOO.widget.EditorInfo.html
Env.js.html
YAHOO.widget.EditorWindow.html
Event.js.html
YAHOO.widget.FlashAdapter.html
EventProvider.js.html
YAHOO.widget.HTMLNode.html
FlashAdapter.js.html
YAHOO.widget.ImageCropper.html
Get.js.html
YAHOO.widget.Layout.html
HTMLNode.js.html
YAHOO.widget.LayoutUnit.html
ImageLoader.js.html
YAHOO.widget.LineChart.html
JSON.js.html
YAHOO.widget.LineSeries.html
KeyListener.js.html
YAHOO.widget.LogMsg.html
Lang.js.html
YAHOO.widget.LogReader.html
LogMsg.js.html
YAHOO.widget.LogWriter.html
LogReader.js.html
YAHOO.widget.Logger.html
LogWriter.js.html
YAHOO.widget.Menu.html
Logger.js.html
YAHOO.widget.MenuBar.html
MenuNode.js.html
YAHOO.widget.MenuBarItem.html
Module.js.html
YAHOO.widget.MenuItem.html
Motion.js.html
YAHOO.widget.MenuManager.html
Node.js.html
YAHOO.widget.MenuNode.html
NumericAxis.js.html
YAHOO.widget.Module.html
ObjectAssert.js.html
YAHOO.widget.Node.html
Overlay.js.html
YAHOO.widget.NumericAxis.html
OverlayManager.js.html
YAHOO.widget.Overlay.html
Paginator.js.html
YAHOO.widget.OverlayManager.html
Panel.js.html
YAHOO.widget.Paginator.html
PieChart.js.html
YAHOO.widget.Paginator.ui.CurrentPageReport.html
Profiler.js.html
YAHOO.widget.Paginator.ui.FirstPageLink.html
RecordSet.js.html
YAHOO.widget.Paginator.ui.LastPageLink.html
Region.js.html
YAHOO.widget.Paginator.ui.NextPageLink.html
RootNode.js.html
YAHOO.widget.Paginator.ui.PageLinks.html
Scroll.js.html
YAHOO.widget.Paginator.ui.PreviousPageLink.html
Selector.js.html
YAHOO.widget.Paginator.ui.RowsPerPageDropdown.html
Series.js.html
YAHOO.widget.Panel.html
SimpleDialog.js.html
YAHOO.widget.PieChart.html
Slider.js.html
YAHOO.widget.PieSeries.html
SliderThumb.js.html
YAHOO.widget.ProfilerViewer.html
TVAnim.js.html
YAHOO.widget.Record.html
TVFadeIn.js.html
YAHOO.widget.RecordSet.html
TVFadeOut.js.html
YAHOO.widget.RootNode.html
Tab.js.html
YAHOO.widget.Series.html
TabView.js.html
YAHOO.widget.SimpleDialog.html
TestCase.js.html
YAHOO.widget.SimpleEditor.html
TestFormat.js.html
YAHOO.widget.Slider.html
TestLogger.js.html
YAHOO.widget.SliderThumb.html
TestManager.js.html
YAHOO.widget.TVAnim.html
TestReporter.js.html
YAHOO.widget.TVFadeIn.html
TestRunner.js.html
YAHOO.widget.TVFadeOut.html
TestSuite.js.html
YAHOO.widget.Tab.html
TextNode.js.html
YAHOO.widget.TabView.html
TimeAxis.js.html
YAHOO.widget.TextNode.html
Tooltip.js.html
YAHOO.widget.TimeAxis.html
TreeView.js.html
YAHOO.widget.Toolbar.html
Uploader.js.html
YAHOO.widget.ToolbarButton.html
UserAction.js.html
YAHOO.widget.ToolbarButtonAdvanced.html
YAHOO.env.html
YAHOO.widget.Tooltip.html
YAHOO.env.ua.html
YAHOO.widget.TreeView.html
YAHOO.html
YAHOO.widget.Uploader.html
YAHOO.js.html
YAHOO_config.html
YAHOO.lang.JSON.html assets/
YAHOO.lang.html button.js.html
YAHOO.tool.Profiler.html
buttongroup.js.html
YAHOO.tool.TestCase.Wait.html classmap.js
YAHOO.tool.TestCase.html
connection.js.html
YAHOO.tool.TestLogger.html
contextmenu.js.html
YAHOO.tool.TestManager.html
contextmenuitem.js.html
YAHOO.tool.TestNode.html crop.js.html
YAHOO.tool.TestReporter.html editor.js.html
YAHOO.tool.TestRunner.html
history.js.html
YAHOO.tool.TestSuite.html index.html
YAHOO.util.Anim.html index.json
YAHOO.util.AnimMgr.html layout.js.html
YAHOO.util.ArrayAssert.html
layoutunit.js.html
YAHOO.util.Assert.html menu.js.html
YAHOO.util.AssertionError.html
menubar.js.html
YAHOO.util.Attribute.html
menubaritem.js.html
YAHOO.util.AttributeProvider.html
menuitem.js.html
YAHOO.util.Bezier.html
menumanager.js.html
YAHOO.util.Chain.html
module_animation.html
YAHOO.util.Color.html
module_autocomplete.html
YAHOO.util.ColorAnim.html
module_button.html
YAHOO.util.ColumnDD.html
module_calendar.html
YAHOO.util.ColumnResizer.html
module_charts.html
YAHOO.util.ComparisonFailure.html
module_colorpicker.html
YAHOO.util.Config.html
module_connection.html
YAHOO.util.Connect.html
module_container.html
YAHOO.util.Cookie.html
module_cookie.html
YAHOO.util.CustomEvent.html
module_datasource.html
YAHOO.util.DD.html
module_datatable.html
YAHOO.util.DDProxy.html
module_dom.html
YAHOO.util.DDTarget.html
module_dragdrop.html
YAHOO.util.DataSource.html
module_editor.html
YAHOO.util.Date.html
module_element.html
YAHOO.util.DateAssert.html
module_event.html
YAHOO.util.Dom.html
module_get.html
YAHOO.util.DragDrop.html
module_history.html
YAHOO.util.DragDropMgr.ElementWrapper.html
module_imagecropper.html
YAHOO.util.DragDropMgr.html
module_imageloader.html
YAHOO.util.Easing.html
module_json.html
YAHOO.util.Element.html
module_layout.html
YAHOO.util.Event.html
module_logger.html
YAHOO.util.EventProvider.html
module_menu.html
YAHOO.util.Get.html
module_profiler.html
YAHOO.util.History.html
module_profilerviewer.html
YAHOO.util.ImageLoader.bgImgObj.html
module_resize.html
YAHOO.util.ImageLoader.group.html
module_selector.html
YAHOO.util.ImageLoader.imgObj.html
module_slider.html
YAHOO.util.ImageLoader.pngBgImgObj.html
module_tabview.html
YAHOO.util.ImageLoader.srcImgObj.html
module_treeview.html
YAHOO.util.KeyListener.html
module_uploader.html
YAHOO.util.Motion.html
module_yahoo.html
YAHOO.util.Number.html
module_yuiloader.html
YAHOO.util.ObjectAssert.html
module_yuitest.html
YAHOO.util.Point.html
profilerviewer.js.html
YAHOO.util.Region.html raw.json
YAHOO.util.Resize.html resize.js.html
YAHOO.util.Scroll.html simple-
editor.js.html
YAHOO.util.Selector.html
swfobject.js.html
YAHOO.util.ShouldError.html toolbar-
button.js.html
YAHOO.util.ShouldFail.html
toolbar.js.html
YAHOO.util.Sort.html
yuiloader.js.html
/Users/emmett/Desktop/yui>open toolbar.js.html
2008-04-19 20:23:56.136 open[724] No such file: /Users/emmett/Desktop/
yui/toolbar.js.html
/Users/emmett/Desktop/yui>#open toolbar.js.html
/Users/emmett/Desktop/yui>ls toolbar.js.html
ls: toolbar.js.html: No such file or directory
/Users/emmett/Desktop/yui>cd docs
/Users/emmett/Desktop/yui/docs>#open toolbar.js.html
/Users/emmett/Desktop/yui/docs>open toolbar.js.html
/Users/emmett/Desktop/yui/docs>cd ..
/Users/emmett/Desktop/yui>cd examples
/Users/emmett/Desktop/yui/examples>ls
animation/ charts/ datatable/ fonts/
imageloader/ menu/ selector/ yahoo/
autocomplete/ colorpicker/ dom/ get/
index.html profiler/ slider/ yuiloader/
base/ connection/ dragdrop/ grids/
json/ profilerviewer/ tabview/ yuitest/
button/ container/ editor/ history/
layout/ reset/ treeview/
calendar/ cookie/ event/ imagecropper/
logger/ resize/ uploader/
/Users/emmett/Desktop/yui/examples>open index.html
/Users/emmett/Desktop/yui/examples>ls
animation/ charts/ datatable/ fonts/
imageloader/ menu/ selector/ yahoo/
autocomplete/ colorpicker/ dom/ get/
index.html profiler/ slider/ yuiloader/
base/ connection/ dragdrop/ grids/
json/ profilerviewer/ tabview/ yuitest/
button/ container/ editor/ history/
layout/ reset/ treeview/
calendar/ cookie/ event/ imagecropper/
logger/ resize/ uploader/
/Users/emmett/Desktop/yui/examples>cd ..
/Users/emmett/Desktop/yui>ls
README assets/ build/ docs/
examples/ index.html tests/
/Users/emmett/Desktop/yui>cd assets
/Users/emmett/Desktop/yui/assets>ls
YUIexamples.js dpSyntaxHighlighter.js yui-
candy.jpg yuiDistribution.css
bg_hd.gif example-hd-bg.gif
yui.css
dpSyntaxHighlighter.css title_h_bg.gif
yui.gif
/Users/emmett/Desktop/yui/assets>cd
/Users/emmett>mkdir yuisite
/Users/emmett>cd yuisite
/Users/emmett/yuisite>mv ../Desktop/yui .
/Users/emmett/yuisite>ls
yui/
/Users/emmett/yuisite>cd *
/Users/emmett/yuisite/yui>ls examples
animation/ charts/ datatable/ fonts/
imageloader/ menu/ selector/ yahoo/
autocomplete/ colorpicker/ dom/ get/
index.html profiler/ slider/ yuiloader/
base/ connection/ dragdrop/ grids/
json/ profilerviewer/ tabview/ yuitest/
button/ container/ editor/ history/
layout/ reset/ treeview/
calendar/ cookie/ event/ imagecropper/
logger/ resize/ uploader/
/Users/emmett/yuisite/yui>ls examples/calendar
assets/ events_clean.html
germany_clean.html popup_clean.html
calcontainer.html events_log.html
index.html quickstart.html
calcontainer_clean.html formsel.html
japan.html quickstart_clean.html
calgrp.html formsel_clean.html
japan_clean.html render.html
calgrp_clean.html formsel_log.html
minmax.html render_clean.html
calnavigator.html formtxt.html
minmax_clean.html render_log.html
calnavigator_clean.html formtxt_clean.html
multi.html
calskin.html formtxt_log.html
multi_clean.html
events.html germany.html
popup.html
/Users/emmett/yuisite/yui>ls examples/calendar/index.html
examples/calendar/index.html
/Users/emmett/yuisite/yui>open examples/calendar/index.html
/Users/emmett/yuisite/yui>grep link a.html
grep: a.html: No such file or directory
/Users/emmett/yuisite/yui>cd ..
/Users/emmett/yuisite>grep link a.html
<link rel="stylesheet" type="text/css" href="yui/build/calendar/assets/
skins/sam/calendar.css">
/Users/emmett/yuisite>ls yui/build/calendar/assets/skins/sam/
calendar.css
yui/build/calendar/assets/skins/sam/calendar.css
/Users/emmett/yuisite>grep script a.html
<script type="text/javascript" src="yui/build/yahoo-dom-event/yahoo-
dom-event.js"></script>
<script type="text/javascript" src="yui/build/calendar/calendar-
min.js"></script>
/Users/emmett/yuisite>ls yui/build/yahoo-dom-event/yahoo-dom-event.js
yui/build/yahoo-dom-event/yahoo-dom-event.js
/Users/emmett/yuisite>ls yui/build/calendar/calendar-min.js
yui/build/calendar/calendar-min.js
/Users/emmett/yuisite>open a.html
/Users/emmett/yuisite>vi a.html
/Users/emmett/yuisite>open a.html
/Users/emmett/yuisite>vi a.html
/Users/emmett/yuisite>open a.html
/Users/emmett/yuisite>vi a.html
/Users/emmett/yuisite>open a.html
/Users/emmett/yuisite>vi a.html
/Users/emmett/yuisite>cp a.html b.html
/Users/emmett/yuisite>vi b.html
/Users/emmett/yuisite>vi a.html
/Users/emmett/yuisite>vi b.html
/Users/emmett/yuisite>vi a.html
/Users/emmett/yuisite>cp b.html c.html
/Users/emmett/yuisite>vi c.html
/Users/emmett/yuisite>find . -name '*reset*.css'
../yui/build/reset/reset-min.css
../yui/build/reset/reset.css
../yui/build/reset-fonts/reset-fonts.css
../yui/build/reset-fonts-grids/reset-fonts-grids.css
../yui/docs/assets/reset-fonts-grids-min.css
/Users/emmett/yuisite>vi c.html
/Users/emmett/yuisite>find . -name grids.css
../yui/build/grids/grids.css
/Users/emmett/yuisite>vi c.html
/Users/emmett/yuisite>vi d.html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/
TR/html3/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Traditional DOM Example</title>
<script type="text/javascript">
function checkInput() {
var input = document.getElementById("input1").value;
if ( "" == input ) {
var newspan = document.createElement("span");
var newtext = document.createTextNode("Enter
Anything");
var newparent = document.getElementById("container");
newspan.appendChild(newtext);
newspan.appendChild(newspan);
return false;
}
}

function init() {
if (document.addEventListener) {

document.getElementById("form").addEventListener(" submit",checkInput,false);
} else {

document.getElementById("form").attachEvent("onsub mit",checkInput);
}
}
window.onload = init;
</script>
</head>

<body>
<form id="form" action="">
<div id="container">
<label for="input1">Enter some test</label>
<input type="text" id="input1">
<button id="submit" type="submit">Submit</button>
</div>
</form>
</body>
</html>

Jun 27 '08 #1
1 1824
gi*******************@yahoo.com wrote:
This is a clip from the new book Learning the Yahoo!
User Interface
Library ...

(An example of doing things and not using YUI)

Why does this return a NS_ERROR_DOM_HIERARCHY_REQUEST _ERR code 3
<snip>
newspan.appendChild(newspan);
<snip>

Trying to append an element as the last child of itself is extremely
unlikely to have a successful outcome.

Richard.
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Michael Foord | last post by:
#!/usr/bin/python -u # 15-09-04 # v1.0.0 # auth_example.py # A simple script manually demonstrating basic authentication. # Copyright Michael Foord # Free to use, modify and relicense. #...
6
by: Ville Vainio | last post by:
Just posting this for the sake of google: Like everyone else, I figured it's time to start using the 'logging' module. I typically want to dump "info" level (and up) log information to...
5
by: relaxedrob | last post by:
Hi All! I ran the following w3c example through my WSDL parser (SOA Editor from Cape Clear): http://www.w3.org/TR/wsdl#_rpcexample It told me that there were a bunch of erros about no...
1
by: Bo Xu | last post by:
Object of Combination By Bo Xu Introduction A combination of n things, taken s at a time, often referred as an s-combination out of n, is a way to select a subset of size s from a given set of...
2
by: Xah Lee | last post by:
Python Doc Problem Example: os.system Xah Lee, 2005-09 today i'm trying to use Python to call shell commands. e.g. in Perl something like output=qx(ls) in Python i quickly located the...
11
by: ajikoe | last post by:
Hello, I used Visual C# Standard Edition. I want to comment my program using xml commentary method, I don't know why if I use value and example tag, it is not working / showed in the html...
6
by: cj | last post by:
Lets just take this example I'm looking at now. I'm looking at the help screen titled .NET Framework Class Library FolderBrowserDialog Class . It gives an example at the bottom that begins with:...
25
by: meltedown | last post by:
This is supposed ot be an example: http://www.ajaxtutorial.net/index.php/2006/11/30/simple-ajax-using-prototype-part-2/ It says : This example is probably the simplest example you will ever...
6
by: Guy Macon | last post by:
While I agree with the sentiment, the oringinal title on this thread ("OT: Specially for , why you should always use example.com for obfuscating domains") is wrong. There are other reserved domain...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.