FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Problem with quotes in javascript output
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Problem with quotes in javascript output [message #181527] Mon, 20 May 2013 16:17 Go to previous message
richard is currently offline  richard   
Messages: 213
Registered: June 2013
Karma:
Senior Member
This is not a javascript question ok?
First, the desired look of my endeavor is here.
www.mroldies.net/test1.html

What I am working on is here.
www.mroldies.net/test2.php

The problem mainly deals with required quotes in the javascript output.
Either single or double.

The code below shows you what I have been trying.
The output code shows the text with the variable names, not the desired
output.

Do not run the code locally as the key will prevent it.



<!DOCTYPE html>
<html><head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<script src="jwplayer/jwplayer.js"></script>
<script>jwplayer.key="NIV";</script>
</head>

<body>
<div id='my-video'></div>
<script type='text/javascript'>

jwplayer("my-video").setup({
playlist: [{
<?php
/* connect to the db */
$con = mysql_connect('localhost','user','pass');


if (!$con){die("can not connect: " . mysql_error());}

mysql_select_db('richbull_top100',$con);

$year=1960;
$number=1;

$result = mysql_query("SELECT atitle,artist,avid FROM A$year WHERE id =
$number");
if (!$result) { echo 'Could not run query: ' . mysql_error(); exit; }
$vid = mysql_fetch_row($result);


echo "{";

echo 'file: "http://www.youtube.com/watch?v=$vid[2]"';
echo ",";
echo 'description: "$year # $number - $vid[1]"';

echo "}";





?>
],

"startparam":"start",
"repeat":"list",
"width":800,
// adjust these 2 lines if you'd like to omit/resize playlist, etc:
listbar:{position:'right',size:320},
"height":450

});
</script>

</body>
</html>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: comma placement problem
Next Topic: no date header in mail()
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 10 12:25:41 GMT 2024

Total time taken to generate the page: 0.05756 seconds