mmathis32
asked on
Syntax Javascript error
I have the following script in my file:
I don't see what's wrong. Can anyone give me some help?
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Organization",
"url": "http://www.hotislandspots.com",
"logo": "http://www.hotislandspots.com/assets/images/res/ak_logo.png"
"contactPoint" : [
{ "@type" : "ContactPoint", "telephone" : "+1-888-xxx-xxxx" } ] }
"sameAs" : [ "https://www.facebook.com/hotislandspots",
"https://www.youtube.com/user/hotislandspots",
"https://www.pinterest.com/hotislandspots",
"https://twitter.com/hotislandspots",
"https://instagram.com/hotislandspots"]
}
</script>
I am getting a syntax error on the line that reads "@context": "http://schema.org",I don't see what's wrong. Can anyone give me some help?
ASKER
it still says the same thing.
change <script type="application/ld+json" > to just <script>
I'm not seeing the error.
I'm not seeing the error.
Here is what i mean... you can see that it outputs the object successfully to the console: http://jsbin.com/tugiha/1/edit?js,console
ASKER
Still says the same thing. I added a [ at the beginning of line ["@context": "http://schema.org", and it still says the same thing.
Did you see the jsbin i posted?
All you're doing by adding a [ is making an array.
What's the context of this? I need to see more of your code to know what's going on, because as you can see by the jsbin link, there's nothing wrong with the revised code I posted above.
All you're doing by adding a [ is making an array.
What's the context of this? I need to see more of your code to know what's going on, because as you can see by the jsbin link, there's nothing wrong with the revised code I posted above.
ASKER
Maybe it's a dreamweaver thing. IT says code hinting may not work until you fix this error.
ASKER
Yes I saw your jsbin. Thanks so much!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
OK THANKS! YOU HELP HAS BEEN INVALUABLE!
No problem! thanks for the points :)
ASKER
ur welcome
Here is the updated code:
Open in new window