Is it possible to use Query String and Hash at the same time?

Asked

Viewed 117 times

2

I am developing a one-page site only using the hash’s html to scroll the page until the id specified, but the need to use also a query string with php, but now every time I try to use both of them it doesn’t work. The page doesn’t end up in the part I want, it always goes back to the top of the page. You can use both together and when I call query the page continue where you are?

  • Do you have an example URL you are using? Maybe you are not hashing the right place.

  • Ta thus: http://meusite.com.br/index.php#bloco03? id=1

1 answer

2


According to the Wikipedia (in English) when using a fragment (expressed via hash - #) and a query string (expressway ?) in the same URL, the fragment should be placed afterward of the query string. Example:

http://meusite.com.br/index.php?id=1#bloco03
  • Oh it worked, that’s all.

  • @Hermesnetto Dispose! If you find that the answer has satisfactorily solved your problem, you can mark her as accepted.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.