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 2 of 2
  1. #1
    New Coder
    Join Date
    May 2012
    Posts
    55
    Thanks
    3
    Thanked 0 Times in 0 Posts

    How to refresh a page and get the last selection of a data

    Hi ,

    I am developing a webpage using LAMP where the programming language is PERL.

    My page has a table in it and above the table columns there is drop-down which filters the table data. This filter is implemented by Javascript. If I choose 'all' from the drop-down it shows the entire table data and if other
    values are selected then only those relevant data it shows. By default if not
    selected anything from drop-down, it shows all the data of the table.

    The problem is , if I refresh the page then irrespective of what value was selected from drop-down, it shows the default data only. How can I implement the feature so that even if I refresh it will bring the table-data depending on the last selected value from the drop-down.

    Please help.

    Thanks.

  • #2
    Super Moderator
    Join Date
    May 2005
    Location
    Southern tip of Silicon Valley
    Posts
    2,877
    Thanks
    2
    Thanked 164 Times in 159 Posts
    Since your dropdowns and filtering are being altered/controlled by javascript, then you're looking for a javascript solution, not a Perl solution.

    I'm not a javascript expert so I can't help much in that area. One possibility would be to have javascript update some cookie info and use that info when the page loads and constructs the dropdowns.


  •  

    Posting Permissions

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