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 6 of 6
  1. #1
    New Coder
    Join Date
    Nov 2007
    Posts
    46
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Get HTML ? Get VARIABLES and restore them?

    my url looks like this

    myurl.com

    or

    myurl.com?variable_one=1

    or

    myurl.com?varialbe_one=1&variable_two=2

    and I want to use these urls and then resort my php page by the column headers....so I pass another variable to the get-vars that is called order_by...
    but I want to maintain the exactness of the URL that already exists....

    but sometimes the url is like this --

    myurl.com?order_by=category

    and then the link and Javascript that I have tried thus far creates this

    myurl.com?order_by=category&order_by=other_category

    How can freeze in time the current url....

    like javascript this.href.location...

    then run a string variable search on it --- and then reload with the current ones plus the new ones...but not duplicate any???

    this seems so basic - but it is killing me...


    The esssence of why I am doing this is this -----


    picture a five column list with sorters clickies at the top of the columns..

    but first I want to filter the entire list by a drop down reload....

  • #2
    Regular Coder
    Join Date
    Sep 2007
    Location
    AZ, USA
    Posts
    685
    Thanks
    6
    Thanked 46 Times in 46 Posts
    Could you rephrase that? I didn't really get it, particularly these parts:

    and I want to use these urls and then resort my php page by the column headers....so I pass another variable to the get-vars that is called order_by...
    but I want to maintain the exactness of the URL that already exists....
    Edit: Nevermind, I thought you meant resort as in "We had to resort to the backup plan" not as in sorting it again.


    What do you mean "resort my php page by the column headers", not to mention that I don't know what order_by is. Also:

    picture a five column list with sorters clickies at the top of the columns..

    but first I want to filter the entire list by a drop down reload....
    So... are you basically trying to sort a table? Or what?

    Sorry if I'm not understanding the problem here, I would love to help!

    Sorting a table is possible with javascript, no need to reload the page. At most you could use AJAX to pull the data.
    Last edited by binaryWeapon; 07-23-2008 at 04:12 AM.

  • #3
    New Coder
    Join Date
    Nov 2007
    Posts
    46
    Thanks
    4
    Thanked 0 Times in 0 Posts
    THANKS for the help..

    Let me clarify...

    Five column table.

    Top most headers are links that can click and auto sort the table by that column.

    I did this by reloading the page from those clicks iwth order_by=header_name and then loaded the header_name into the SELECT statement...

    This all works.

    BUT --- the five column table needs to be filterable by a drop down also----

    I did this by a _GET variable reload also ---

    But what I want to happen is this;;;;;


    Have the column-table (the original one) get filtered... by column E...which I have done with a drop down that reloads the page with a new _GET variable which runs and eliminates the right stuff...

    THEN I want to be able to Sort -- the original columns by clicking the top header but keep the data filtered...

    Does that make sense?

  • #4
    Regular Coder
    Join Date
    Sep 2007
    Location
    AZ, USA
    Posts
    685
    Thanks
    6
    Thanked 46 Times in 46 Posts
    Sounds like you need AJAX to send a request to a php file, which will use the new GET variable, etc.

  • #5
    New Coder
    Join Date
    Nov 2007
    Posts
    46
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Don't want to use AJAX --- I really think there is a way to do this.

    I will ultimately integrate what I am doing into Joomla and don't want to rely on AJAX.

    I want get the current URL....run a string search on it --- and then just NOT load the same variable twice in the go-line.

  • #6
    New Coder
    Join Date
    Nov 2007
    Posts
    46
    Thanks
    4
    Thanked 0 Times in 0 Posts
    I solved my problem another way ---

    instead of worrying so much about the text in the URL -- I wrote logic to allow me to just simply rewrite the entire URL each time something happens....

    This way the URL is set new --- logic keeps it all together --- and the memory of the filters is something that will just travel along for the ride.

    Simply put -- I just put logic into the page that check for the get variables and if they were present I loaded them one by one into a fulll string...

    I know it is hard to understand -- but either way - I just solved it a different way.


  •  

    Posting Permissions

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