www.webdeveloper.com
Results 1 to 3 of 3

Thread: Help making link add URL parameter

  1. #1
    Join Date
    Oct 2011
    Posts
    4

    Help making link add URL parameter

    I want a URL parameter, like http://www.thatswhyimbroke.com/#tab-1 to be added when a link is clicked. So for example, when I click one of the menu tabs on http://www.thatswhyimbroke.com/, I want a #tab-1 to be added at the end of the URL.

    If you look now, clicking a new tab adds nothing to the URL because it's pre-loaded.

    Please let me know if you need more explanation, I'm not sure i'm explaining it correctly. Thanks for any help!

  2. #2
    Join Date
    Sep 2008
    Location
    Akron, OH
    Posts
    1,143
    I'm guessing the script which handles your table handling includes a "return false;". If that's removed, it should, by default, perform how you want.

  3. #3
    Join Date
    Sep 2009
    Posts
    159
    Try this to add whatever you want at the end of url. Take the code below into onclick function.
    Code:
    window.location.hash = 'category-name';

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles