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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:15:16+00:00 2026-05-24T03:15:16+00:00

I am using jquery dialog to submit a form to a db and what

  • 0

I am using jquery dialog to submit a form to a db and what I would like to do, is, on the beforeclose function, fire an alert to show what they submiited. Problem, is that I am getting ‘box’ undefined in firebug. I assumed that the variables would work in my code, but obviously not. I would be grateful if someone could check my code to see where I made the error. I shall only post the code thats relevant. Thanks

beforeclose: function (event, ui) {
                jAlert("You have successfully editted\n\rBox: "+box+"\n\r"+
                           "Status: "+status+"\n\r"+
                           "Size: "+size+"\n\r", 'Box addittion successfull');
                $("#f2").html("");
            }

The .click part

$('#EB_submit').click(function () {

            var submit = $('#EB_submit').val();
            var status = $('#EB_status').val();
            var id = $('#EB_id').val();
            var box = $('#EB_custref').val();
            var size = $('#EB_size').val();
            var service = $('#EB_service :selected').text();
            var address = $('#EB_address :selected').text();
            var data = 'submit=' + submit +
                       '&id=' + id +
                       '&status=' + status +
                       '&box=' + box +
                       '&size=' + size;
  • 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-24T03:15:18+00:00Added an answer on May 24, 2026 at 3:15 am

    Based on what you posted, the var ‘box’ is local to the click function and unavailable to the dialog function.

    var box;
    
    $('#EB_submit').click(function () {
    
            var submit = $('#EB_submit').val();
            var status = $('#EB_status').val();
            var id = $('#EB_id').val();
            box = $('#EB_custref').val();
    

    Here is a fiddle: http://jsfiddle.net/mwUjv/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i'm using ajax form jquery plugin to submit a form (in a dialog) via
I have a problem with using jQuery Dialog and Ajax submit in JSF. I
I am using the following code to show a jQuery UI dialog when the
I have a jQuery Dialog form and on submit I'm trying to validate the
I'm trying to do a confirm dialog using jquery, but the form doesn't get
I am using jquery ui dialog box to display a form.When i click on
I'd like to use jQuery's dialog to replace some code I'm using right now
Scenario: Using jquery form plugin . The form appears in a dialog, created with
I am using JQuery to submit a form with $.ajax() and then get the
I am using jQuery .dialog() in my code. In dialog i am having Form.

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.