1

I'm using jquerymobile.

Inside a page lets call it page1.aspx I have different sections like header, content, footer and navigate

So if i want to open the section navigate some href in other page page2.aspx must look like href="page1.aspx#navigate"

But how can I do the same but adding parameters? like href="page1.aspx#navigate?param1=2&param2=3, is this possible or how the syntaxis is?

Thank you.

1
  • But why do you need this parameters? Commented Jan 9, 2013 at 22:48

1 Answer 1

6

Query params should come before hashtags in URLs, otherwise the query params will be counted as part of the hash tag. Here is what you want:

href="page1.aspx?param1=2&param2=3#navigate"

Just as a reference, here is the spec:

https://www.rfc-editor.org/rfc/rfc3986

See section #4.2, it talks about how to construct relative links.

Sign up to request clarification or add additional context in comments.

1 Comment

Does it mean if you have more than 1 params having #...the params after first instance of # will be ignored. Is there a way to get around this?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.