Results 1 to 3 of 3

Thread: Help with a menu and picture gallery script

  1. #1
    Join Date
    Sep 2004
    Posts
    19
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Exclamation Help with Top nav bar 2 picture and DHTML slideshow script

    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

    target="iframe"

    Code doesnt work. The scripts are:

    1) Top Navigational Bar II
    2) DHTML slideshow script

    any help would be great.

    Thanks
    Aradon
    Last edited by ddadmin; 09-20-2004 at 06:26 PM.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,140
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Firstly, you'll need to give the iframe an ID attribute, such as:

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

    1) For Top Navigational Bar 2 , replace the actual URLs inside your js file, such as:

    Code:
    "about.htm"
    with a JavaScript URL such as:

    Code:
    javascript:document.getElementById('myiframe').src='about.htm'
    This should execute a JavaScript command to load about.htm in the iframe instead.

    2) For DHTML Slide Show , modify the function:

    Code:
    function transport(){
    window.location=photoslink[which]
    }
    to:

    Code:
    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.

  3. #3
    Join Date
    Sep 2004
    Posts
    19
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Default

    Thank you very much for your help, the solution for the DHTML Slideshow Gallery works a treat but im not sure on the Top Navigational Bar one this part

    Code:
    dhtmlMenu = new NavBarMenu(100, 0);
    dhtmlMenu.addItem(new NavBarMenuItem("Home", ""));  
    myNavBar1.addMenu(dhtmlMenu);
    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

    Code:
    "about.htm"
    But i did that and the menu didnt appear at all!!

    Thanks again
    Last edited by Aradon; 09-21-2004 at 05:48 AM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •