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

  • Home
  • SEARCH
  • 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 6731701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:33:37+00:00 2026-05-26T10:33:37+00:00

I am using jquery dialog to display my form and I use MVC 3

  • 0

I am using jquery dialog to display my form and I use MVC 3 unobtrusive client side validation on the form. Currently if user click on the Cancel button and the close icon: (x) button, the validation message will be shown.

It is weird since user might accidentally open a dialog and want to just close it, but the validation message shown beside those [Required] field is kind of annoying and funny.

I got no idea how to “control” this 2 buttons. I include the script which I initialize the buttons in my dialog here too:

     //Load food form into dialog
    var controllerUrl = '/Stock/GetFoodForm';
    var $createdialog = $('#createfooddialog').load(controllerUrl).dialog({
        autoOpen: false,
        title: 'Create Food',
        modal: true,
        width: 'auto'
    });

    $createdialog.dialog("option", "buttons", {
        "Cancel": function () {
            //alert('Cancel');
            $createdialog.dialog('close');
        },
        "Submit": function () {
            submitForm();
        }
     });

Hope can get some help here… Appreciate it…

  • 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-26T10:33:38+00:00Added an answer on May 26, 2026 at 10:33 am

    I am now cancelled the eager effect of client side validation, so after click submit only user will see the message. I still cant find any solution for this yet

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

Sidebar

Related Questions

I am using jquery ui dialog box to display a form.When i click on
I've got a form that is using jQuery validation. When the user clicks the
I am using jquery ui dialog to display form. Unfortunately, this function clears hidden
I am doing form submission and validation using jQuery and from server side I
How to prompt browser to display open/save dialog box using jquery?
Using jQuery's dialog I came across the following quirk (tested in FF3): User selects
I'm trying to display a modal form using jquery ui. I've adapted an example
I am using jQuery-UI dialog in modal modal mode to display several Edit forms
I am using dialog to display a form and echo back message on submission.
I'm using jQuery UI Dialog control to display a pop-up on hover of a

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.