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

233
Views
jQuery and livequery error on javascript code not executing?

I have some very old javascript code on an existing site and I wanted to update it, but I'm running into errors and I'm not sure what to replace it with. The code is just part of a section where it does a .submit() call to the form. Then the code reaches the try condition, it throws the error that livequery is not a function. Code is also below the screenshot.

Also I'm not sure if the "var form" is outside the scope of the try for form to work or not. What could I have wrong here?

enter image description here

var submit = false;
var form = $("#webform-client-form-2")[0];
try {
  if (repair) {
    console.log('repair is true - line 317');
    $(".simple-dialog").click();
    $(".ui-dialog, .ui-widget-overlay").hide();
    $(".form-actions").livequery(function() {
      console.log('livequery - line 321');
      $("#edit-submitted-name").val(subject_field);
      $("#edit-submitted-phone").val(phone);
      $("#edit-submitted-email").val(email);
      $("#edit-submitted-details-of-issue").val(problem);
      var find = $(".form-actions")[0]; //get the 1st form actions on the page. if more than 2 forms on page, this might submit wrong form.
      if (!submit && find) {
        console.log('repair is true - line 328');
        submit = true;
        $("#webform-client-form-2").submit();
        $(".form-actions").expire();
        return false;
      }
    });
  } else if (contact) {
  console.log('yyy');
  console.log(form);
    $("#edit-submitted-phone-number").val(phone);
    $("#edit-submitted-message").val(problem);
    $(form).submit();
  } else {
  console.log('zzz');
    $(form).submit();
  }
} catch (error) {
  console.log(error);
  console.log("no form - line 346");
}
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!