Opened 8 years ago

Closed 8 years ago

#12743 closed defect (worksforme)

The problem about dynamically inject the widget

Reported by: tbbt Owned by: bill
Priority: high Milestone: tbd
Component: Parser Version: 1.6.0
Keywords: parser Cc:
Blocked By: Blocking:

Description

When I dynamically inject the widget into the page. The console will print error like below:

====================================== [object Error]

Error parsing in _ContentSetter#Setter_dijit_TitlePane_0_pane_0[object Error] Error undefined running custom onLoad code: This deferred has already been resolved

==========================================

I test it with IE8, Chrome(10.0.648.205) , FireFox? 3.6.16 with dojo1.6, this bug only happens in the IE8.

please refer to the attached source code

Attachments (2)

test3.jsp (2.5 KB) - added by tbbt 8 years ago.
source code for dynamically inject the widget
test3.html (2.4 KB) - added by bill 8 years ago.
change test to plain html, remove "var" for declaring global variable

Download all attachments as: .zip

Change History (5)

Changed 8 years ago by tbbt

Attachment: test3.jsp added

source code for dynamically inject the widget

comment:1 Changed 8 years ago by tbbt

Could somebody tells me what's the milestone of the fix or is there a workaround for this bug

comment:2 Changed 8 years ago by tbbt

I found a workaround. just declare the report div as "dojox.layout.ContentPane?". Once xhrget returns, set the returned html to the content of contentPane. like the following:

dijit.byId('report').set('content', response.htmloutput );

It works in three browsers

Changed 8 years ago by bill

Attachment: test3.html added

change test to plain html, remove "var" for declaring global variable

comment:3 Changed 8 years ago by bill

Resolution: worksforme
Status: newclosed

OK, glad you found a workaround, I fixed a "var" in your test case that shouldn't be there and it works for me on IE8 against 1.6, and trunk.

Note: See TracTickets for help on using tickets.