Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Feb 2004
    Location
    california
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts

    javascript values back to python?

    is there any way to pass a javascript value back to python without calling the page with parameters?

    I have created a dropdown menu using a python call to a WMS server. I'd like to create another dropdown menu based on the the first menu choice. I can't do a normal dynamic dropdown menu because I have to do another python wms call based on the first menu choice.

    I'd like to do the first call, read the menu choice, do the next call and create a new dropdown. I figure I'd do the first call in python, read the choice in javascript, do the second call in python then read the second choice and do more calls in python. All without doing a page call...
    'tis best not to get worked up over nothing

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,608
    Thanks
    0
    Thanked 645 Times in 635 Posts
    Use Ajax calls from the JavaScript to call the Python code.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #3
    New Coder
    Join Date
    Feb 2004
    Location
    california
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I've never used Ajax. is there anywhere you can point me to such that I can actually learn how to use Ajax calls for this ? (or post some code snippet?) Thanks a million.
    'tis best not to get worked up over nothing


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •