Results 1 to 2 of 2

Thread: images with mouseover directly in JS

  1. #1
    Join Date
    Apr 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default images with mouseover directly in JS

    1) Script Title: Conveyor Belt slideshow script

    2) Script URL (on DD): http://dynamicdrive.com/dynamicindex...rightslide.htm

    3) Describe problem:

    Hi,
    i want to use in the script another one for change the images by mouseover.
    With images in HTML it is very simple by using following code:

    HTML Code:
    ...
    <img... onmouseover="change('images/comings/thumbnails/color/bild1.jpg','dia1')" onmouseout="change('images/comings/thumbnails/blacknwhite/bild2.jpg','dia1')" name="dia1">
    ...
    <script type="text/javascript">
    function change(url,name){
    	window.document.images[name].src = url;
    	}
    </script>
    But how i have to change the code above for the "Conveyor Belt slideshow"?

    The images are in an array directly in JS and if i want to put something similar (mouseover etc.) in the their <img>-tag, they doesn't even get showed...
    I assume that i have to give them id's (p.e. img0 to imgX) - is that correct?
    and then use something like that:

    Code:
    document.getElementById("img0").onmouseover = function() {
      // call function
    };
    But unfortunately i don't have any idea where to put this in the script that it works
    It would be very kind of somebody of you could help me with this problem.
    Passed already quite some time that i am looking for a solution!

    Thanks a lot

  2. #2
    Join Date
    Apr 2009
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    PLEASE give me a feedback, give me a hint...
    What is the matter?

    Too stupid question, too dificult problem? I really don't know how to solve the problem or how to search for a solution.

    Thanks for any advice!!

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
  •