Click here to Skip to main content
16,012,166 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How can i set another web page to current webpage by using 'ok' button in alert message?
Posted
Comments
Sandeep Mewara 13-Jul-12 2:28am    
Elaborate more.
Do you say, there will be an alert window on click of which page would navigate? Share the flow and scenario you are trying to implement.
_Amy 13-Jul-12 2:28am    
Your question is not clear.. Can you please elaborate it?
Vani Kulkarni 13-Jul-12 2:31am    
Please elaborate. Are you trying to say that you want to redirect to another web page on click of Javascript OK button?

1 solution

You cannot handle the ok button by using an event handler.
However, you can still capture the ok button's click event by using code in Javascript.

Here is an example -

JavaScript
var r = confirm("Press a button");
if (r==true)
  {
  x="You pressed OK!";
  }
else
  {
  x="You pressed Cancel!";
  }
 
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