Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SCRIPT5039: Redeclaration of const property - IE 9 Javascript issue

I have been trying to make my site cross browser compatiable.

At the moment Im having issues with my javascript IE Developer console gives me the following error:

SCRIPT5039: Redeclaration of const property 
banner.js, line 1 character 1

This is line one:

var linkTemplate = new Template('<b>Time/Date:</b> #{time} #{date} (GMT)<br /><b>Username:</b> <a href="profile.php?p=#{username}" target="main">#{username}</a> <br /><b>Inbox:</b> <a href="inbox.php" target="main">#{unread}/#{inbox}</a><br /><b>Money:</b> &#163;#{money}<br /><b>Location:</b> #{location}<br /><b>Bullets:</b> #{bullets}<br /><b>Kevlars:</b> #{kevlars}<br /><b>Rank:</b> #{rank} - #{rank_percent}%');
var username, hours, minutes, seconds, messages, unread, date, money, location, bullets, kevlars, rank, rank_percent, avatar, backup ;
var ps;

If you want to see the whole javascript: http://www.gbmafia.com/static/js/banner.js

Thanks for reading :)

like image 767
Bradley Roberts Avatar asked Dec 06 '25 03:12

Bradley Roberts


1 Answers

the variable location on line 2 is conflicting with the built-in variable window.location

pick another name for that variable

like image 66
Andrew Brock Avatar answered Dec 08 '25 17:12

Andrew Brock



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!