Reputation: 155
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¶m2=3
, is this possible or how the syntaxis is?
Thank you.
Upvotes: 1
Views: 3917
Reputation: 41613
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¶m2=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.
Upvotes: 6