This is a migrated thread and some comments may be shown as answers.

Stack Overflow error

3 Answers 92 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Jug Stanovcic
Top achievements
Rank 1
Jug Stanovcic asked on 20 Oct 2008, 09:05 PM
When using the ASP.NET Ajax upload control, an alert box appears that reads "Stack Overflow: line 43".  The message appears after a user clicks the submit button to upload the files to the server. 

Do you have any idea why this may be occuring?

3 Answers, 1 is accepted

Sort by
0
Erjan Gavalji
Telerik team
answered on 21 Oct 2008, 07:21 AM
Hi Jug,

The alert box means that there is some JavaScript stack overflow exception happened. Does the page use some third party controls? Is it possible for you to send it to us, or better yet - isolate the problem to a new runnable website and send it to us? To ensure privacy file attachments are not allowed in the public forums. Please, open a formal support ticket to send the files to us.

Best regards,
Erjan Gavalji
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Jug Stanovcic
Top achievements
Rank 1
answered on 21 Oct 2008, 02:38 PM
I'm doing client side validation on a list box before I submit the page.  It seems like the page is trying to upload the files as soon as the button is clicked rather than when the form is submitted.  I run this script on the client side OnSubmit event of the form.  

function

 

CheckProducts()

 

{

 

var products = document.getElementById("lbProducts");

 

 

var isSelected = false;

 

 

 

for (var i = 0; i < products.options.length; i++)

 

{

 

if (products.options[i].selected)

 

{

isSelected =

true;

 

 

break;

 

}

}

 

 

if (isSelected)

 

{

<%=Page.GetPostBackEventReference(btnNewAnalysis as Control)%>;

}

 

else

 

{

alert(

"You must select at least one comparison product");

 

 

return false;

 

}

}

Even I return false it seems as if the page is trying to upload the files.  Is there a better way to do client side validation when using the upload control?

Thanks for your help

0
Jug Stanovcic
Top achievements
Rank 1
answered on 21 Oct 2008, 07:19 PM
I was able to get this working by using a CustomValidator
Tags
Upload (Obsolete)
Asked by
Jug Stanovcic
Top achievements
Rank 1
Answers by
Erjan Gavalji
Telerik team
Jug Stanovcic
Top achievements
Rank 1
Share this question
or