SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    GET variables in dhtml

    So I need to use variables passed in the url for dhtml calculations. Can anyone help me do this? Thanks!

    Aaron
    Aaron Brazell
    Technosailor



  2. #2
    Under Construction Poop_Shoot's Avatar
    Join Date
    Jul 2003
    Location
    Sacramento, CA
    Posts
    330
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can use location.search!

    Code:
    function decodeSearchString() {
       var nameValue = new Array();
       var searchStr = unescape(location.search.substring(1));
       if (searchStr) {
           var formElement = searchStr.split("&");
           var tmpArray = new Array();
           for (k = 0; k < formElement.length; k++) {
                tmpArray = formElement[k].split("=");
                nameValue[tmpArray[0]] = tmpArray[1];
           }
       }
       return nameValue
    }
    See it in action here! http://ashutoshsaxena.tripod.com/jst.../realjs11.html

  3. #3
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hey thanks.
    Aaron Brazell
    Technosailor



  4. #4
    Under Construction Poop_Shoot's Avatar
    Join Date
    Jul 2003
    Location
    Sacramento, CA
    Posts
    330
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No Problem! Here to help(When I can!)!


Bookmarks

Posting Permissions

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