Solved

Syntax error

Posted on 2013-12-18
4
369 Views
Last Modified: 2013-12-18
Hi- BBB gave us this code to use, but dreamweaver says there is a syntax error, It says the error is on the line that reads:unescape('%2Flogo%2Fmagickitchencom-1000001150.js') +

code below, any idea where the problem lies?

<a id="bbblink" class="ruhzbum" 
href="http://www.bbb.org/sanjose/business-reviews/food-
products/magickitchencom-in-los-altos-ca-1000001150#bbbseal" 
title="MagicKitchen.com, Food Products, Los Altos, CA" style="display: 
block;position: relative;overflow: hidden; width: 150px; height: 68px; 
margin: 0px; padding: 0px;"><img style="padding: 0px; border: none;" 
id="bbblinkimg" src="http://seal-
sanjose.bbb.org/logo/ruhzbum/magickitchencom-1000001150.png" 
width="300" height="68" alt="MagicKitchen.com, Food Products, Los Altos, 
CA" /></a><script type="text/javascript">var bbbprotocol = ( ("https:" == 
document.location.protocol) ? "https://" : "http://" ); document.write
(unescape("%3Cscript src='" + bbbprotocol + 'seal-sanjose.bbb.org' + 
unescape('%2Flogo%2Fmagickitchencom-1000001150.js') + "' 
type='text/javascript'%3E%3C/script%3E"));</script>

Open in new window

0
Comment
Question by:mel200
  • 2
4 Comments
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39727416
Just place it on your site. It will work regardless of what dreamweaver shows.  http://jsbin.com/AXaSEdo/1/edit?html,output
0
 

Author Comment

by:mel200
ID: 39727899
I did, and it works, but I don't want it interfering with anything else, or slowing down my site or anything. Can we discover why it is showing a syntax error? Thanks.
0
 
LVL 35

Accepted Solution

by:
Robert Schutt earned 500 total points
ID: 39728113
Put a backslash at the end of line 13, it makes the string literal valid (in Firebug).
<a id="bbblink" class="ruhzbum" 
href="http://www.bbb.org/sanjose/business-reviews/food-
products/magickitchencom-in-los-altos-ca-1000001150#bbbseal" 
title="MagicKitchen.com, Food Products, Los Altos, CA" style="display: 
block;position: relative;overflow: hidden; width: 150px; height: 68px; 
margin: 0px; padding: 0px;"><img style="padding: 0px; border: none;" 
id="bbblinkimg" src="http://seal-
sanjose.bbb.org/logo/ruhzbum/magickitchencom-1000001150.png" 
width="300" height="68" alt="MagicKitchen.com, Food Products, Los Altos, 
CA" /></a><script type="text/javascript">var bbbprotocol = ( ("https:" == 
document.location.protocol) ? "https://" : "http://" ); document.write
(unescape("%3Cscript src='" + bbbprotocol + 'seal-sanjose.bbb.org' + 
unescape('%2Flogo%2Fmagickitchencom-1000001150.js') + "' \
type='text/javascript'%3E%3C/script%3E"));</script>

Open in new window

0
 

Author Closing Comment

by:mel200
ID: 39728146
Perfect, thanks!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now