Results 1 to 2 of 2

Thread: Textual tool script question (between frames)

  1. #1
    Join Date
    Apr 2005
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Textual tool script question (between frames)

    http://www.dynamicdrive.com/dynamicindex5/linkinfo.htm

    I am using this script and manage to make it work in one frame. But how do I do to make it work in 2 frames? Say that I move the mouse over a link in "frame A", how do I make the text appear somewhere in "frame B"?

  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

    Make up a frameset page, something like so:

    HTML Code:
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    </head>
    <frameset cols="50%,50%">
    <frame name="left" src="text1.htm">
    <frame name="right" src="text2.htm">
    </frameset>
    </html>
    Save it as top.htm or something.

    Now, on text1.htm, make it a regular HTML page and put everything from step 1 and the first part of step 2 from the demo of this script on it.

    Make these changes to the script in the 'function changetext(whichcontent)' (additions red):

    Code:
    function changetext(whichcontent){
    
    if (document.all||document.getElementById){
    cross_el=document.getElementById? parent.right.document.getElementById("descriptions"):parent.right.document.all.descriptions
    cross_el.innerHTML='<font face="Verdana"><small>'+whichcontent+'<font></small>'
    }
    else if (document.layers){
    parent.right.document.d1.document.d2.document.write('<font face="Verdana"><small>'+whichcontent+'</small></font>')
    parent.right.document.d1.document.d2.document.close()
    }
    
    }
    where 'right' is the name of the target frame as it is in my demo frameset at the top of this post.

    Finally, put the code from step 2 second part on text2.htm. Put all three files in the same directory, open up top.htm in your browser and you are off to the races!
    Last edited by jscheuer1; 11-26-2005 at 11:04 PM.
    - 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
  •