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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T18:36:15+00:00 2026-06-13T18:36:15+00:00

Couple of days ago I found some solution for my problem here on stack.

  • 0

Couple of days ago I found some solution for my problem here on stack. Here is the code:

HTML:

<a class="link" data-toggle="modal" href="link1.php" >Link 1</a>
<a class="link" data-toggle="modal" href="link2.php" >Link 2</a>
<a class="link" data-toggle="modal" href="link3.php" >Link 3</a>

<div class="modal hide fade" id="myModal"></div>

jQuery:

$("a.link").click(function(){
    $("#myModal").html($(this).attr("href")); 
    /*$("#myModal").load($(this).attr("href"));*/
    return false;
});​

But, this only works in Opera. In every other browser the link is never opened inside mymodal div.
FULL CODE HERE

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>

<style>
#prvidiv {
    width:360px;
    height: 220px;
    border: 1px;
    padding: 5px;
    font-family: cool_font, sans-serif;
    font-size:24px;
    color:#0000CC;
    background-color:transparent;
}
#levideookvir{
float:left;
width: 760px;
height:800px;
margin-right:0px;
margin-top: 0px;

}
</style>
<script src="jqery/jquery.min.js"></script>

</head>

<body>
<script language="javascript">
 $(document).ready(function() {
  $("a.link").click(function(e){
        $("#levideookvir").html($(this).attr("href")); 
       $("#levideookvir").load($(this).attr("href"));
       window.alert('Request complete');
         e.preventDefault();

  })
 });​
    </script>

<div id="prvidiv">
Ovde ide link<br />
<a class="link" href="test2.html">Klikni me</a><br />
</div>
<div id="levideookvir" >OVDE REY</div>

</body>
</html>

As its strange…I dont even get ALERT that I define when run this script in Chrome, Safari or FF.
As I said…only work in opera.

  • 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-13T18:36:16+00:00Added an answer on June 13, 2026 at 6:36 pm

    jQuery’s .html() method accepts only a HTML string as the parameter. You have the correct syntax in your code, but it’s commented out.

    Here’s what you need (if I understood the question correctly):

    $("a.link").click(function(e) {
        $("#myModal").load($(this).attr("href"));
        e.preventDefault();
    });​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've experienced a couple of days ago, that a problem with the name of
I came across a subtle bug a couple of days ago where the code
A couple of days ago I had to investigate a problem where my application
I had a problem a couple of days ago where I was getting a
A couple of days ago , I was practicing and I wrote some triggers
I've asked a question here couple days ago, about how to avoid a function
I stepped on the following piece of code a couple days ago and I
$j(.context-menu).livequery(function(){ alert('found'); }); This was working until a couple of days ago. It just
I'm a totally newbie in class writing in PHP, started a couple days ago.
I have a problem with IE7, i just noticed couple days ago that my

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.