|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
I have a confirmation message in my system (run in Nestcape/ie). And after the user click OK to confirm, I want the submit button automatically clicked on javascript.
|
|
#2
|
|||
|
|||
|
The best way to do this is to make a function that handles everything. This function would: 1) Pop up your confirmation box 2) Assemble the URL / query string to go to (if necessary) 3) Send the client there with a self.location.href type redirect Good luck. |
|
#3
|
|||
|
|||
|
Thanks for your answering, JSchoof.
But my problem is, I have a number of value from my database and it will be post to next page. And for your information, before I popup the confirmation message I make a database query for checking if the new equipment is already exist or not (the confirmation message is to ask to user that he want to continue the movement process or cancel that and back to back page). |
|
#4
|
|||
|
|||
|
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>function go_ahead_or_not(){
user_choice = confirm("Do you want to continue?"); if(user_choice == true){ document.form.submit(); // or if your form has a name, use document.form_name.submit(); } else{ //pseudocode :} whatever_else_you_want_to_do } } [/code] [This message has been edited by rycamor (edited September 26, 2000).] |
|
#5
|
|||
|
|||
|
Ok ! My system is already success.
thanks rycamor. |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > autoclick button for submit |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|