Connecting Tech Pros Worldwide Help | Site Map

Change action for delete confirmation

 
LinkBack Thread Tools Search this Thread
  #1  
Old August 27th, 2007, 07:20 PM
Member
 
Join Date: Aug 2007
Posts: 62
Default Change action for delete confirmation

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 07:57 PM. Reason: added code tags
Reply
  #2  
Old August 27th, 2007, 07:25 PM
JosAH's Avatar
Moderator
 
Join Date: Mar 2007
Location: Voorschoten, the Netherlands
Age: 52
Posts: 10,038
Default

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
Reply
  #3  
Old August 27th, 2007, 07:28 PM
Administrator
 
Join Date: Sep 2006
Posts: 11,940
Default

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 07:58 PM. Reason: added code tags
Reply
  #4  
Old August 27th, 2007, 07:30 PM
Administrator
 
Join Date: Sep 2006
Posts: 11,940
Default

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?
Reply
  #5  
Old August 28th, 2007, 10:39 AM
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,232
Default

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

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

oh thank i will try this :-)
Reply
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search


Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.