is there a way to resize the window to the new width and height and Xpos and Ypos and reload it to show the new image ???
is there a shorter way to achieve this:
<script language="JavaScript" type="text/JavaScript">
<!--
function largeView(dir,img,W,H){
var base = "http://www.angelfire.com/";
var sbase = "/images/shirow/shirow"
var dirStr = new Array();
dirStr[1] = base + "gundam/tallgeese1" + sbase + img + ".jpg";
dirStr[2] = base + "anime4/shirow1" + sbase + img + ".jpg";
var imgStr = '\" width=\"' + W + '\" height=\"' + H + '\" border=\"0\">';
var sw = (screen.availWidth - W) / 2;
var sh = (screen.availHeight - H) / 2;
var x = Math.floor(sw);
var y = Math.floor(sh);
if (W >= screen.width && H >= screen.availHeight) {
winSet = "height=" + (screen.height - 57) + " width=" + (screen.width - 9) + " top=0 left=0 scrollbars=yes";
}
else if (W >= screen.width) {
winSet = "height=" + (H + 16) + " width=" + (screen.width - 9) + " top=" + y + " left=0 scrollbars=yes";
}
else if (H >= screen.height) {
winSet = "height=" + (screen.height - 57) + " width=" + (W + 16) + " top=0 left=" + x + " scrollbars=yes";
}
else if (W <= screen.width && H <= screen.availHeight) {
winSet = "height=" + H + " width=" + W + " top=" + y + " left=" + x;
}
if (dir == 1){
rtnStr = dirStr[1];
}
else if (dir == 2){
rtnStr = dirStr[2];
}
var str = window.open('#','largeView',winSet);
str.document.write('<html><head><title>ANIMESHRINE1134 IMAGE GALLERY<\/title><\/head><body style=\"margin:0px;\">');
str.document.write('<img src=http://www.webdeveloper.com/forum/archive/index.php/\"' + rtnStr + imgStr);
str.document.write('<\/body><\/html>');
}
//-->
</script>
thanks
is there a shorter way to achieve this:
<script language="JavaScript" type="text/JavaScript">
<!--
function largeView(dir,img,W,H){
var base = "http://www.angelfire.com/";
var sbase = "/images/shirow/shirow"
var dirStr = new Array();
dirStr[1] = base + "gundam/tallgeese1" + sbase + img + ".jpg";
dirStr[2] = base + "anime4/shirow1" + sbase + img + ".jpg";
var imgStr = '\" width=\"' + W + '\" height=\"' + H + '\" border=\"0\">';
var sw = (screen.availWidth - W) / 2;
var sh = (screen.availHeight - H) / 2;
var x = Math.floor(sw);
var y = Math.floor(sh);
if (W >= screen.width && H >= screen.availHeight) {
winSet = "height=" + (screen.height - 57) + " width=" + (screen.width - 9) + " top=0 left=0 scrollbars=yes";
}
else if (W >= screen.width) {
winSet = "height=" + (H + 16) + " width=" + (screen.width - 9) + " top=" + y + " left=0 scrollbars=yes";
}
else if (H >= screen.height) {
winSet = "height=" + (screen.height - 57) + " width=" + (W + 16) + " top=0 left=" + x + " scrollbars=yes";
}
else if (W <= screen.width && H <= screen.availHeight) {
winSet = "height=" + H + " width=" + W + " top=" + y + " left=" + x;
}
if (dir == 1){
rtnStr = dirStr[1];
}
else if (dir == 2){
rtnStr = dirStr[2];
}
var str = window.open('#','largeView',winSet);
str.document.write('<html><head><title>ANIMESHRINE1134 IMAGE GALLERY<\/title><\/head><body style=\"margin:0px;\">');
str.document.write('<img src=http://www.webdeveloper.com/forum/archive/index.php/\"' + rtnStr + imgStr);
str.document.write('<\/body><\/html>');
}
//-->
</script>
thanks