WebmasterSite.net

Register | Forgot Password

Internet Explorer error
object expected ')' : javascriptheader

Version: 5.0.28
printPrint


Internet Explorer error
sparkalina
Forum Regular

Usergroup: Customer
Joined: Nov 25, 2003

Total Topics: 60
Total Posts: 180
Posted 01/07/09 - 10:08 AM:
quote post
#1
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
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California

Total Topics: 64
Total Posts: 7217
Posted 01/14/09 - 02:17 PM:
quote post
#2
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.

"Do things you love doing, because then it ain't work. Don't do something you don't really enjoy, because you're never going to work hard enough at it." - Bob Young, founder of Red Hat
sparkalina
Forum Regular

Usergroup: Customer
Joined: Nov 25, 2003

Total Topics: 60
Total Posts: 180
Posted 01/14/09 - 02:25 PM:
quote post
#3
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
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California

Total Topics: 64
Total Posts: 7217
Posted 01/20/09 - 01:19 AM:
quote post
#4
Solution:
<body<IF {SWITCH_MAP}> onload="if(typeof(load) == 'function'){load();}"
onunload="if(typeof(GUnload) == 'function'){GUnload();}"</IF>>

"Do things you love doing, because then it ain't work. Don't do something you don't really enjoy, because you're never going to work hard enough at it." - Bob Young, founder of Red Hat
Search thread for
Download thread as


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

WSN Links WSN Gallery WSN Knowledge Base WSN Forum WSN Classifieds WSN Directory WSN Software Directory