Login or Sign up Help | Site Map
Connecting Tech Pros Worldwide

Change action for delete confirmation

Question posted by: paitoon (Member) on August 27th, 2007 07:20 PM
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

Code: ( text )
  1. <?php echo $_SERVER['PHP_SELF'] ?>

because i cant do that ...
i know i have to change the javascript some little line from this

Code: ( text )
  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>



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
Would you like to answer this question?
Sign up for a free account, or Login (if you're already a member).
JosAH's Avatar
JosAH
Chief Editor
7,530 Posts
August 27th, 2007
07:25 PM
#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

Reply
r035198x's Avatar
r035198x
Administrator
10,651 Posts
August 27th, 2007
07:28 PM
#3

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

Code: ( text )
  1. <?php echo $_SERVER['PHP_SELF'] ?>

because i cant do that ...
i know i have to change the javascript some little line from this

Code: ( text )
  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>



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
r035198x's Avatar
r035198x
Administrator
10,651 Posts
August 27th, 2007
07:30 PM
#4

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?

Reply
acoder's Avatar
acoder
Site Moderator
11,000 Posts
August 28th, 2007
10:39 AM
#5

Re: Change action for delete confirmation
paitoon, on line 3, replace the php with:
Code: ( text )
  1. window.location.href = "<?php echo $_SERVER['PHP_SELF']; ?>";

Reply
acoder's Avatar
acoder
Site Moderator
11,000 Posts
August 28th, 2007
10:43 AM
#6

Re: Change action for delete confirmation
Changed thread title. Please use a good thread title. Thanks!

Reply
paitoon's Avatar
paitoon
Member
62 Posts
August 29th, 2007
06:33 PM
#7

Re: Change action for delete confirmation
oh thank i will try this :-)

Reply
Reply
Not the answer you were looking for? Post your question . . .
184,216 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Latest Articles: Read & Comment
Top Javascript / DHTML / Ajax Forum Contributors