View Full Version : Help with a menu and picture gallery script

09-20-2004, 07:01 AM
I have just installed and customised a top nav menu and slide show gallery, but i need help with the links, is it possible to set the target destination for links within script or can they only load in the main page?

I would like to have my links load into an I Frame but the regular


Code doesnt work. The scripts are:

1) Top Navigational Bar II
2) DHTML slideshow script

any help would be great.


09-20-2004, 07:25 PM
Firstly, you'll need to give the iframe an ID attribute, such as:

<iframe src="test.htm" id="myiframe"></iframe>
With that done, try this:

1) For Top Navigational Bar 2 (http://www.dynamicdrive.com/dynamicindex1/topnavbar.htm) , replace the actual URLs inside your js file, such as:

with a JavaScript URL such as:

This should execute a JavaScript command to load about.htm in the iframe instead.

2) For DHTML Slide Show (http://www.dynamicdrive.com/dynamicindex14/dhtmlslide.htm) , modify the function:

function transport(){

function transport(){
document.getElementById('myiframe').src= photoslink[which]
I haven't tested either of the above, but theorically they should work.

P.S: In the future, please follow the following format when posting a question, namely, always posting a link to the script(s) in question like I've done above: http://www.dynamicdrive.com/forums/showthread.php?t=6 Don't post the entire source code here.

09-21-2004, 06:45 AM
Thank you very much for your help, the solution for the DHTML Slideshow Gallery (http://www.dynamicdrive.com/dynamicindex14/dhtmlslide.htm) works a treat but im not sure on the Top Navigational Bar (http://www.dynamicdrive.com/dynamicindex1/topnavbar.htm) one this part

dhtmlMenu = new NavBarMenu(100, 0);
dhtmlMenu.addItem(new NavBarMenuItem("Home", ""));

is where the menu items are displayed and linked arent they??

Where do i put the code you suggested? I know you said to replace the link


But i did that and the menu didnt appear at all!!

Thanks again