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

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -