Jump to content


Photo

How do you implement php popup warning?


  • Please log in to reply
2 replies to this topic

#1 ngubie

ngubie
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 29 September 2006 - 04:25 PM

Hi,

I'm trying to implement a popup warning similar to when a file exists in windows. When you copy a file into the a folder with another file of the same name, a popup appears asking if you are sure you want to overwrite the file.
is there anyway to do that in php? or is there a similar alternative out there?

Thanks

#2 counterbeing

counterbeing
  • New Members
  • Pip
  • Newbie
  • 7 posts

Posted 29 September 2006 - 08:44 PM

Let me preface this by saying: I know very little.

I do think what you're describing is possible by using mostly javascript. Here is a site that details using alerts with cancel button.
http://www.jsmadeeas...indow/index.htm

#3 RyanSmith345

RyanSmith345
  • Members
  • PipPip
  • Member
  • 11 posts
  • LocationFort Collins, CO

Posted 29 September 2006 - 08:57 PM

Ya, your looking for JavaScript:



if(confirm('Are you sure you want to do this?')) {
  document.getElementById('myForm').submit();
}

Looks like it won't let me insert the script around this, but you get the jist




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users