SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Guru
    Join Date
    Nov 2004
    Location
    sweden
    Posts
    645
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Is there a way to set a session by clicking a text?

    I'm just curious. Is it possible to have a page where I list, let's say, three links.
    VERSION A
    VERSION B
    VERSION C

    When the page is loaded first time the session is set to A.
    And when the user is clicking on VERSION B, I would like the page to reload and set the session to B.
    If they click on C it will be set to C.
    Is this possible by just clicking a text link and not set the code in the url?
    I kinda like when everything is happening in the background.

    Or any other ideas on how to do this?

  2. #2
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,747
    Mentioned
    64 Post(s)
    Tagged
    0 Thread(s)
    Well you could do it using javascript to submit a form, or use some CSS to make a button look like a link which would submit a form, which would at least hide the variable from the URL (though, any cursory glance at the page source would reveal you doing this)....
    Never grow up. The instant you do, you lose all ability to imagine great things, for fear of reality crashing in.

  3. #3
    SitePoint Guru
    Join Date
    Nov 2004
    Location
    sweden
    Posts
    645
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Can I have more than one button in one form? Or do you suggest making a different form for every link?

  4. #4
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,747
    Mentioned
    64 Post(s)
    Tagged
    0 Thread(s)
    The latter. Form, Hidden Input (to transmit the data), Button, Close Form.
    Never grow up. The instant you do, you lose all ability to imagine great things, for fear of reality crashing in.


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
  •