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???
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???
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
You have to have them in the correct order; ? goes before #:
/index.php?contact_added=1#tabletabs2