Hello,
I was wondering if someone might be able to help me with this please?
Im trying to create a website which has a few similar pages, on each page the only thing that really changes is the title of the page and some dynamic content which is loaded using javascript files.
I have a simple hyperlink menu system, which loads each page reloading essentially the same pages again with a few minor changes, I was wondering is it possible to load the javascript files dynamically depending on the hyperlink presses
Eg
<a href="javascript:change(1)">Page one</a>
<a href="javascript:change(2)">Page Two</a>
<div ID="myID"></div>
<script type="text/javascript">
function Change(myPage){
if (myPage == "1"){
myID.innerHTML="Welcome to Page One<scrip"+"t src=\"http://www.mysite.com/1.jsp"></scrip"+"t>";
}
else{
myID.innerHTML="Welcome to Page Two<scrip"+"t src=\"http://www.mysite.com/2.jsp"></scrip"+"t>";
}
}
</script>
Im not too sure if this is making any sense, I really just want to have one html page but just change the center contents dynamically via hyperlinks???
I have tried a few things but either the javascript doesnt load at all or it displays the contents on another page??? The text portion works where it changes the text dynamically its just a problem changing the javascript page to load...
I really hope someone can help if this is even possible to do lol



Reply With Quote

Bookmarks