Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-10-2010, 03:01 PM   PM User | #1
Terranbeastsam
New to the CF scene

 
Join Date: Feb 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Terranbeastsam is an unknown quantity at this point
Question 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
Terranbeastsam is offline   Reply With Quote
Old 02-10-2010, 03:41 PM   PM User | #2
Spudhead
Senior Coder

 
Spudhead's Avatar
 
Join Date: Jun 2002
Location: London, UK
Posts: 1,856
Thanks: 8
Thanked 110 Times in 109 Posts
Spudhead is on a distinguished road
I don't think IE likes the space in the window name.
Spudhead is offline   Reply With Quote
Old 02-10-2010, 06:30 PM   PM User | #3
Terranbeastsam
New to the CF scene

 
Join Date: Feb 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Terranbeastsam is an unknown quantity at this point
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

Last edited by Terranbeastsam; 02-12-2010 at 02:06 AM.. Reason: forgot something
Terranbeastsam is offline   Reply With Quote
Old 02-14-2010, 08:26 PM   PM User | #4
hdewantara
Regular Coder

 
hdewantara's Avatar
 
Join Date: Aug 2009
Location: Jakarta, Indonesia.
Posts: 287
Thanks: 4
Thanked 39 Times in 39 Posts
hdewantara is an unknown quantity at this point
I think your runslideshow() is undefined.
hdewantara is offline   Reply With Quote
Old 02-14-2010, 09:21 PM   PM User | #5
Terranbeastsam
New to the CF scene

 
Join Date: Feb 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Terranbeastsam is an unknown quantity at this point
Thumbs up

Thanks, it works now
Terranbeastsam is offline   Reply With Quote
Reply

Bookmarks

Tags
errors, internet explorer, javascript, seamonkey, window.open

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:04 PM.


Advertisement
Log in to turn off these ads.