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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatic Alert box

Status
Not open for further replies.

bobrivers2003

Technical User
Oct 28, 2005
96
GB
Is it possible to automatically generate an alert box from php without using either onClick() or onLoad() functions?

for($counter=1; $counter<10; $counter+=1){
echo $counter;
alert('Alert');
}

This obviously doesn't work but is there something that does?


Many Thanks
 
You must keep in mind that PHP runs on the server, not the client. That means that PHP can't directly cause a dialog box to open on the browser like JavaScript of VBScript can.

The only participation PHP can have in the process is to output some JavaScript or VBScript that can be interpreted on the browser side and make the browser open the dialog.


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top