Start New Discussion within our Web Development Community

so i have a form, when user click the button 1st javascript runs, than php runs. so if user hit submit button a window pop ups which is created in javascript.

problem is that i only want to pop up window if it goes in here

else{ //***********pop up window here*****************************}

otherwise dont create pop up window.


    //check for error
        //no error
        //***********pop up window here*****************************
          <div id='dialog01' title='Shipping Time'>
            random text
<form method='POST' action='index.php'>
<input type='file' name='color'>
<button type='submit' id='opener01' name='button'>submit</button>


    $.fx.speeds._default = 500;
    $( "#dialog01" ).dialog({
        autoOpen: false,   //don't auto open
        show: "blind",    //how to open window
        hide: "explode",  //how to exit window
        width: 400,
        resizable: false,
        modal: true,
        buttons: {
            Cancel: function() {
                $( this ).dialog( "close" );

    $( "#opener01" ).click(function() {
          $( "#dialog01" ).dialog( "open" );
          return false;

any idea's? i really want to do error testing in php and not in js.

This article has been dead for over six months. Start a new discussion instead.