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

The Archive Base Latest Questions

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

I am using asp.net mvc 2.0 and jquery validate 1.7 ( http://bassistance.de/jquery-plugins/jquery-plugin-validation/ ) What

  • 0

I am using asp.net mvc 2.0 and jquery validate 1.7 (http://bassistance.de/jquery-plugins/jquery-plugin-validation/)

What happens is this. A user can click on a link to edit a product. When a user clicks on which product they want to edit a jquery dialog box appears with a form of textboxes and dropdown lists.

These html controls have information filled in them. Say if the user chooses to edit the Ipad product a dialog will appear and one of the form textboxes will have “Ipad” in it.

Now this form gets rendered on the server side(the form is in a partial view). When loading the dialog box a ajax request is made to get that partial view and in the response part of the ajax call I do something like

$('#EditDialog).html(ajaxresponse).dialog({...});

So I would have something like this rendered in my dialog box

<form id="EditProduct">
Product Name: <input type="text"  value="IPad" name="ProductName" />
</form> 

Now my jquery validate would be something like this.

 $("#EditProduct").validate(
           {
               errorContainer: "#Errorbox",
               errorLabelContainer: "#Errorbox ul",
               wrapper: "li",
               rules:
               {
                   ProductName: "required"
               }
           });

So I know this works because I use the same validate for add product and if you try to leave ProductName blank it will show a validation error.

Now it does not work with the edit one though and I think I know the reason why but not how to fix it.

The value for the textbox is “IPad” this is how the Html.TextBoxFor() renders it. However if a user goes and changes the product name to “Iphone” or blank the value never changes. It is always “Ipad” in the html.

So I think when the validate goes and looks it goes oh there is a value already in it. It is valid even though in reality it might be blank.

When I post to the server through ajax it gets the right value and the server side validation stops it but my entire clientside validation is rendered useless because of this problem as it will never change the html.

  • 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-15T03:27:04+00:00Added an answer on May 15, 2026 at 3:27 am

    This doesn’t seem quite right!

    Imagine in the “add” case, the HTML you render looks something like this:

    <form id="AddProduct">
    Product Name: <input type="text"  value="" name="ProductName" />
    </form>
    

    So the “HTML” has a blank value, yet the validation plugin can correctly tell once ProductName has been filled?

    I’m not exactly sure what the issue is, but if you have a debugger (i.e. Firebug), try putting a break in the validation plugin, within the “check” function (~line 475 in 1.6). You should be able watch element.value to see if it has figured out the correct user-edited value.

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

Sidebar

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.