Connecting Tech Pros Worldwide Forums | Help | Site Map

Change action for delete confirmation

Member
 
Join Date: Aug 2007
Posts: 62
#1: Aug 27 '07
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.

JosAH's Avatar
Expert
 
Join Date: Mar 2007
Posts: 10,611
#2: Aug 27 '07

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
Lives Here
 
Join Date: Sep 2006
Posts: 12,070
#3: Aug 27 '07

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.
Lives Here
 
Join Date: Sep 2006
Posts: 12,070
#4: Aug 27 '07

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?
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#5: Aug 28 '07

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']; ?>";
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#6: Aug 28 '07

re: Change action for delete confirmation


Changed thread title. Please use a good thread title. Thanks!
Member
 
Join Date: Aug 2007
Posts: 62
#7: Aug 29 '07

re: Change action for delete confirmation


oh thank i will try this :-)
Reply