WebmasterSite.net

Internet Explorer error
object expected ')' : javascriptheader

Version: 5.0.28
URL:

PrintPrint


Internet Explorer error
sparkalina
Forum Regular

Usergroup: Customer
Joined: Nov 25, 2003

Total Topics: 69
Total Posts: 198
quote post #1
Posted 01/07/09 - 10:08 AM:

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
Avatar

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

Total Topics: 65
Total Posts: 7610
quote post #2
Posted 01/14/09 - 2: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 25, 2003

Total Topics: 69
Total Posts: 198
quote post #3
Posted 01/14/09 - 2: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
Avatar

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

Total Topics: 65
Total Posts: 7610
quote post #4
Posted 01/20/09 - 1: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


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