Forum Moderators: coopster

Message Too Old, No Replies

PHP equivalent of Javascript alert() and confirm()

         

bubone2

6:28 pm on Nov 10, 2004 (gmt 0)

10+ Year Member



Hello all,

Are there PHP equivalents to the Javascript popup functions of alert() and confirm()? Also, is there maybe a site that deals with this sort of thing (comparing PHP and Javascript functions).

It's not a real bother to call a Javascript function inline with php, but why do it if there are equivalents in PHP.

Thanks,
Josh

ergophobe

6:50 pm on Nov 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Josh,

Creating popups and alert boxes is a client-side action. JS is usually run client side. PHP, however, is a server-side language, so it can't create a popup or alert box.

As for equivalents between JS and PHP, many basics of the syntax are similar, but anything that is client-side, is not going to have an equivalent in PHP.

Tom

bubone2

7:20 pm on Nov 10, 2004 (gmt 0)

10+ Year Member



ok thanks. I guess I didn't realize that Javascript was client side.

Thanks again,
josh