Webmastersite.net
Register Log In

Internet Explorer error
object expected ')' : javascriptheader

Comments on Internet Explorer error

sparkalina
Forum Regular

Usergroup: Customer
Joined: Nov 26, 2003

Total Topics: 70
Total Comments: 211
Posted Jan 07, 2009 - 12:08 PM:

I am getting an object expected ')' error on IE 7 and after debugging I found the culprit is somewhere in here:


function updatestate(country)
{
if (country.value == {DEFAULTCOUNTRY})
{
document.getElementById('americanstate').style.display = "block";
document.getElementById('foreignstate').style.display = "none";
}
else
{
document.getElementById('americanstate').style.display = "none";
document.getElementById('foreignstate').style.display = "block";
}
}


The debugger that ie has seems to be pointing here:


document.getElementById('americanstate').style.display = "block";
document.getElementById('foreignstate').style.display = "none";


but I can't be sure.

I don't use the country field so I've temporarily removed it to get rid of the error.

-----------------

onunload="GUnload()" for the google maps also causes an ie script error if it is shown on any page that doesn't have a map, but I can fix that with a conditional.


Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Jan 14, 2009 - 4:17 PM:

This is fixed in the next release.

onunload="GUnload()" for the google maps also causes an ie script error if it is shown on any page that doesn't have a map, but I can fix that with a conditional.

It's already conditionalized.
sparkalina
Forum Regular

Usergroup: Customer
Joined: Nov 26, 2003

Total Topics: 70
Total Comments: 211
Posted Jan 14, 2009 - 4:25 PM:

Oh yes, as written it's conditionalized, but IE doesn't care, it still throws a javascript error up unless I only include onunload="GUnload()" on the pages with maps.

Thanks!
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Jan 20, 2009 - 3:19 AM:

Solution:
<body<IF {SWITCH_MAP}> onload="if(typeof(load) == 'function'){load();}"
onunload="if(typeof(GUnload) == 'function'){GUnload();}"</IF>>
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.