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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:19:46+00:00 2026-06-16T03:19:46+00:00

I am using twitter bootstrap modal with a remoteurl to load in a partial

  • 0

I am using twitter bootstrap modal with a remoteurl to load in a partial view; in this case for a reset password form.

I am using the MVC model binding and have set the data annotations on the model to enable the client side validation to occur in the partial view.

This however does not fire the client side validation. I get the server side validation which is fine, but for some reason when this form is within the modal it does not invoke the client side validation.

The jquery validation and bootstrap scripts are referenced in the main page which contains the modal.

I have however added the jquery and jquery validation script references to the end of the partial view, and doing this does ensure the client side validation is invoked.

Why is it necessary for these scripts to be included within the parital view which is loaded into the modal?

As it works this way I would have been happy to leave it, but doing so causes me another problem with the twitter bootstrap modal when I need to dynamically load different remoteUrls.

When the jquery scripts are referenced in the partial view too, the modal will fire the first time, but then subsequent times I get an error. I know it is the jquery references causing a problem as if
I remove them, although I don’t get the client side validation, I can open the modal multiple times without any problems.

The code I am using to invoke the modal is found from internet searches to try and get the modal to refresh the modal body for different remoteurls passed to it.

$('#mymodal').removeData('modal');
$('#mymodal').modal({ remote: self.remoteUrl, keyboard: true });

The error I then get is on firing this for the second time $(‘#mymodal’).modal is null. but it will always work the first time. As detailed above, I believe this to be because of the jquery script references in the partial view.

Does anyone have an thoughts on either of these two problems.

  • 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-16T03:19:48+00:00Added an answer on June 16, 2026 at 3:19 am

    The only way I seemed to be able to get this to work in the end was when the partial view was loaded to call the following:

    $('#frmName').removeData("validator");
    $('#frmName').removeData("unobtrusiveValidation");
    $.validator.unobtrusive.parse('#frmName');
    

    This seemed to invoke the client side validation for me.

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

Sidebar

Related Questions

I was looking to using the Twitter Bootstrap Modal windows as a partial view.
I'm asking about using a Twitter Bootstrap modal window with a Rails form helper
I found this link Link to another page using Twitter Bootstrap jquery modal in
I am using the modal component within the Twitter Bootstrap package. This modal opens
I'm using twitter bootstrap's modal window to load a remote image <a href=assets/500x300.gif data-target=#image-preview
I'm using Twitter's Bootstrap modal functionality . When someone clicks submit on my form,
I'm using Twitter Bootstrap modal window functionality. When someone clicks submit on my form,
I am creating a modal window using Twitter Bootstrap. The default behavior is if
I am using Twitter Bootstrap, (CSS and JS). The problem comes from the Modal
I am using a Twitter Bootstrap Modal and Youtube Video on the same page.

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.