How can I display jQuery dialog only for matched result??

How can I display jQuery dialog only for matched result??

Hello,

I have create my simple PHP webpage and the following is my problem.

My PHP page request 1 QueryString named "Result". I would like to show the Dialog after page loaded only when Result value equal to 1. For others, no dialog appears.

How can I do this? Already tried the following code but it doesn't works. Please advice.


Thank you very much

  1. if ($_REQUEST["Result"] == 1)
    {
    echo '<script type="text/javascript" language="javascript">$("#dialog-form-congrat").dialog( "open" );</script>';
    }