echoing a jquery alert popup in php -
i want display pop-up alert box upon condition in php being satisfied. like:
echo "<script type="text/javascript"> alert('bleh'); </script>";
except using custom jquery alert box. possible??
i've tried like:
echo "<script src="http://code.jquery.com/jquery-1.9.1.js"></script> <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script> <link rel="stylesheet" href="/resources/demos/style.css" /> <script> $(function() { $( "#dialog-message" ).dialog({ modal: true, buttons: { ok: function() { $( ).dialog( "close" ); } } }); }); </script>";
but gives me weird effect. not pop up.
thanks interest.
echo <<<eod <script src="http://code.jquery.com/jquery-1.9.1.js"></script> <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script> <link rel="stylesheet" href="/resources/demos/style.css" /> <script> $("#dialog-message").dialog({ modal: true, buttons: { ok: function() { $( ).dialog( "close" ); } } }); </script> eod;
Comments
Post a Comment