#14936 closed defect (invalid)
[regression] dijit.layout.ContentPane onDownloadStart will cause an error
Reported by: | milad | Owned by: | milad |
---|---|---|---|
Priority: | undecided | Milestone: | tbd |
Component: | Dijit | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
hi all if i put onDownloadStart attr on dijit.layout.ContentPane?,it will cause an error: Uncaught TypeError?: Cannot read property 'domNode' of undefined
Attachments (1)
Change History (6)
Changed 9 years ago by
comment:1 Changed 9 years ago by
Owner: | set to milad |
---|---|
Status: | new → pending |
comment:2 Changed 9 years ago by
Status: | pending → new |
---|
hi
you right,if i connect it work fine.
but if my function return string this issue still happen.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html dir="ltr"> <head> <script src="dojo172/dojo/dojo.js" djConfig="parseOnLoad: true"> </script> <script type="text/javascript"> dojo.require("dijit.layout.TabContainer"); dojo.require("dijit.layout.ContentPane"); </script> <link rel="stylesheet" type="text/css" href="dojo172/dijit/themes/claro/claro.css"/> <script> function myFunc(arg){ return arg; } </script> </head> <body class="claro"> <div> <div doLayout="false" tabPosition="top" dojoType="dijit.layout.TabContainer" style="width: 1020px;overflow:auto;"> <div dojoType="dijit.layout.ContentPane" title="tab0"> hello<br/> hello<br/> hello<br/> hello<br/> hello<br/> hello<br/> hello<br/> hello<br/> hello<br/> hello<br/> </div> <div onDownloadStart="myFunc('action')" href="tab.php" preventCache="true" dojoType="dijit.layout.ContentPane" title="tab1"></div> </div> </div> </body> </html>
sorry for my poor language;
comment:3 Changed 9 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Your language is fine but there's a problem with your code. You still aren't returning a value. You are effectively doing:
onDownloadStart = function(){ myFunc('action'); }
Hopefully you can see that the anonymous outer function isn't returning any value, regardless of what myFunc does.
You could just say in the markup:
onDownloadStart="return 'hi';"
to make it work.
comment:4 Changed 9 years ago by
i will not insist on my opinion,but can you test my first example with dojo 1.5.2?
comment:5 Changed 9 years ago by
OK, I tried on 1.5, and it works there, but still, it was always specified that you needed to return a string from that onDownloadStart method.
Well, according to the documentation that method needs to return a string:
So, please update your test case to do that and let us know if there's still a problem.
Alternately, maybe you want to connect to that method instead of overriding it: