Solved

Syntax Error

Posted on 2016-10-31
6
30 Views
Last Modified: 2016-10-31
I'm getting a syntax error on this line....

<script type="text/javascript">baseUrl = '{$url}'; token_id = '{$token_id}'; nowPlaying = viewed_id = 0; player_volume = {$volume};</script>

Open in new window

0
Comment
Question by:DS928
6 Comments
 
LVL 17

Expert Comment

by:Pawan Kumar Khowal
ID: 41867095
Try..
<script type="text/javascript">
baseUrl = '{$url}'; token_id = '{$token_id}'; nowPlaying = 0; viewed_id = 0; player_volume = {$volume};
</script>
0
 
LVL 22

Accepted Solution

by:
Snarf0001 earned 500 total points
ID: 41867102
You don't have the player_volumne one enclosed in quotes.  JS by itself doesn't understand the templating, so won't be able to parse the tag.

Try this one:

<script type="text/javascript">
baseUrl = '{$url}'; token_id = '{$token_id}'; nowPlaying = viewed_id = 0; player_volume = '{$volume}';
</script>

Open in new window

0
 

Author Comment

by:DS928
ID: 41867106
Doesn't work.....
0
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

 
LVL 17

Expert Comment

by:Pawan Kumar Khowal
ID: 41867117
Try.. Separate out nowPlaying & viewed_id ..
<script type="text/javascript">
baseUrl = '{$url}'; token_id = '{$token_id}'; nowPlaying = 0; viewed_id = 0; player_volume = '{$volume}';
</script>
0
 
LVL 51

Expert Comment

by:Julian Hansen
ID: 41867131
Can you post the full error
0
 

Author Closing Comment

by:DS928
ID: 41867138
Works great.  Thank you..
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Introduction The Google Maps API offers various ways to draw dynamic and static maps.  Using a combination of PHP and JavaScript, you can draw active JavaScript maps that allow pan-and-zoom in the client browser window.  You can also draw "static" …
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

758 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

21 Experts available now in Live!

Get 1:1 Help Now