Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need a simple confirmation dialog box example

Status
Not open for further replies.

awingnut

Programmer
Feb 24, 2003
759
US
Can someone point me to an example of a simple confirmation dialog box (YES/NO). Everything I found has been way too complicated. Thanks.
 
In PHP? You could setup a simple HTML form which the user hits one of two buttons then that information is submitted back to the server, which processes the yes/no and does what it needs. But from your description I'm thinking you might be better served by Javascript.

-Rob
 
OK. Javascript. Something else new to learn. :)
Thanks.
 
One more question before I leave this thread. Isn't Javascript another server side function like PHP? My server does not have Javascript.

I think my only option is a "simple" HTML form. I put simple in "" because I have never dynamically opened a new browser window nor passed values between windows.
 
Javascript is client side, for the most part you can assume y our users have it... but that's not 100%, I know AOL for example used to have javascript issues, and I know IE 6 still have javascript issues, most things will work there, but they don't strictly implement the standard.

Some people will disable it as some sites use javascript to do nefarious things, like pop open a gazillion windows, or make it difficult to exit their page.

But for the most part, most people have IE or Opera or a Mozilla variant, and they all support most of the javascript standard.

forum216

should help you

-Rob
 
Well, you can embed JavaScript into PHP.
Try do this:
echo '
<script>
confirm(&quot;Do you want to proceed to the next page?&quot;);
</script>';

I think JavaScript is a client side because it goes to your browser. You don't need to install anything. I believe it's already support with html.

Otherwise, you can make a confirmation page with yes/no.
Think about html submission. You use a form, where has input elements, like submit button that process function for the Yes part and a button that do function for No part. Hopefully you get the idea.


--
Mike FN
&quot;8 out of 10 Owners who Expressed a Preference said Their Cats Preferred Web Programmer.&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top