How To Prevent Fragment Identifiers From Showing In Url
I have a link like this Log in after clicking on the link the url changes from http:/domain.com to http://domain.com#login_form
Solution 1:
It's called a document fragment, not a hash tag, but whatevs.
If, as you say, "no java script [is] used to display login form", I can only assume you're using the CSS :target
psuedo-class to toggle visibility? In that case, there's nothing you can do. The fragment MUST be in the URL for that element to show up.
Instead, use some JavaScript to do the toggling for you. Something like:
<ahref="javascript:void(document.getElementById('login_form').style.display = 'block');">Log in</a>
(WARNING: Extremely bad example, but it should get the general idea working)
You will need to use id="login"
instead of name="login"
Post a Comment for "How To Prevent Fragment Identifiers From Showing In Url"