Welcome Guest Search | Active Topics | Sign In | Register

Problem calling ClientSideOnChange with AjaxUploader in Chrome Options
Chris
Posted: Friday, December 6, 2013 4:21:19 PM
Rank: Newbie
Groups: Member

Joined: 12/6/2013
Posts: 4
I just tried out the AjaxUploader and it works ok in IE but in Chrome it doesn't seem to execute the ClientSideOnChange function. I'm calling a very simple function from ClientSideOnChange to enable/disable a button and have added alerts to check it. The alerts display in IE but not Chrome so it appears that the function isn't being called at all. This is the function:

function EnableButton(uploader) {
if (uploader.getTotalBytes(uploader)>0) {
document.getElementById('mySubmitButon').disabled = false;
alert('Enable got hit!');
}
else {
document.getElementById('mySubmitButon').disabled = true;
alert('Disable got hit!');
}
}

Any ideas???
eo_support
Posted: Friday, December 6, 2013 6:38:32 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

Please check if your function is defined before or after the Uploader. If it is after the uploader, please try to move it before the uploader and see if it works for you.

Thanks!
Chris
Posted: Monday, December 9, 2013 2:36:19 PM
Rank: Newbie
Groups: Member

Joined: 12/6/2013
Posts: 4
It doesn't matter where I place the function, the results are the same. I have tried putting it in the head and in the body before the AjaxUploader and it doesn't seem to make any difference. Again this function works in IE, but not Chrome.
eo_support
Posted: Monday, December 9, 2013 10:50:47 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

Please check whether you are using the latest version. We tested this with the latest version and it seems to work fine. Make sure you only use the function name when you set the property (ClientSideOnChange="EnableButton", not ClientSideOnChange="EnableButton()").

Also you do not need to pass uploader as an argument when you call getTotalBytes because that function does not accept any argument:

http://www.essentialobjects.com/doc/1/jsdoc.public.ajaxuploader.gettotalbytes.aspx

If the problem continues, please try to isolate the problem into a test page and post the test page. Once we have that we will try to run it here to see if we can reproduce the problem.

Thanks!
Chris
Posted: Wednesday, December 11, 2013 5:25:05 PM
Rank: Newbie
Groups: Member

Joined: 12/6/2013
Posts: 4
Ok, I just determined the problem and it has nothing to do with your controls. It's because the different browsers are handling the name of my button differently. The function above does not have my real button name, but the name is a long combination as ASP.NET does with controls embedded several master pages deep. My apologies for wasting your time. So far I have used several controls and they all work great!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.