views:

61

answers:

3

I am trying to autoscroll to div using:

/index.php#tabletabs2?contact_added=1

when I use:

/index.php#tabletabs2

it works. How can I have both a variable and the autocroll working in my URL???

+3  A: 

The query part of the URL needs to be before the #. Browsers only send the part before the # to the server. The part after is for auto-scrolling to elements via their id or name attribute, e.g.

/index.php?contact_added=1#tabletabs2

See also the "Syntax" part of http://en.wikipedia.org/wiki/Uniform_Resource_Locator

David Morrissey
A: 

You have to have them in the correct order; ? goes before #:

/index.php?contact_added=1#tabletabs2
Williham Totland
+2  A: 

the ? needs to be the first thing after the page name as this indicates a query string.