I want to load pages in a specific div. I want to display the URL of the loaded page in the browser's address bar.
How I can do that?
I want to load pages in a specific div. I want to display the URL of the loaded page in the browser's address bar.
How I can do that?
well, the easiest way to load an external page into a div is by using the jquery .load function - $('#div_id').load('../url_to_page.html');
as far as changing the address bar, this can be done with HTML5, but anything before that you might be out of luck.
HTML5 example: window.history.pushState("object or string", "Title", "/new-url");
With my knowledge there are two possibilities to load another website into a div:
First one would be to change the div's content via Ajax.
Second one would be to integrate an <iframe></iframe>
into the div, in order to load the desired page in the iframe.
Hope I could help.
If your trying to change the entire url displayed, domain and all, I don't believe you can and for good reason. I'd hate for you to create a phishing site of stackoverflow or otherwise and pretend to be legit while you steal my password. But managing anything after the domain is doable as answered above (or below, wherever it is by now~).
Thanks!