Click here to Skip to main content
15,886,963 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Friends,

I have created input form and when user submit some data,
I want to display a alert msg as "Data Submitted Successfully" and redirect to some page.

I have used like this.
XML
<script language="javascript">
alert("Data Submitted Successfully ")
window.navigate("interview_mis.asp")
</script>


Alert is displayed but redirection of page is not working in Chrome.

if I use as
XML
<script language="javascript">
    alert("Updated Successfully...")
    </script>
    Response.redirect("page.asp")

Page is Redirected but alert is not displayed.

Kindly suggest what to use for both alert msg and redirect of page in classic asp.
Posted
Updated 24-Sep-18 13:53pm
Comments
Bryian Tan 5-Sep-12 11:47am    
have you try window.location = "interview_mis.asp"; ?
Arunprasath Natarajan 5-Sep-12 11:54am    
Sorry, Its not working...
Bryian Tan 5-Sep-12 12:20pm    
how about window.location.href = "interview_mis.asp"; ? either way it should work. What the error message?
Arunprasath Natarajan 6-Sep-12 4:42am    
There is No Error. If I use window.location or window.navigate I am facing the problem in other browser like crome, it does not redirect.
If I use Response.Redirect then alert msg is not displayed.
I want Both Alert msg and page should redirected.

1 solution

Hi,
You can use something like this.

alert("Updated Successfully...");window.location.href="/KB/answers/yourpage.asp"


This will both pop up the alert message and redirect to yourpage.asp.

Thanks.
Regards,
Roshan Karki
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900