CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   JavaScript programming (http://www.codingforums.com/forumdisplay.php?f=2)
-   -   Need help with script with window.open, script works in seamonkey but not in IE 8 (http://www.codingforums.com/showthread.php?t=188943)

Terranbeastsam 02-10-2010 03:01 PM

Need help with script with window.open, script works in seamonkey but not in IE 8
 
I have a script that works in seamonkey(my html editor) but when I use it in IE8 it says errors happen.
Here's the code (the first line is on line 7 of the html file):
Code:

<script type="text/javascript">
function enlarge(imageNum)
{
var numToString = "";
if(parseInt(imageNum) < 10){
numToString = "0" + imageNum;
}
else
{
numToString = imageNum + "";
}
window.open("images/LgScreenshot"+numToString+".jpg","Screenshot "+imageNum,"status=0,height=675,width=900,resizable=0");
}
</script>

And the errors:
Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; GTB0.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; InfoPath.3; .NET CLR 3.0.30729)
Timestamp: Wed, 10 Feb 2010 14:58:16 UTC


Message: Object expected
Line: 150
Char: 1
Code: 0
URI: http://samssc2site.co.cc/Features.html


Message: Invalid argument.
Line: 18
Char: 1
Code: 0
URI: http://samssc2site.co.cc/Features.html

Spudhead 02-10-2010 03:41 PM

I don't think IE likes the space in the window name.

Terranbeastsam 02-10-2010 06:30 PM

the space isn't the problem, i removed it and it is still not working, just new errors. If you need the entire html code I can give it to you

hdewantara 02-14-2010 08:26 PM

I think your runslideshow() is undefined.

Terranbeastsam 02-14-2010 09:21 PM

Thanks, it works now:)


All times are GMT +1. The time now is 05:53 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.