michellerobbins56
Programmer
For some reason when I click Cancel to the confirmation box that appears the page tries to reload. However it just hangs and eventually times out with a Page Cannot Be Displayed error with
"HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services"
Here is some detail about the error:
Error Type:
"Active Server Pages, ASP 0113 (0x80004005)
Te maximum amount of time for a script to execute was exceeded. You can change this limit by specifying a new value for the property Server.ScriptTimeout or by changing the value in the IIS administration tools."
Please can anyone tell me how I can simply allow the user to go back to the page they were on (i.e <%=strPageName%>)? I have tried using
window.location = "<%=strPageName%>"
But this doesn't work.
Thank you very much for any help. Here is the code (the first part of the code (if the user clicks OK) simply checks a form if a checkbox has been ticked - this all works fine, it is just the part of the code at the end if the user clicks cancel that causes the page to hang:
/*******************************************************/
function isCheckedQuoteBasket(f)
{
/**********************************************************
first confirm if user wishes to continue and submit the form
**********************************************************/
var response;
response = confirm("Please click OK to confirm your action.")
if(response) /*if ok is clicked*/
{
for (i = 0; i < f.elements.length; i ++)
{
if (f.elements.type == "checkbox" && f.elements.checked)
{
somethingChecked = true;
}
}
if(somethingChecked == false)
{
alert("Please select at least one item from the list");
}
return somethingChecked;
}
else /*cancel clicked*/
{
//window.location = "<%=strPageName%>"
alert("Cancel clicked"); /*HOW CAN I EXIT WITHOUT EVERYTHING CRASHING!*/
}
}
"HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services"
Here is some detail about the error:
Error Type:
"Active Server Pages, ASP 0113 (0x80004005)
Te maximum amount of time for a script to execute was exceeded. You can change this limit by specifying a new value for the property Server.ScriptTimeout or by changing the value in the IIS administration tools."
Please can anyone tell me how I can simply allow the user to go back to the page they were on (i.e <%=strPageName%>)? I have tried using
window.location = "<%=strPageName%>"
But this doesn't work.
Thank you very much for any help. Here is the code (the first part of the code (if the user clicks OK) simply checks a form if a checkbox has been ticked - this all works fine, it is just the part of the code at the end if the user clicks cancel that causes the page to hang:
/*******************************************************/
function isCheckedQuoteBasket(f)
{
/**********************************************************
first confirm if user wishes to continue and submit the form
**********************************************************/
var response;
response = confirm("Please click OK to confirm your action.")
if(response) /*if ok is clicked*/
{
for (i = 0; i < f.elements.length; i ++)
{
if (f.elements.type == "checkbox" && f.elements.checked)
{
somethingChecked = true;
}
}
if(somethingChecked == false)
{
alert("Please select at least one item from the list");
}
return somethingChecked;
}
else /*cancel clicked*/
{
//window.location = "<%=strPageName%>"
alert("Cancel clicked"); /*HOW CAN I EXIT WITHOUT EVERYTHING CRASHING!*/
}
}