Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8186585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T02:15:35+00:00 2026-06-07T02:15:35+00:00

Good Afternoon, everyone. I have an ongoing issue with the code below. I know

  • 0

Good Afternoon, everyone.

I have an ongoing issue with the code below. I know that the Javascript/JQuery and JSON are working fine as demonstrated here – http://jsfiddle.net/Dvpmy/13/

I also know that the PHP works fine when my attempts at echoing the Javascript are omitted. However, when I combine everything, I seem to be experiencing issues. Chrome is flagging an ‘Unexpected Identifier’ and Firefox believes there is a missing closed parentheses after an argument. I am unable to find and remedy either.

<html>
<head>
<script type="text/javascript" src="/Portfolio/jquery.js"></script>
<?php


mysql_connect(localhost,"user","password");
@mysql_select_db("database") or die( "Unable to select database");
$query="SELECT * FROM quote WHERE view='yes'";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
$i=0;
while ($i < $num) {

$ID=mysql_result($result,$i,"ID");
$EPIC=mysql_result($result,$i,"EPIC");

echo '<script type="text/javascript">';
echo'$.getJSON("http://query.yahooapis.com/v1/public/yql?     q=select%20*%20from%20yahoo.finance.historicaldata%20where%20symbol%20%3D%20%22DES%22%20and%20startDate%20%3D%20%222009-09-11%22%20and%20endDate%20%3D%20%222010-03-10%22&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&callback=?", function(data) { console.log(data); var info = data.query.results.quote[0].Close; var date = data.query.results.quote[0].Date; var high = data.query.results.quote[0].High; $("div.quote").html("Test" $ID <br> $EPIC <br> high ); } );';
echo '</script>';


$i++;
}

?>
</head>
<body><div class='quote'></div></body></html>

I would like to apologise in advance if the solution is glaringly apparent. All assistance will be gratefully received.

Many thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T02:15:37+00:00Added an answer on June 7, 2026 at 2:15 am

    What jumps out immediately is right at the end of the JavaScript block:

    $("div.quote").html("Test" $ID <br> $EPIC <br> high );
    

    Everything after "Test" is outside the quotes and would throw an error.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Good afternoon everyone! As you may know, many companies that sell SSL certificates offer
Good afternoon people's I have built a jquery plugin that I use on my
Good Afternoon people, i am working with CKEDITOR and JQuery i need know how
Good afternoon, I'm having a problem with a section of code I'm working on
Good afternoon I have a table that has customer id, name, computer, laptop, blah,
Good Afternoon, I have a Joomla! template that keeps throwing up a pop up
Good afternoon, does anyone know of a library that would allow me to read
Good Afternoon All, I have written an SSIS 2005 package that contains a conditional
Good afternoon everybody! I have this threaded SerialPort wrapper that reads in a line
Good afternoon everyone. I was wondering if there is anyway to have the MVC

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.