AntonioChiancone / dropthings

Automatically exported from code.google.com/p/dropthings
0 stars 0 forks source link

DropThingsUI undefined error #238

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Place the following script in a widget

<script type="text/javascript">
function timedRefresh(timeoutPeriod) { 
setTimeout("__doPostBack('WidgetBodyUpdatePanel', '');", 10000);} 
timedRefresh();
</script>

Produces DropThingsUI is undefined error on post back.

What version of the product are you using? On what operating system?
DropThings version 2.7.6
IE 9
VS 2010
Windows 7

Original issue reported on code.google.com by war...@warrent.co.nz on 11 Apr 2012 at 5:52

GoogleCodeExporter commented 8 years ago
Please run the Setup page from /Setup/Default.aspx and see if the configuration 
is correct.

Original comment by omaralzabir@gmail.com on 24 Jul 2012 at 11:07

GoogleCodeExporter commented 8 years ago
That was the first thing tried, no problems detected.

Original comment by war...@warrent.co.nz on 24 Jul 2012 at 11:37

GoogleCodeExporter commented 8 years ago
Can you show me the exact error message?

One thing, your error message says DropThings, but the class name is 
Dropthings. No capital T.

Original comment by omaralzabir@gmail.com on 24 Jul 2012 at 11:41

GoogleCodeExporter commented 8 years ago
Screen capture with error attached.

Original comment by war...@warrent.co.nz on 25 Jul 2012 at 1:52

Attachments:

GoogleCodeExporter commented 8 years ago
Can you please check if this script block is appearing before the <script> tag 
that loads MyFramework.js?

Original comment by omaralzabir@gmail.com on 26 Jul 2012 at 12:43

GoogleCodeExporter commented 8 years ago
I looked at the page source and the __doPostBack is before the <script> tag to 
load myframework.js, same as all the other __doPostBack calls.

I've attached the TestWidget files.

Original comment by war...@warrent.co.nz on 26 Jul 2012 at 4:10

Attachments:

GoogleCodeExporter commented 8 years ago
Most likely the timer is firing before the MyFramework.js gets loaded and thus 
it fails. 

I suggest you put a check to ensure DropthingsUI is defined before calling 
__doPostBack.

also there's no ref to DropthingsUI in the script. I am surprised it is 
happening because of this block of script. Maybe it is happening for something 
else?

Original comment by omaralzabir@gmail.com on 26 Jul 2012 at 9:14

GoogleCodeExporter commented 8 years ago
I've simplified the demo by creating a blank widget and adding a single control:

<input type="button" value="Display timed alertbox!" 
onclick="__doPostBack(this.controlID, '')" />

The post back etc all works fine, TestWidget.Page_Load is called as expected, 
the undefined error happens somewhere when the page is being redisplayed. I 
can't see where DropthingUI becomes undefined during the process. DropthingsUI 
doesn't become undefined when 'Add Stuff', widget 'Edit' and the like are used.

Original comment by war...@warrent.co.nz on 27 Jul 2012 at 2:05