5
I have the following problem, I am developing a web application in java and I would like to know how to change the URL of a page when I click on a menu link. For example:
Access a site www.exemplo.com.br this is the main link and there is another contact link, when I click on it, I would like you to stay www.exemplo.com.br/contact. Also, I wanted to be able to copy this URL and open in another browser and go straight to contact.
An example of this is Gmail, when we click to read an email the url changes and if we do a copy Past in another browser goes straight to the email.
Is it possible to do this as ajax ? If it is not what would be the best option ?
This is actually a mix of History API and routing. I don’t know if it’s possible to do this in Java. Or are you referring to Javascript?
– Vinícius Gobbo A. de Oliveira
In javascript if possible. I can load the content I want into a div, but I wanted to do this url scheme as described above or else what is the best way to do it ?
– Pedro A.
you are using Java or Javascript?
– Sergio
In this case, update your question. Java and Javascript are two completely different things, despite the name.
– Vinícius Gobbo A. de Oliveira
I am using javascript
– Pedro A.