Connecting Tech Pros Worldwide Help | Site Map

Change action for delete confirmation

  #1  
Old August 27th, 2007, 08:20 PM
Member
 
Join Date: Aug 2007
Posts: 62
In my site i use the DHTML confirm delete instead of window confirm box.
Everything work fine...because i use the other action page.

But how can i manage it if i want to use the action page as

Expand|Select|Wrap|Line Numbers
  1. <?php echo $_SERVER['PHP_SELF'] ?>
because i cant do that ...
i know i have to change the javascript some little line from this

Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">function ConfirmDelInbox(ver) { 
  2. if (ver) {
  3.     window.location = "<? echo "delmsg.php?delete[=$id_msg&username=$id"; ?>";
  4. } else {
  5.     return false;
  6. }
  7. </script>
  8.  

i think i have to name the form and in javascript i have to write something about .document
But i dont know about this....please help me.

Last edited by gits; August 27th, 2007 at 08:57 PM. Reason: added code tags
  #2  
Old August 27th, 2007, 08:25 PM
JosAH's Avatar
Expert
 
Join Date: Mar 2007
Posts: 10,634
Provided Answers: 2

re: Change action for delete confirmation


Do you realize that you just posted your question in the enemy camp? This is the
Java Forum which has nothing to do with Javascript; no matter their names. I'll
move your question over to a Javascript forum; please extinguish your cigarette,
fasten your seatbelt and hold tight. There you go ;-)

kind regards,

Jos
  #3  
Old August 27th, 2007, 08:28 PM
Administrator
 
Join Date: Sep 2006
Posts: 12,084

re: Change action for delete confirmation


Quote:
Originally Posted by paitoon
In my site i use the DHTML confirm delete instead of window confirm box.
Everything work fine...because i use the other action page.

But how can i manage it if i want to use the action page as

Expand|Select|Wrap|Line Numbers
  1. <?php echo $_SERVER['PHP_SELF'] ?>
because i cant do that ...
i know i have to change the javascript some little line from this

Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">function ConfirmDelInbox(ver) { 
  2. if (ver) {
  3.     window.location = "<? echo "delmsg.php?delete[=$id_msg&username=$id"; ?>";
  4. } else {
  5.     return false;
  6. }
  7. </script>
  8.  

i think i have to name the form and in javascript i have to write something about .document
But i dont know about this....please help me.
Well you posted this in the Java forum and Java has nothing to do with any of that.
I've moved it to the PHP forum for now.

Last edited by gits; August 27th, 2007 at 08:58 PM. Reason: added code tags
  #4  
Old August 27th, 2007, 08:30 PM
Administrator
 
Join Date: Sep 2006
Posts: 12,084

re: Change action for delete confirmation


Quote:
Originally Posted by JosAH
Do you realize that you just posted your question in the enemy camp? This is the
Java Forum which has nothing to do with Javascript; no matter their names. I'll
move your question over to a Javascript forum; please extinguish your cigarette,
fasten your seatbelt and hold tight. There you go ;-)

kind regards,

Jos
Apparently this thread is quite a bone of contention.
Shall we toss a coin to decide where to move it to?
  #5  
Old August 28th, 2007, 11:39 AM
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,521
Provided Answers: 12

re: Change action for delete confirmation


paitoon, on line 3, replace the php with:
Expand|Select|Wrap|Line Numbers
  1. window.location.href = "<?php echo $_SERVER['PHP_SELF']; ?>";
  #6  
Old August 28th, 2007, 11:43 AM
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,521
Provided Answers: 12

re: Change action for delete confirmation


Changed thread title. Please use a good thread title. Thanks!
  #7  
Old August 29th, 2007, 07:33 PM
Member
 
Join Date: Aug 2007
Posts: 62

re: Change action for delete confirmation


oh thank i will try this :-)
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
Javascript Server-side Action Questions.. den 2005 answers 6 October 10th, 2006 04:15 PM
Preferred method for SQL in VBA tricard@gmail.com answers 2 August 25th, 2006 02:25 PM
Runtime acc2000 asks to confirm (at delete, insert etc.) Remco Groot Beumer answers 2 November 13th, 2005 02:24 AM
javascript confirm delete neoconwannabe answers 2 July 23rd, 2005 04:06 PM