Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

179
Views
JQuery popup not show up, only displaying DIV on screen

I have a very small jquery script to popup when there is an error from inputted data. Sometimes it works, but most times I just get the errors output on the screen. A simple javascript alert box works fine.

I am using a contentEditable table which uses JQuery and it works fine. JQuery is above my pay grade so not sure what to do. I have read tons of articles on this until my eyes bled but nothing I could find on this exact issue.

This is the popup code: $error is something like - Please enter your name....

          <link rel="stylesheet" href="//code.jquery.com/ui/1.13.1/themes/base/jquery-ui.css">
      <script src="https://code.jquery.com/jquery-3.6.0.js"></script>
      <script src="https://code.jquery.com/ui/1.13.1/jquery-ui.js"></script>
    
      <script>
      $( function() {
        $( "#dialog" ).dialog();
      } );
      </script>  
        
     <div id="dialog" title="Please correct the following errors!">
        <p><?php echo $error; ?></p>
     </div> 

This is the inline JQuery script which works fine.

$("#btnSaveAction").on("click",function(){
params = ""
$("td[contentEditable='true']").each(function(){
    if($(this).text() != "") {
        if(params != "") {
            params += "&";
        }
        params += $(this).data('id')+"="+$(this).text();
    }
});
if(params!="") {
    $.ajax({
        url: "insert-row.php",
        type: "POST",
        data:params,
        success: function(response){
          $("#ajax-response").append(response);
          $("td[contentEditable='true']").text("");
        }
    });
}

});

Not sure what other info I can add, let me know. This is not online.

Thanks

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!