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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T16:24:48+00:00 2026-06-14T16:24:48+00:00

javascript: <script src=http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js type=text/javascript></script> $(function() { // $(‘#button_submit’).click(function() { var start_date = $(‘start_date’).val(); var

  • 0

javascript:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js" type="text/javascript"></script>
$(function() {
  //
  $('#button_submit').click(function() {
    var start_date = $('start_date').val();
    var end_date = $('end_date').val();
    var type = $('type').val();
    alert(start_date);
  });
});
// 
function drawChart() {
  var jsonData = $.ajax({
    url: "visits/day.php?start_date=" + start_date + "&end_date=" + end_date,
    dataType: "json",
    async: false
  }).responseText;

  var obj = jQuery.parseJSON(jsonData);
  var data = google.visualization.arrayToDataTable(obj);


  var options = {
    title: 'Number of visitors'
  };

  if (type === 'pie') {
    var chart = new google.visualization.PieChart(
      document.getElementById('chart_div'));
      chart.draw(data, options);
  }
  if (type === 'bar') {
    var chart = new google.visualization.BarChart(
      document.getElementById('chart_div'));
      chart.draw(data, options);
  }
}  

html:

<form id="myForm">
    <input type="text" name="start_date" id="start_date"><br />
    <input type="text" name="end_date" id="end_date"><br />
    <input type="text" name="type" id="type"><br />
    <input type="button" id="button_submit" value="go">
</form>
<div id="chart_div" style="width: 900px; height: 500px;"></div>

Variables obtained by the form seem empty, ive did that alert(start_date) and says: undifined and are not passing through url:visits/day.php?start_date…

I need that values to send out for my php page without refresh the page

What am I doing wrong?

  • 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-14T16:24:49+00:00Added an answer on June 14, 2026 at 4:24 pm

    Add to the above… I don’t see where you’re passing start_date and end_date to your drawChart() function:

    Edited to add the call to drawChart()

    $(function() {
      //
      $('#button_submit').click(function() {
        var start_date = $('#start_date').val();
        var end_date = $('#end_date').val();
        var type = $('#type').val();
        drawChart(start_date, end_date)
        console.log(start_date, end_date, type);
      });
    });
    function drawChart(start_date, end_date) {
      var jsonData = $.ajax({
        url: "visits/day.php?start_date=" + start_date + "&end_date=" + end_date,
        dataType: "json",
        async: false
      }).responseText;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

With jQuery latest one: <script src=http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js></script> <script src=http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.js></script> Could someone explain what are the
I made this bookmarklet: javascript:(function(){var s=document.createElement('script');s.setAttribute('src','http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js');document.getElementsByTagName('body')[0].appendChild(s);$('#hldIntMain').hide();$('#fadeBackground').hide();return false;})() Formatted code: // Add in jQuery var
I tried importing jQuery into my Chrome extension, but when I try <script src=http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js
Following Code given: http://jsfiddle.net/UsZG8/1/ <html> <head> <script type=text/javascript src=http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js></script> <script type=text/javascript src=http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js></script> <link rel=stylesheet
When using Firebug or some of the bookmarklets: javascript:(function(){var a=document.createElement(script);a.setAttribute(src,http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js);if(typeof jQuery==undefined){document.getElementsByTagName(head)[0].appendChild(a)}(function(){if(typeof jQuery==undefined){setTimeout(arguments.callee,100)}else{jQuery(*).one(click,function(d){jQuery(this)[0].scrollIntoView();for(var e=,c=jQuery(this)[0];c&&c.nodeType==1;c=c.parentNode){var b=jQuery(c.parentNode).children(c.tagName).index(c)+1;b>1?(b=[+b+]):(b=);e=/+c.tagName.toLowerCase()+b+e}window.location.hash=#xpath:+e;prompt('Twoje
this is my ajax call <script src = js/jquery.js type = text/javascript></script> <script type=text/javascript>
Here is my preload script: <script type=text/javascript> Image_1 = new Image(1,1); Image_1.src = images/sprites.png;
<script type=text/javascript> $(document).ready(function() { $('input#zip').autocomplete({ var cityAndState = joinedValues.split(|)[1]; dataType: json, source: ../src/php/registration/getFanLoc.php, minLength:
Here is fragments of my HAML view: %script{:type => text/javascript, :src => assets/application.js} :javascript
<script type=text/javascript> if (typeof jQuery == 'undefined') { var script = document.createElement('script'); script.type =

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.