#1670 closed defect (invalid)
Error: ReferenceError: [methodName] is not defined
Reported by: | Owned by: | mumme | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Widgets | Version: | 0.3 |
Keywords: | ReferenceError | Cc: | |
Blocked By: | Blocking: |
Description
A content pane that recieves its content on the fly does not find inner scripts throwing error:
[Exception... "'Error: ReferenceError?: [methodName] is not defined' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "<unknown>" data: no]
It follows test page as attachment
Attachments (1)
Change History (4)
Changed 14 years ago by
Attachment: | swapMethod.rar added |
---|
comment:1 Changed 14 years ago by
Owner: | changed from bill to mumme |
---|
comment:2 Changed 14 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Thank you José for this extensive testcase.
However It does work as intended, agreed it might be tricky understand how scripts work when they are set from a remote resource.
First you need to turn on scripts by setting executeScripts="true" in your main ContentPane?, second you need to point your eventhandler to your main ContentPane? scriptScope, by changing
onHide="damnitTwo(false)" to onHide="scriptScope.damnitTwo(false)"
In 0.4 you can also make all remotescript eval in global scope by setting scriptSeparation="false"
When I change your contentpane declaration tag to
<div dojoType="ContentPane" id="main" style="width: 320px; height: 480px;" executeScripts='true' scriptSeparation="false">
and leave the rest it works with 0.4
The flicker/hiding you experience from content below the accordion pane has to do with the style="overflow: scroll;"
I think you should open a separete bug on this one, it is much easier to track that way.
/ Fredrik
It contains test pages to reproduce the error