We help IT Professionals succeed at work.

JSON DataTables part x

Bob Schneider
on
382 Views
Last Modified: 2014-08-27
Ok so moving along.  Now I want to pass the datatable parameters dynamically by allowing the user to choose which series, which age group and which gender.  I removed the code from that while we were getting it up-n-running.  Now I want to put it back in.

My "old" process was to submit to the same page and re-populate the entire thing.  I assume that is not how ajax works.  If so I need to know how to pass parameters to the embedded asp page.

Thanks!
Comment
Watch Question

Big MontyWeb Ninja at large
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Web Ninja at large
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Scott FellDeveloper
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2013
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Bob SchneiderCo-Owner

Author

Commented:
Here is the quickest one to load
Bob SchneiderCo-Owner

Author

Commented:
So If I currently have selects of the parameters to choose from (series, age groups, and gender) how do I press that into an ajax format.  The gender and age groups are static but the series are dynamically generated.

Thanks so much for this.  In the interim I will go back over all that you folks have posted.
Scott FellDeveloper
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2013
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Big MontyWeb Ninja at large
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Scott FellDeveloper
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2013
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Big MontyWeb Ninja at large
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Bob SchneiderCo-Owner

Author

Commented:
Currently I am passing the parameters to results_array.asp using query strings.  I get that I need to add those parameters to the ajax call but how do I get them into the asp variables?  Currently I do this:
lSeriesID = Request.QueryString("series_id")
iYear = Request.QueryString("year")
sGender = Request.QueryString("gender")
iAgeTo = Request.QueryString("age_to")

Open in new window

Scott FellDeveloper
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2013
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Big MontyWeb Ninja at large
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Bob SchneiderCo-Owner

Author

Commented:
This is helpful.  I believe the years need to be via a link/asp query string because different years have different series.  The standings page is not a landing page per se but once there you should be able to toggle between series, age groups, and gender.  Changing a year sets everything back to the defaults.

Having said all of that, what I am seeing is that I need to create a form with series, age group, and gender drop-downs.  Since the page is not a landing page per se, the series will be initially selected via a query string on the "main" page.  The defaults for the others will be "Open" and "Male."

I will start working on this.  Please let me know if you see anything wrong with my reasoning.  I will re-post as needed.
Scott FellDeveloper
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2013
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Big MontyWeb Ninja at large
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Bob SchneiderCo-Owner

Author

Commented:
Getting back on this now.  Making progress on my series standings utility.  I will repost soon.
Bob SchneiderCo-Owner

Author

Commented:
Better instruction doesn't happen in many schools...
Big MontyWeb Ninja at large
CERTIFIED EXPERT

Commented:
glad you've made some progress! how did you finalize your process (just curious)?
Bob SchneiderCo-Owner

Author

Commented:
No got sidetracked with my server migration.  still need to do two things:
1) pass gender, age, and series id to the datatable page in classic asp
2) turn the individual's names into clickable links that will show the individual's race-by-race data.

This wasn't the one that I thought I closed.  Oh, well I will create a new post soon.  FYI, the page in question is here and it is possible that some of what I need has been posted above by you or padas.
Scott FellDeveloper
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2013

Commented:
Those clickable links you want can be created on the fly by jquery. That way you don't have to create them in  your json which is cumbersome.

I will try and get back to this in about 5hrs.
Bob SchneiderCo-Owner

Author

Commented:
Thanks!
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.