Prev: select options scrollIntoView in IE6
Next: Javascript vertical drag div areas - not quiet there
From: Spizzat2 on 28 Sep 2009 17:28 On Sep 25, 5:31 pm, Garrett Smith <dhtmlkitc...(a)gmail.com> wrote: > Stefan Weiss wrote: > > Do you see the same error in Firefox' Error Console? > The error also shows up in Firefox's error console as: Error: uncaught exception: [Exception... "Security error" code: "1000" nsresult: "0x805303e8 (NS_ERROR_DOM_SECURITY_ERR)" location: "http://yui.yahooapis.com/combo?2.7.0/build/yahoo/yahoo-debug.js&2.7.0/ build/event/event-debug.js&2.7.0/build/connection/connection- debug.js&2.7.0/build/datasource/datasource-debug.js&2.7.0/build/dom/ dom-debug.js&2.7.0/build/autocomplete/autocomplete-debug.js&2.7.0/ build/element/element-debug.js&2.7.0/build/dragdrop/dragdrop- debug.js&2.7.0/build/container/container-debug.js&2.7.0/build/menu/ menu-debug.js&2.7.0/build/button/button-debug.js&2.7.0/build/calendar/ calendar-debug.js&2.7.0/build/json/json-debug.js&2.7.0/build/charts/ charts-debug.js&2.7.0/build/paginator/paginator-debug.js&2.7.0/build/ datatable/datatable-debug.js&2.7.0/build/get/get-debug.js&2.7.0/build/ logger/logger-debug.js&2.7.0/build/selector/selector-debug.js&2.7.0/ build/slider/slider-debug.js&2.7.0/build/tabview/tabview- debug.js&2.7.0/build/treeview/treeview-debug.js&2.7.0/build/uploader/ uploader.js Line: 1262"] > What do you see when you click on the error message to go to the line > number? Looking at line 1262 (the line indicated in the error) shows the code I provided in the first post. However, I looked at the stack at the time of error, and it looks like it comes from a line in my code that uses the YUI framework to handle the response to an ajax request that occurs as the page is loading. Offending Line: var sButton = new YAHOO.widget.Button ('startDateButton'); //Creates a YUI button for the calendar selector The line seems pretty straight-forward. It then goes into YUI, running a slew of anonymous functions. The last function to run before the error is _setLabel, which appears to be part of the YAHOO.widget.Button code (or possibly an extension of it, since it's part of the YAHOO.extend() function; The problematic line there runs this code: this._button.innerHTML = p_sLabel; According to the stack, p_sLabel = '<img src="/images/calbtn.gif">', which makes sense. It's the image we want as part of the button. I know you can use an image in a YUI Button, because I've seen it done, and it works most of the time on this page. Is that any help?
From: Garrett Smith on 28 Sep 2009 22:32 Spizzat2 wrote: > On Sep 25, 5:31 pm, Garrett Smith <dhtmlkitc...(a)gmail.com> wrote: >> Stefan Weiss wrote: >> >> Do you see the same error in Firefox' Error Console? >> > > > The error also shows up in Firefox's error console as: > > Error: uncaught exception: [Exception... "Security error" code: > "1000" nsresult: "0x805303e8 (NS_ERROR_DOM_SECURITY_ERR)" location: > "http://yui.yahooapis.com/combo?2.7.0/build/yahoo/yahoo-debug.js&2.7.0/ > build/event/event-debug.js&2.7.0/build/connection/connection- > debug.js&2.7.0/build/datasource/datasource-debug.js&2.7.0/build/dom/ > dom-debug.js&2.7.0/build/autocomplete/autocomplete-debug.js&2.7.0/ > build/element/element-debug.js&2.7.0/build/dragdrop/dragdrop- > debug.js&2.7.0/build/container/container-debug.js&2.7.0/build/menu/ > menu-debug.js&2.7.0/build/button/button-debug.js&2.7.0/build/calendar/ > calendar-debug.js&2.7.0/build/json/json-debug.js&2.7.0/build/charts/ > charts-debug.js&2.7.0/build/paginator/paginator-debug.js&2.7.0/build/ > datatable/datatable-debug.js&2.7.0/build/get/get-debug.js&2.7.0/build/ > logger/logger-debug.js&2.7.0/build/selector/selector-debug.js&2.7.0/ > build/slider/slider-debug.js&2.7.0/build/tabview/tabview- > debug.js&2.7.0/build/treeview/treeview-debug.js&2.7.0/build/uploader/ > uploader.js Line: 1262"] > >> What do you see when you click on the error message to go to the line >> number? > > Looking at line 1262 (the line indicated in the error) shows the code > I provided in the first post. However, I looked at the stack at the > time of error, and it looks like it comes from a line in my code that > uses the YUI framework to handle the response to an ajax request that > occurs as the page is loading. > I loaded the linked file and went to line 1262 an saw: | "args: " + args + ", " + > Offending Line: var sButton = new YAHOO.widget.Button > ('startDateButton'); //Creates a YUI button for the calendar selector > > The line seems pretty straight-forward. It then goes into YUI, running > a slew of anonymous functions. The last function to run before the > error is _setLabel, which appears to be part of the > YAHOO.widget.Button code (or possibly an extension of it, since it's > part of the YAHOO.extend() function; The problematic line there runs > this code: this._button.innerHTML = p_sLabel; > According to the stack, p_sLabel = '<img src="/images/calbtn.gif">', > which makes sense. It's the image we want as part of the button. I > know you can use an image in a YUI Button, because I've seen it done, > and it works most of the time on this page. > > Is that any help? Can you reproduce that with a simple html page and inline script, like: aDiv.innerHTML = "<img src="/images/calbtn.gif">" Does it happen with all images, or just that image request (with all headers, cookie, etc). -- Garrett comp.lang.javascript FAQ: http://jibbering.com/faq/
From: Spizzat2 on 30 Sep 2009 11:11 > Can you reproduce that with a simple html page and inline script, like: > aDiv.innerHTML = "<img src="/images/calbtn.gif">" > > Does it happen with all images, or just that image request (with all > headers, cookie, etc). > -- > Garrett > comp.lang.javascript FAQ:http://jibbering.com/faq/ Sorry I'm slow to reply. I don't always think to check the thread. I made a quick test case as you suggested, and there's no error there. I suppose the next step is to start adding things to the test case until I find the error. Unfortunately, that's not high on my priority list right now. I'll get to it soon enough, I hope. If you've got other suggestions, let me know.
From: Garrett Smith on 5 Oct 2009 04:29 Spizzat2 wrote: >> Can you reproduce that with a simple html page and inline script, like: >> aDiv.innerHTML = "<img src="/images/calbtn.gif">" >> >> Does it happen with all images, or just that image request (with all >> headers, cookie, etc). >> -- >> Garrett >> comp.lang.javascript FAQ:http://jibbering.com/faq/ > > Sorry I'm slow to reply. I don't always think to check the thread. > I made a quick test case as you suggested, and there's no error there. > I suppose the next step is to start adding things to the test case > until I find the error. Unfortunately, that's not high on my priority > list right now. I'll get to it soon enough, I hope. > You could either add things to the example with no error but that would probably only be productive if you had a good guess as to the cause. Apparently the guess that it might be the image resulted in no error. If you don't have a good guess, then work on removing code that causes the error. > If you've got other suggestions, let me know. The cause of the problem can be discovered by removing things from the document. Now back to that Ant buildfile... -- Garrett comp.lang.javascript FAQ: http://jibbering.com/faq/
First
|
Prev
|
Pages: 1 2 Prev: select options scrollIntoView in IE6 Next: Javascript vertical drag div areas - not quiet there |