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 7842751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T16:23:39+00:00 2026-06-02T16:23:39+00:00

My Aim – User enters ClientName into autocomplete and selects ClientName. On selection, Apply

  • 0

My Aim – User enters ClientName into autocomplete and selects ClientName. On selection, Apply button gets enabled.

On Apply button click, submit ClientName and ClientId to different PHP page.

My Problem – All works Ok, but does not redirect/post to the page url in the form action.

Can anyone help, many thanks.

$(function() {
 $("#btnCancelId").button();
     $("#btnApplyId").button();
     $('#btnApplyId').attr('disabled', true);
 $("#btnAddId").button();
     $('#btnAddId').click(function() {$divDialog.dialog('open'); return false;});

     $('#txtClientName').bind('keyup', function() {
 $('#txtClientId').val('');
 $('#txtClientId').css({'background-color': '#FFC0C0'});
 $("#btnApplyId:eq(0)").addClass("ui-state-disabled").attr("disabled", true);
  });

    var $divDialog = $('#divDialog');
    $divDialog.dialog({
  autoOpen: false,
  modal: true,
  title: 'Company name',
  buttons: [{
     id: 'btnCancelId',
     text: 'Cancel',
     click: function() {$divDialog.dialog('close');}
     },{
      id: 'btnApplyId',
      text: 'Apply',
      disabled: true,
      click: function() {
        $('#divDialog').submit();
    //    $divDialog.dialog('close');
     }
     }]
 });

    $("#txtClientName").autocomplete({
      source: "_ajcustlist.php",
      minLength: 2,
      select: function(event, ui) {
   $("#btnApplyId:eq(0)").removeClass("ui-state-disabled").attr("disabled", false);
            $('#txtClientId').val(ui.item.id);}
    });
});

The Html code is –

<div id="divDialog">
  <form id="client_form" name="client_form" method="post" action="editinv.php">
   <input type="text" id="txtClientName" name="txtClientName" />
   <input type='text' id='txtClientId' name='txtClientId' style='display:none'/>
  </form>
</div>
  • 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-06-02T16:23:41+00:00Added an answer on June 2, 2026 at 4:23 pm

    The click event in your dialog action button is wrong. It’s currently trying to submit a div ($('#divDialog')) instead of the form ($('#client_form')) within the div.

    Change:

    click: function() {
        $('#divDialog').submit();
        //    $divDialog.dialog('close');
    }}]
    

    to:

    click: function() {
        $('#client_form').submit();
        //    $divDialog.dialog('close');
    }}]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically my aim is to have this timer reset whenever the user presses button
hi i am integrating authorize.net AIM api into my shopping cart. i have a
What I can do: I aim to create a view where a User Control
My aim is to create an application whereby a user can drag a label
My aim is that when the user clicks the row which has a particular
Aim: to create user friendly web interface to linux program without any ssh (console)
My Aim: To be able to add/amend the content inside my content editable user
my aim is to put a dropdown list into a cell. var obj =
AIM : Convert a resultset to XML and assign the result to a variable
Aim The aim is to a have a container DIV with a fixed height

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.