Okay, I am going to try and make this as simple, and understandable as possible...
I have a page that when you open it, a confirmation appears(voila!). What I would like to know how to do is, how do you allow the person to continue to the page when he clicks OK. When he clicks Cancel, how do you send him to an alert that says Have a nice day!, then send him to the last page he was at..
here is what I have for the code (not much, so that's why I asked you people.. )
<script language="JavaScript">
var enter=window.confirm("Enter? \n\n Click okay to enter. \n Click cancel to return to the previous page. \n\n Either way, you were given a choice.");
// alert(" Welcome to ... "); is for the OK
// alert(" Have a nice day! "); is for the CANCEL
// I have no idea what goes in here for the OK alert to
// redirection, and CANCEL alert to previous page
// I don't know if I should use onClicks, or some other form of JS
// I hope that somebody does...
</script>
I have a page that when you open it, a confirmation appears(voila!). What I would like to know how to do is, how do you allow the person to continue to the page when he clicks OK. When he clicks Cancel, how do you send him to an alert that says Have a nice day!, then send him to the last page he was at..
here is what I have for the code (not much, so that's why I asked you people.. )
<script language="JavaScript">
var enter=window.confirm("Enter? \n\n Click okay to enter. \n Click cancel to return to the previous page. \n\n Either way, you were given a choice.");
// alert(" Welcome to ... "); is for the OK
// alert(" Have a nice day! "); is for the CANCEL
// I have no idea what goes in here for the OK alert to
// redirection, and CANCEL alert to previous page
// I don't know if I should use onClicks, or some other form of JS
// I hope that somebody does...
</script>
Comment