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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T15:24:21+00:00 2026-06-02T15:24:21+00:00

Hi i am developing an application inMVc3 I have a model containing Hobbyname Hobbyurl

  • 0

Hi i am developing an application inMVc3
I have a model containing

Hobbyname 
Hobbyurl

I have drawn a table and in the first column i fetch all the hobbynames and display it as a link.
Hobbyurl contains the url of a page associated with the Hobbyname
Now when i click the Hobbyname from lefthand side i want the contents to be loaded in the right side i use an Iframe to display the contents so i need the Iframe to be loaded again and again on click.

To fetch the Hobbynames i used the foll code:

 <td>
 <ul>
  @foreach (var item in Model)
  {
   <li> @Html.ActionLink(item.HobbyName, "Hobbies")</li>
  }
 </ul>
 </td>
 <td>
 <div>
 <iframe id="iframe"></iframe>
 </div>
 </td>

and Here is the script:

<script type="text/javascript">
$('a').click(function () {
    $('iframe').attr('src', "/HobbyHomes/Test");
}); 
</script>

But i am not able to load the Iframe on click of the link.
Please help me

  • 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-02T15:24:22+00:00Added an answer on June 2, 2026 at 3:24 pm

    your probably wanting to attach your onclick after the dom is loaded, like so

    <script type="text/javascript">
    $(document).ready(function(){
      $('a').click(function (e) {
        e.preventDefault();
        $('iframe').attr('src', "/HobbyHomes/Test");
      }); 
    });
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing application using backbone.js & jquery. I have following code in model: runReport:
I am developing application using phonegap in eclipse for android .I have created folder
I am developing application in N-Tier Architecture. as we all know that we need
I'm developing application using VC++ 6. I have a 3rd party DLL. This library
i am developing an application in mvc3. I have two dropdowns and on the
I'm developing application with NHibernate EntityMode.Map so I have entities of IDictionary without cs
I am developing application for .Epub extension file reader.I have source code available. But
i am developing application which point towards the particular location, i have calculate angle
i am developing application and i have set some html control which are runat=server
i m developing application in which i have to change the background image on

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.