dynamic display of user selected date range

Q

qtrimble

I don't know, rather, my lack of experience is keeping me from
achieving this end result:

On the same page, I would like to have (1) a form with 2 text fields
to capture the start and end date as defined by a user and (2) a
Timeplot graph (http://www.simile-widgets.org/timeplot/) which
displays data that meets the date range criteria defined in the form.

I currently send the date inputs to a separate php script which are
then used in an SQL statement. The query result is then formatted to
meet the Timeplot requirements and written to a text file.

The problem is, Timeplot doesn't know the text file exists b/c the
page isn't refreshed once the form is submitted.

So the problem I am looking to solve is:

Call the php file without redirecting to the php script and refresh
the Timeplot javascript and related div containers so the display
reflects what the user input. The user should be able to change the
dates and see a new graph on the fly.

Any help would be very much appreciated. I am not necessarily
interested in using PHP if there is a better solution.
 
T

Thomas 'PointedEars' Lahn

qtrimble said:
So the problem I am looking to solve is:

Call the php file without redirecting to the php script and refresh
the Timeplot javascript and related div containers so the display
reflects what the user input. The user should be able to change the
dates and see a new graph on the fly.

Any help would be very much appreciated. I am not necessarily
interested in using PHP if there is a better solution.

Reads like a textbook example for XMLHttpRequest.

<https://developer.mozilla.org/en/AJAX>


PointedEars
 
Q

qtrimble

Reads like a textbook example for XMLHttpRequest.

<https://developer.mozilla.org/en/AJAX>

PointedEars
--
Use any version of Microsoft Frontpage to create your site.
(This won't prevent people from viewing your source, but no one
will want to steal it.)
  -- from <http://www.vortex-webdesign.com/help/hidesource.htm> (404-comp.)

I am actually going through something similar that I found on my own
but there is still a snag.

Mind taking a look here: https://bcmw.coastal.edu/testing/timeplot/params_testing5.php

From the getdata function I'm calling the loadXMLDoc function and
passing the php url string to get the new text file. I just can't get
the div that reads the text file (timeplot1) to refresh.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top