Results 1 to 4 of 4

Thread: DHTML + iframes?

  1. #1
    Join Date
    Sep 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default DHTML + iframes?

    I have a menu bar on my site (pk.darkuniverse.net) i'd like to beable for all the links in the menu to beable to be displayed within a iframe is there away to do this?

    So like anytime someone clicks on one of the links (that is sopsot to display within the iframe) instead of it linkng to the page it will open in the iframe on the site.

    the code im using for my site i don't have the iframe stuff yet because i don't know if what i want to do will work with this. thats within a javascript file i have on the site.

    Code:
    // ssmItems[...]=[name, link, target, colspan, endrow?] - leave 'link' and 'target' blank 
    
    to make a header
    ssmItems[0]=["Menu"] //create header
    ssmItems[1]=["Forums", "http://pk.darkuniverse.net/Forums",""]
    ssmItems[2]=["Information", "http://pk.darkuniverse.net/info.htm",""]
    ssmItems[3]=["Not finished", "http://pk.darkuniverse.net", ""]
    ssmItems[4]=["Not finished", "http://pk.darkuniverse.net", ""]
    ssmItems[5]=["Not Finished", "http://pk.darkuniverse.net", ""]
    ssmItems[6]=["Not finished", "http://pk.darkuniverse.net", ""]
    
    ssmItems[7]=["Not finished", "http://pk.darkuniverse.net", "", 1, "no"] //create two column 
    
    row
    ssmItems[8]=["Not finished", "http://pk.darkuniverse.net", "",1]
    
    ssmItems[9]=["External Links", "", ""] //create header
    ssmItems[10]=["Not finished", "http://pk.darkuniverse.net", ""]
    ssmItems[11]=["not finished", "http://pk.darkuniverse.net", ""]
    ssmItems[12]=["Not finished", "http://pk.darkuniverse.net", ""]
    
    buildMenu();
    
    //-->

    this right here is the actual code in the html document that is displayed on the site.

    Code:
    <style type="text/css">
    <!--
    A.ssmItems:link		{color:black;text-decoration:none;}
    A.ssmItems:hover	{color:black;text-decoration:none;}
    A.ssmItems:active	{color:black;text-decoration:none;}
    A.ssmItems:visited	{color:black;text-decoration:none;}
    //-->
    </style>
    
    <SCRIPT SRC="ssm.js" language="JavaScript1.2">
    
    //Dynamic-FX slide in menu v6.5 (By maXimus, http://maximus.ravecore.com/)
    //Updated July 8th, 03' for doctype bug
    //For full source, and 100's more DHTML scripts, visit http://www.dynamicdrive.com
    
    </SCRIPT>
    
    <SCRIPT SRC="ssmItems.js" language="JavaScript1.2"></SCRIPT>
    Last edited by UnderLord; 09-06-2005 at 02:19 AM.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Give the iframe a name like:
    Code:
    <iframe name="main" src="some.htm"></iframe>
    Then use that name as the target value in the code:
    Code:
    ssmItems[1]=["Forums", "http://pk.darkuniverse.net/Forums","main"]
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Sep 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Alright thanks works like a charm =)

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Works here.
    PLEASE: Include the URL to your problematic webpage that you want help with.
    Last edited by jscheuer1; 09-06-2005 at 05:17 AM.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •