How to Call a Javascript within HTML

Discussion in 'Javascript' started by Larry R Harrison Jr, Aug 11, 2004.

  1. I have a webpage for showing slideshows. I got the code from

    http://javascript.internet.com/miscellaneous/image-slideshow.html

    It's very simple, clean-looking, and small-sized.

    The only problem--it doesn't start the slideshow when you load it--and it
    tends to skip to slide #2. (I thus insert a "blank slide"--basically
    "nothing.jpg"--to make up for this.) The person has to click "start" once
    the page loads. I'd rather it start automatically.

    Seems easy enough--the function that the start button calls--and it calls it
    within HTML (not Java)--is a Java function called ap(text). The button calls
    it by saying "ap(this.value); I figure I would start it with something like
    ap.("name_of_1st_slide"). Problem is, I don't know what code will call it
    flat-out once the code loads--without the user having to click any buttons.
    That is what I need--the whatever that would go in front of ap.("nameof1st
    slide") to flat-out execute it upon loading of the webpage.

    Tips?

    LRH
     
    Larry R Harrison Jr, Aug 11, 2004
    #1
    1. Advertising

  2. Larry R Harrison Jr

    Kien Guest

    Hi,
    After looking at the (rather tidious) script,I suggest you try

    <body onload="rotate()">

    Kien
    http://users.bigpond.net.au/drkien/subaru/liberty_GT.html

    "Larry R Harrison Jr" <> wrote in message news:<g1jSc.5593$yh.1392@fed1read05>...
    > I have a webpage for showing slideshows. I got the code from
    >
    > http://javascript.internet.com/miscellaneous/image-slideshow.html
    >
    > It's very simple, clean-looking, and small-sized.
    >
    > The only problem--it doesn't start the slideshow when you load it--and it
    > tends to skip to slide #2. (I thus insert a "blank slide"--basically
    > "nothing.jpg"--to make up for this.) The person has to click "start" once
    > the page loads. I'd rather it start automatically.
    >
    > Seems easy enough--the function that the start button calls--and it calls it
    > within HTML (not Java)--is a Java function called ap(text). The button calls
    > it by saying "ap(this.value); I figure I would start it with something like
    > ap.("name_of_1st_slide"). Problem is, I don't know what code will call it
    > flat-out once the code loads--without the user having to click any buttons.
    > That is what I need--the whatever that would go in front of ap.("nameof1st
    > slide") to flat-out execute it upon loading of the webpage.
    >
    > Tips?
    >
    > LRH
     
    Kien, Aug 11, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Larry R Harrison Jr

    How to Call Java Function Within HTML

    Larry R Harrison Jr, Aug 11, 2004, in forum: HTML
    Replies:
    4
    Views:
    31,189
    Larry R Harrison Jr
    Aug 11, 2004
  2. mark4asp
    Replies:
    2
    Views:
    2,219
    Harry Haller
    Nov 7, 2006
  3. Fabio Mastria
    Replies:
    4
    Views:
    734
    Fabio Mastria
    Jan 28, 2008
  4. sajithkahawatta

    call a javascript function within code behind

    sajithkahawatta, Jun 20, 2007, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    384
    sajithkahawatta
    Jun 21, 2007
  5. nabilo
    Replies:
    1
    Views:
    150
    Jim Davis
    Sep 23, 2005
Loading...

Share This Page