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 8774495
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T18:34:56+00:00 2026-06-13T18:34:56+00:00

<!– <!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd> –> <html> <head> <meta http-equiv=Content-Type

  • 0
<!-- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -->
<html>
 <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Flot Examples</title>
    <link href="layout.css" rel="stylesheet" type="text/css">
    <!--[if lte IE 8]><![endif]-->
    <script  type="text/javascript" src="./js/excanvas.min.js"></script>
     <script type="text/javascript" src="./js/jquery.js"></script>
    <script  type="text/javascript" src="./js/jquery.flot.js"></script>
 </head>
    <body>
    <h1>Flot Examples</h1>

    <div id="placeholder" style="width:600px;height:300px;"></div>

    <p>Simple example. </p>
<?php

$server = "localhost";
    $user="harish";
    $password="password";  
    $database = "db";

    $connection = mysql_connect($server,$user,$password);
    $db = mysql_select_db($database,$connection);

query = "SELECT xval,yval FROM flottable";
    $result = mysql_query($query);        

    while($row = mysql_fetch_assoc($result))
    {
        $dataset1[] = array($row['xval'],$row['yval']);
    }

?>

<script type="text/javascript">
$(function () {
    var dataset1 = <?php echo json_encode($dataset1); ?>;

    $.plot($("#placeholder"), [ dataset1 ]);


}); 
/* $(function () {
     var d1 = [];
        for (var i = 0; i < 14; i += 0.5)
            d1.push([i, Math.sin(i)]); 
         $.plot($("#placeholder"), [ d1 ]);     });
 */
 </script>

 </body>
</html>

Guys this is my jsp code i am trying to retrieve data from my database and trying to plot it on FLOTCHART from 3dyas i had been googling i separately executed the php code in my eclipse juno it is working means $row[‘xval’] & $row[‘yval’] both gets the values from db correctly.but still i dont know why graph is plotted if i run this jsp file.I think i am doing something wrong i dont know where i also googled to get data from database in javascript but there also i got same result we should use php for this any help or guidance is appreciated

Reference: Retrieve data from mysql by php to create flot graph

  • 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-13T18:34:58+00:00Added an answer on June 13, 2026 at 6:34 pm

    I think you are confusing JavaScript and Java. JSP is short for Java Server Pages. Java and JavaScript are completely different languages.

    The code you have shown above contains no Java, only PHP and JavaScript.

    The .JSP file extension is for Java Server Pages and is not needed to run JavaScript. JavaScript can be run in PHP and HTMLfiles.

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

Sidebar

Related Questions

Here is the link to the offending page: http://www.wrightspecialty.com/brokers-agents-questionnaire.html?view=foxcontact There's a limitation to the
when i view my site : http://www.testtrack.tv/ in IE8's compatibility-mode the horizontal scrollpanes turn
My NSXMLParser breaks on this string: <title>AAA &#8211; BCDEFGQWERTYUIO</title> I parsed it in this
I'm having troubles with my meta tags with Open Graph. It seems as though
When I view JSON data as an alert when the page loads, I see:
An extension to my previous question: Text cleaning and replacement: delete \n from a
I've got the following login script.. <?php $name = $_POST[name]; $password = $_POST[password]; $query
So to start, I have an array of XML files. These files need to
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is
Have a webpage that will be viewed by mainly IE users, so CSS3 is

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.