JavaScript Error “˜expected identifier, string or number’ in Internet Explorer (IE)

Yesterday my friend come across a javascript error “expected identifier, string or number” in internet explorer (IE). The same code was running great in Mozilla and chrome. here the snap of code causing an error:

var horizontalTab = {
"MyProducts" :  [
					{
						"ImageName" : "my_products.png",
						"SelectedImageName" : "my_products_selected.png",
						"HoverImageName" : "myProductsHowerbottom.png"
					}
				],
"MyTeam" :  [
				{
					"ImageName" : "my-team-white_bottom.png",
					"SelectedImageName" : "my-team-bottom.png",
					"HoverImageName" : "myTeamBottomHover.png"
				}
			],
"MyFinance" :   [
					{
						"ImageName" : "finance_white-legal-Bottom.png",
						"SelectedImageName" : "finance-legal-bottom.png",
						"HoverImageName" : "FinancenLegalHoverBottom.png"
					}
				],
			 }

The javascript debugger displayed the error on function which does not have to do anything with actual cause. Luckily we observed the line 22, extra comma present at last declaration in JSON was causing this error.

I hope this article will help lots of people if they came across same problem and save hours.

Posted

in

by


Related Posts

Comments

5 responses to “JavaScript Error “˜expected identifier, string or number’ in Internet Explorer (IE)”

  1. Ed Avatar
    Ed

    Hi,

    I have the message

    Error”expected Identifier, string or number coming up.

    Line 93
    Char 6
    Code 0

    url clkads.com/adserve/static/btgen-ie-im.html?
    Tid= swim01

    Unfortunately, I’m no computer whiz and wouldn’t know where to begin to look for this or how to fix it. Also unfortunately, I’m not rolling in money! So, I was wondering if someone here might know where I could get step by step directions on how to cure this issue.

    It asks me if I would like to continue, I answer yes and am able to continue but as we all know, it’s terribly annoying to deal with continually. Any help would be greatly appreciated.

    Thank you,

    Ed

  2. khalid Elmamoun Avatar
    khalid Elmamoun

    I have the message

    erro;ToolbarAds manageris undefined
    line45
    char3
    code0
    URL http//clkads.com/visicom/s1.html?tid=1mtb1

  3. khalid Elmamoun Avatar
    khalid Elmamoun

    I have the message
    line:45
    char:3
    error,ToolbarAds Manager is undefiend
    Code:0
    URL:http//clkads.com/visicom/sI1.htmI?tid=IMTBI

    It asks me if I would like to continue, I answer yes and am able to continue but as we all know, it’s terribly annoying to deal with continually. Any help would be greatly appreciated.

    thank you

    Khalid

  4. khalid Elmamoun Avatar
    khalid Elmamoun

    I have the message
    line:1
    char:20830
    error,object expected
    code:0
    URL:http// content.clkads.com/script/tbecome_1.0.5 is

    It asks me if I would like to continue, I answer yes and am able to continue but as we all know, it’s terribly annoying to deal with continually. Any help would be greatly appreciated.

    thank you

    Khalid

  5. Tom Avatar
    Tom

    Dude, you ROCK. thank you!!!! Saved me a huge headache. -tom

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from Jitendra Zaa

Subscribe now to keep reading and get access to the full archive.

Continue Reading