Jump to content
PHPJack77

Message Box With PHP

Recommended Posts

<?php echo "<script>alert('alert text')</script>";?>

Just curious, does that javascript still work in php if you have javascript disabled?

Share this post


Link to post
Share on other sites

no, all that does is make th content of the page be <script>alert('alert text')</script>

Share this post


Link to post
Share on other sites

Just came in mind that you could use VBScript to format the message box.

<html><body><?php print("<script type=\"text/vbscript\">msgbox(\"Warning, your computer hasn't allocated enough memory to display this message box. Click OK to continue\",16,\"Warning\")\n</script>");</body></html>

Share this post


Link to post
Share on other sites
Just came in mind that you could use VBScript to format the message box.
VB Script should never be used on the client side - only Internet Explorer supports it. Always use Javascript :)

Share this post


Link to post
Share on other sites

yeah, never use VBScript unless it is for writing ASP files. There is no other way to create a MessageBox, as far as I know, unfortunately it would not work with javascript disabled.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×