Put something like this at the end of the index.html page, right before its closing </body> tag:
Code:
<script type="text/javascript">
function getQval(n) {
if(typeof n !== 'string'){
return null;
}
var r = new RegExp('[?&;]' + n + '=([^&;#]*)'), m = location.search;
return (m = r.exec(m))? unescape(m[1]) : null;
}
if((ajaxpage.page = getQval('ref'))){
ajaxpage(ajaxpage.page + '.html', 'content');
}
</script>
Then you can have a link like:
http://mypage.com/index.html?ref=porsche
This assumes the page you want is porsche.html and that the target div on index.html has a unique id of content and that porsche.html is in the same folder as index.html. If things are different, adjustments can be made to the script code I just gave you to compensate and/or more information can be passed in the link.
If you have a server side language like PHP, it can handle the duties of parsing the link to determine if something should be initially loaded in the content area, and can even load it (include it).
Bookmarks