Welcome to TalkGraphics.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Location
    East Coast NC
    Posts
    111

    Default scroll over text to load images issue - need help - code included on here

    I am trying to get several text lines (which when the cursor passes over) loads an individual picture in a fixed location above the text. There will be 7 total individual lines of information that will load an individual picture of said line with a different picture. Is there a way to do this?

    I have included the javascript that I worked on but cannot seem to have the images load properly. i keep getting syntax errors. Any help would be appreciated.

    <script>
    function changeimage(towhat,url){
    if (document.images){
    document.images.targetimage.src=towhat.src
    gotolink=url
    }
    }
    function warp(){
    window.location=gotolink
    }
    </script>
    <script language="JavaScript1.1">
    var myimages=new Array()
    var gotolink="#"

    function preloadimages(){
    for (i=0;i<preloadimages.arguments.length;i++){
    myimages[i]=new Image()
    myimages[i].src=preloadimages.arguments[i]

    }

    preloadimages("pic1.jpg", "pic2.jpg", "pic3.jpg", "pic4.jpg", "pic5.jpg", "pic6.jpg", "pic7.jpg")

    <script>

    <a href="pic1.htm" onMouseover="changeimage(myimages[pic1.jpg],this.href)">Pic 1</a>
    <a href="pic2.htm" onMouseover="changeimage(myimages[pic2.jpg],this.href)">Pic 2</a>
    <a href="pic3.htm" onMouseover="changeimage(myimages[pic3.jpg],this.href)">Pic 3</a>
    <a href="pic4.htm" onMouseover="changeimage(myimages[pic4.jpg],this.href)">Pic 4</a>
    <a href="pic5.htm" onMouseover="changeimage(myimages[pic5.jpg],this.href)">Pic 5</a>
    <a href="pic6.htm" onMouseover="changeimage(myimages[pic6.jpg],this.href)">Pic 6</a>
    <a href="pic7.htm" onMouseover="changeimage(myimages[pic7.jpg],this.href)">Pic 7</a>


    </script>
    Please visit my website at: http://www.jenerationz.com

  2. #2

    Default Re: scroll over text to load images issue - need help - code included on here

    That script is broken, look at it carefully.

    Besides, if I understand you correctly, this can be done in XWD/Xtreme without extra code.

    Here's what I just did using XWD alone.

    The mouse over (cursor passes overs) loads images in fixed location above the text line.

    DEMO HERE

    All files in attached zip.

    (Ooops, just noticed I got you mixed up with another member name )
    Attached Files Attached Files

  3. #3
    Join Date
    Mar 2004
    Location
    East Coast NC
    Posts
    111

    Default Re: scroll over text to load images issue - need help - code included on here

    that is exactly what I have been trying to accomplish... thank you so much!!!
    Please visit my website at: http://www.jenerationz.com

 

 

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
  •