Results 1 to 7 of 7

Thread: Does extjs have functionality for getting url params

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Ext User
    Join Date
    Jul 2007
    Posts
    9
    Vote Rating
    0
      0  

    Default Does extjs have functionality for getting url params

    getting the url parameters or do I need to parse it myself?

  2. #2

  3. #3
    Ext Premium Member BernardChhun's Avatar
    Join Date
    Mar 2007
    Location
    Quebec, Canada
    Posts
    831
    Vote Rating
    2
      1  

    Default


    Code:
    // separating the GET parameters from the current URL
    var getParams = document.URL.split("?");
    // transforming the GET parameters into a dictionnary
    var params = Ext.urlDecode(getParams[getParams.length - 1]);

  4. #4
    Ext User
    Join Date
    Jul 2007
    Posts
    9
    Vote Rating
    0
      0  

    Default

    Thx

  5. #5
    Ext JS Premium Member cbetancourt's Avatar
    Join Date
    Mar 2007
    Location
    Doylestown, Pennsylvania
    Posts
    53
    Vote Rating
    0
      0  

    Default

    Make sure that getParams.length is > 1, otherwise there is nothing to parse.
    And since there can only be one "?" in a properly formed URL:

    Code:
    Ext.urlDecode(getParams[1]);
    will do.

  6. #6
    Sencha User
    Join Date
    Oct 2012
    Location
    Pune,India
    Posts
    3
    Vote Rating
    0
      0  

    Default

    Great..

  7. #7
    Sencha User
    Join Date
    Jan 2013
    Posts
    1
    Vote Rating
    0
      0  

    Default this is use full code

    this is use full code

Posting Permissions

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