GeeJay. Don't give up. the script actually works for the purpose you need. To show you what i mean I have made a demo page that you can see HERE.
As you can see the framed pages are all on the same domain, as you would call internal. But the point I have been trying to make is that you should not put to much meaning in the words internal/ external. As long as you don't change the word external in the original script it will work, even when referring to a page on your own domain.
Another example of the script working with pages on the same domain can be seen HERE, it is the first edition of the script on DD.
The code I pasted into post #4 was not meant as something for you to use, it was a copy of the code you were already using on your page. I was trying to illustrate what the error was.
I suggest you try again.
This is the original code from dynamic drive. (Drop-down Document Viewer II)
Code:
<!--CHANGE LINKS BELOW TO YOUR OWN-->
<a href="javascript:jumpto('http://www.cnn.com')">CNN.com</a> |
<a href="javascript:jumpto('http://www.msnbc.com')">MSNBC</a> |
<a href="javascript:jumpto('http://www.abcnews.com')">ABC News</a> |
<a href="javascript:jumpto('http://news.bbc.co.uk')">BBC UK News</a>
<script language="javascript">
<!--
//Drop-down Document Viewer II- © Dynamic Drive (www.dynamicdrive.com)
//For full source code, 100's more DHTML scripts, and TOS,
//visit http://www.dynamicdrive.com
//Specify display mode (0 or 1)
//0 causes document to be displayed in an inline frame, while 1 in a new browser window
var displaymode=0
//if displaymode=0, configure inline frame attributes (ie: dimensions, intial document shown
var iframecode='<iframe id="external" style="width:95%;height:400px" src="http://www.yahoo.com"></iframe>'
/////NO NEED TO EDIT BELOW HERE////////////
if (displaymode==0)
document.write(iframecode)
function jumpto(inputurl){
if (document.getElementById&&displaymode==0)
document.getElementById("external").src=inputurl
else if (document.all&&displaymode==0)
document.all.external.src=inputurl
else{
if (!window.win2||win2.closed)
win2=window.open(inputurl)
//else if win2 already exists
else{
win2.location=inputurl
win2.focus()
}
}
}
//-->
</script>
If you use that and ONLY edit what I have highlighted in blue color, and nothing else, I am sure you will get it working quickly.
Bookmarks