Click here to Skip to main content
15,895,084 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
VB
Now the image is shown on the page but I want to show the image in a new window using jquery , in asp.net app.please help me.


jquery:

XML
<script type="text/javascript" language="ecmascript">

      function ShowBiggerImage(obj) {

          document.getElementById("imgdiv").style.visibility = "visible";
          document.getElementById("imgdiv").innerHTML = "<img src='" + obj.src + "'+'width=640 height=480' >";
          document.getElementById("imgdiv").style.left = event.clientX;
          document.getElementById("imgdiv").style.top = event.clientY;

          document.getElementById("imgdiv").style.zIndex = "0";

      }
      function ShowDefaultImage(obj) {
          document.getElementById("imgdiv").innerHTML = "";
          document.getElementById("imgdiv").style.visibility = "hidden";
      }


  </script>
Posted
Comments
Nilesh Patil Kolhapur 3-Aug-12 2:46am    
can u show html source to get better solution?
vino2012 3-Aug-12 3:13am    
need clarification on "showing image on new window"

1 solution

Hi,

try Like This
XML
<!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>
<script type="text/javascript">

function image() {
    var img = document.createElement("IMG");
    img.src = "img/dir.gif";
    document.getElementById('image').appendChild(img);
}
</script>
</head>

<body>
<div id="image"></div>
<div><a href="javascript:image();">click to see image</a></div>
</body>
</html>


hope it Helps you
Best Luck
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900