dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: Html: Slidshow display

  1. #1
    Join Date
    Jan 2009
    Location
    Los Angeles
    Posts
    24

    Html: Slidshow display

    I am trying to us the code below to display four pictures in a slide show but my problem is that only the first picture would show. Could somebody tell me what is strong with the code
    <script language="javascript">
    <Script>
    <!--------- Hide from non-javaScript browsers
    var num=1
    img1 = new Image ()
    img1.SCR="FH000006_1.jpg"
    img2 = new Image ()
    img2.SCR="IMG_0636.jpg"
    img3 = new Image ()
    img3.SCR="FH000006_1.jpg"
    img4 = new Image ()
    img4.SCR="FH000006_1.jpg"

    text1="Text for picture one"
    text2="Text for picture Two"
    text3="Text for picture Three"
    text4="Text for picture Four"

    function slidshowUp()
    {
    num=num +1
    if (num == 5)
    {num=1}
    document.mypic.src=eval("img"+num+".src")
    document.Yopics.alex.value=eval("text" + num)
    }



    function slidshowBack()
    {
    num=num - 1
    if (num == 0)
    {num=4}
    document.mypic.src=eval("img"+num+".src")
    document.Yopics.alex.value=eval("text" + num)
    }

    <!-----------stop hiding script-------->
    </script>


    IMG SRC="FH000006_1.jpg" NAME="mypic" BORDER=0 HEIGHT="100" WIDTH="100">

    <Form Name= "Yopics">
    <INPUT TYPE="text" width ="100" Name= "alex" VALUE="YO! Basketball" >

    </Form>
    <A href="javaScript: slidshowUp()"> Next</A>
    <A href="javaScript: slidshowBack()"> Back</A>



    Al

  2. #2
    Join Date
    Sep 2009
    Posts
    8
    try changing SCR with src

  3. #3
    Join Date
    Jan 2009
    Location
    Los Angeles
    Posts
    24

    Html: Slidshow display

    I changed the scr to src and I am still not able to activate the slide
    Last edited by alobi; 09-16-2009 at 03:36 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles