Changing Text/iframe content with Rollover

Ask a Question related to Macromedia Dynamic HTML, Design and Development.

  1. #1

    Default Changing Text/iframe content with Rollover

    Hello,

    I'm using a simple JavaScript to change a display of images on rollover, like
    a script you'd use for navbar buttons, but 6 images at once. It works fine.

    Now I'd like to add code to change some text on the page, as well. I've placed
    the text in a series of external html files, and have been trying to load them
    using a variety of combinations of .src, .location. location.href etc. as
    you'll see in the code below. Haven't been able to find the right syntax.

    I can change the content in the iframe on click, but we'd like it to change
    when the images change - on rollover.

    Is there a way to change the contents of the iFrame on rollover rather than on
    click? Or is there a better strategy than using an iframe.

    Code snippet below, including commented out attempts that didn't work.

    Thanks in advance,


    both "name" and "id" are set to "detailsFrame" in the iframe tag.

    function pixAct(pixName){
    document.src = pix1off.src;
    document.src = pix2off.src;
    document.src = pix3off.src;
    document.src = pix4off.src;
    document.src = pix5off.src;
    document.src = pix6off.src;
    document.src = eval(pixName + "on.src");

    //document.frame.src = "credits01.htm";
    //document."detailsFrame".location = "credits01.htm";
    //document.frame.location = "credits01.htm";
    //document."detailsFrame".location.href = "credits01.htm";
    //document..src = "images/credits/Tree_tint.jpg";
    //document..src = "credits01.htm";
    //document..write() = "Please work";
    }

    Andigo Guest

  2. Similar Questions and Discussions

    1. iFrame Blank Content Error
      I am creating the navigation for a website using flex, i have the menu (by itself) functioning. I am using an iFrame component, borrowed from this...
    2. changing dynamic text content on attachMovie
      I have a MC that is brought on stage via attachMovie. The MC has a dynamic text that is defined on the attach action. My problem is I would like to...
    3. Persistent 'nonsecure content' message when loading a file into an IFRAME element
      Guys and gals, I am having a problem with an IFRAME that is embedded into an ASPX page (ASP.NET application). The IFRAME is originally empty...
    4. changing a text members text content with lingo
      Is there a way of setting the content of a text member through lingo, specifying where there should be Carriage Return. I have a director movie...
    5. Changing IFRAME Source Dynamically from inner script
      I have an HTML document with two <IFRAME> tags <iframe src='Page1.htm' name='frPage1' width='241' height='322' </iframe> <iframe src='Page2.htm'...
  3. #2

    Default Re: Changing Text/iframe content with Rollover

    [url]http://www.insidedhtml.com/tips/contents/ts06/page2.asp[/url]
    and
    [url]http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm[/url]

    may shed some light
    akribie Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139