Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4624870
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T03:11:29+00:00 2026-05-22T03:11:29+00:00

In the jQuery ‘ready’ block, I have: // bind print work order button to

  • 0

In the jQuery ‘ready’ block, I have:

// bind print work order button to form submit
$('#print_work_order_button').click(function(){
    $('#print_work_order_form').submit();
});

… and in the HTML (ignore the variable replacement code… it’s working fine):

<form id="print_work_order_form" method="post" action="<TMPL_VAR NAME=SCRIPT_NAME>" target="_blank">
<input type="hidden" name="action" value="printWorkOrder">
<input type="hidden" name="case_id" value="<TMPL_VAR NAME=ID>">
<input type="hidden" name="session_id" value="<TMPL_VAR NAME=SESSION_ID>">
</form>

However, when I click the following button:

<input id="print_work_order_button" type="button" value="Print Work Order">

… a different form gets submitted. The form that gets submitted is case_form, which is being validated in the jQuery ready block as well:

// validate main form
$('#case_form').validate({
    debug: false,
    rules: {
        phone: {
            phoneUS: true,
            required: true
        }
        [more rules etc...]
    },
    messages: {
        phone: '555-555-5555',
        client_group_id: 'X',
        description: 'X',
        backup_data: 'X',
        first_name: 'X',
        last_name: 'X',
        email: 'X'
    },
    invalidHandler: function(form, validator) {
        var errors = validator.numberOfInvalids();
        if (errors) {
            var message = errors == 1
                ? 'You missed 1 field.'
                : 'You missed ' + errors + ' fields.';
            displayMessage(message);
        } 
    },
    submitHandler: function(form) {
        displayMessage('Saving and syncing with Remedy... we appreciate your patience.', '1');
        form.submit();
    }
});

My only recent change was moving this validate routine into the ‘ready’ block, so I think that’s the problem but I don’t know how to fix. I need validate in the ‘ready’ block in order for that to work… so how do I fix my other, unrelated form submit?

NOTE: oddly, this appears to be a Safari-only bug. I cannot reproduce in any other browser yet.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T03:11:30+00:00Added an answer on May 22, 2026 at 3:11 am

    Can you use a submit button instead?

    <form id="print_work_order_form" method="post" action="<TMPL_VAR NAME=SCRIPT_NAME>" target="_blank">
    <input type="hidden" name="action" value="printWorkOrder">
    <input type="hidden" name="case_id" value="<TMPL_VAR NAME=ID>">
    <input type="hidden" name="session_id" value="<TMPL_VAR NAME=SESSION_ID>">
    
    <input id="print_work_order_button" type="submit" value="Print Work Order">
    
    </form>
    
     $('#print_work_order_form').submit();
    

    or

    $('#print_work_order_form').validate();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Jquery has a great language construct that looks like this: $(document).ready(function() { $(a).click(function() {
Using jQuery, how do you bind a click event to a table cell (below,
jQuery(a).not(div#mnuMain a).live(click, function(event){ event.preventDefault(); alert(yes I got u); }); How to make it work?
jQuery(function ($) { /* fetch elements and stop form event */ $(form.follow-form).submit(function (e) {
jQuery's draggable functionality doesn't seem to work on tables (in FF3 or Safari). It's
Using jQuery, what's the best way to find the next form element on the
jQuery return links are not working. I have Used jQuery and the basic Ajax
jQuery $.ajax() does not seem to work correctly with IE8 but it is working
I've found several jQuery syntaxes for nullifying the enter on a form. First one:
I have a snippet to create a 'Like' button for our news site: <iframe

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.