Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Where im doing wrong in .cs file

Response.Write("" + ++xx + "
script:window.open(http://www.XYZ.com)><img src=paper1/q" + xx + ".png border=0 height=10 width=5 />
");

Output is an image and i want, on click, that icon get open in new window with original width and height.
Posted
Updated 7-Jan-15 21:25pm
v2
Comments
syed shanu 8-Jan-15 4:11am    
Can you explain what do you mean of Orizinal Size.What i assume is you need to pass your Image name as query string to popup window and in popwindow you can display the Image.
another option is in your page you can have DIV,Spam or what ever as you wish and by default its visible can be faluse and on Icon Click in the div you can display your large size image.

You need to specify other parameters for window.open. See here: http://www.w3schools.com/jsref/met_win_open.asp[^]
 
Share this answer
 
created a new aspx file with function of javascript in it. That's solved my problem.

Thanks all for the support
 
Share this answer
 
hi Try this function

function OpenMyImage() {
var isChrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;

var WindowObject = window.open('', '_blank ', 'width=816,height=1056,toolbars=no,scrollbars=yes,status=no,resizable=yes');

var strImages = "your Image path";
var strHtml = "<html>\n<body>\n" + strImages + "\n</body>\n</html>";
WindowObject.document.writeln(strHtml);
WindowObject.document.close();
WindowObject.focus();

if (isChrome == false) {
WindowObject.close();
}
else {
WindowObject.onload = function () {
WindowObject.close();
};
}
}
 
Share this answer
 
v2

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