i know the basics of loading a page or a file in a container frame via js or jQuery, but via event listener like onClick
JS -
document.getElementById("id").innerHTML = "<object type = 'text/html' data = 'myfile.html'> </data>"
JQUERY -
$("#id").load("myfile.txt");
but what I want to achieve is the same as this but not just being loaded onClick
in the container frame, but also add a parameter on the url, for example:
if I click on a button, `webpage.html` will load on `<div>` container frame, and the `url` will change to `http://example.com/?loaded=webpage.html`
I wanted to do this, so I can either change the url
string or press an element
and load a certain file on the div
container frame.
the same principle goes as how facebook manages profile.php
http://facebook.com/profile.php?=mypersonalprofile
- load my profilehttp://facebook.com/profile.php?=myfriendsprofile
- load my friends profile
I hope I managed to deliver it clearly.