![]() |
Confirmation box help :(
hello guys im confuse, what is the error in my code
i want to create a dialog box that if the user click true, the user will be directed to an another page but if false it will stay on the current page here is my code: Code:
<script type="text/javascript"> |
You'll have to understand that your PHP code will already be finished when Javascript is running. So if you put PHP code into your Javascript conditional, it won't do anything at run time because it will already have been evaluated and executed at page creation time.
You can do the redirection with Javascript only, though Code:
function show_confirm() |
Quote:
|
You also need to get rid of the confirm() call - it only continues to exist so it can be used for debugging scripts - in most browsers it will display an extra checkbox to either turn off all subsequent alert/confirm/prompt dialogs when the second such dialog is displayed. In at least one browser it always displays an extra checkbox allowing JavaScript to be turned off completely for the current web page every time it displays.
|
| All times are GMT +1. The time now is 06:46 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.