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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:01:27+00:00 2026-06-10T08:01:27+00:00

Im having some problems with MVC3 and javascript I have a structure with a

  • 0

Im having some problems with MVC3 and javascript

I have a structure with a view, contaning a partial view, contaning a partial view.

  • View
    • Partial view 1
      • partial view 2

In Partial view 1 I have a jquery datatable. Setup for this is in a Javascript file. This file is imported from partial view 1 and working fine.

When clicking a row in this table, i load partial view 2, with 3 jquery datatable. They are all setup within the same function as the “click” action for first table.

For these 3 new tables I need a button. I would like the function for this “click” action to be placed within the same Javascript file. But this is the problem. If i include the javascript directly in Partial view 2, the button click works.

If i include it within the javascript file, it dosent react to the click.

I have a suspetion that its a scope issue, but scripts loaded for partial view 1, is also accessable for partial view 2, right?

  • 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-10T08:01:29+00:00Added an answer on June 10, 2026 at 8:01 am

    The click events for PV2 should be located in PV2, not PV1.
    Because when PV2 reloads and PV1 doesn’t, the click events won’t be recognised as the PV1 sees the buttons of PV2 as different ones.

    EDIT: So I believe you are right.

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

Sidebar

Related Questions

Im having some problems with binding in wpf/xaml. Have this simple file: <Window x:Class=test.Window1
I'm having some problems building an hierarchistic array structure - I have almost got
Having some problems with IE7 on jquery $.each, this gives me an Object does
I'm having some problems publishing an asp.net mvc3 application. When deployed, the application fails
Having some problems with the jQuery UI Dialog and using checkbox values within it.
Im having some problems understanding some code in a programme I have inherited. CGPoint
I am working on an mvc3 application and having some problems with getting validation
Having some problems figuring out the regex to match this: function Array() { [native
I having some problems implementing IOC using windsor. I have several different implementations of
I'm having some problems figuring out a solution to this problem. I want to

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.