image button causes reload

Discussion in 'HTML' started by meltedown, Apr 18, 2006.

  1. meltedown

    meltedown Guest

    On this page is a blue box with a javascript
    ticker:http://www.enneagraminstitute.com/indexproto.asp

    I have created pause, back and forward input buttons to control the
    ticker. The client doesn't like the default input buttons so I have
    tried to use images for input. I have only changed the forward botton on
    the right to an image button.

    For some reason the image button causes the page to reload to this url
    http://www.enneagraminstitute.com/indexproto.asp?ticker_forward.x=7&ticker_forward.y=6
    I don't know where "ticker_forward.x=7&ticker_forward.y=6" comes from-
    its not anything I did.

    The other buttons don't reload the page at all. Why is this image button
    causing the reload ? How do I get it to stop ?
     
    meltedown, Apr 18, 2006
    #1
    1. Advertisements

  2. meltedown

    Neredbojias Guest

    Sounds like something in this:

    <script type="text/javascript" src="ticker.js"></script>

    Got a 404 on ticker.js.
     
    Neredbojias, Apr 18, 2006
    #2
    1. Advertisements

  3. meltedown

    meltedown Guest

    I've never had a problem reaching the javascript file. The other buttons
    work fine, and they all work from the same file. I don't think this is
    the problem I'm having with the image button.

    However, maybe its another problem having to do with the server, or
    maybe even your particular browser. If so, I haven't a clue what could
    be causing it. The file is definitely there.
     
    meltedown, Apr 18, 2006
    #3
  4. meltedown

    BootNic Guest

    <input type="image" name="ticker_forward" onclick=
    "MoveTicker('forward');" src=
    "http://www.enneagraminstitute.com/images/forward.gif">

    That submits the form.

    Just use an image with an onclick.

    <img name="ticker_forward" onclick="MoveTicker('forward');"
    src="http://www.enneagraminstitute.com/images/forward.gif" alt=""
    id="ticker_forward">

    If you don't like that then I suppose you might get it to work if you add an
    action attribute to the form, action="javascript:void(this)" or maybe add
    onsubmit="return false;".

    http://validator.w3.org/check?uri=http://www.enneagraminstitute.com/indexproto.asp

    --
    BootNic Monday, April 17, 2006 9:33 PM

    Optimism and humor are the grease and glue of life. Without both of
    them we would never have survived our captivity.
    *Philip Butler, Vietnam POW*
     
    BootNic, Apr 18, 2006
    #4
  5. meltedown

    meltedown Guest

    Works great!! thanks.
    I know, I know. I brought up 'validation errors' with the other er...
    authors on the job and they thought I was some kind of nut. Does that
    ever happen to you ? I think these errors are mostly the result of using
    Dreamweaver. Actually, its alot better than it was a while ago. I've
    been chipping away at it.
     
    meltedown, Apr 18, 2006
    #5
  6. meltedown

    frederick Guest

    Most of what's left looked fixable in no time at all.
     
    frederick, Apr 18, 2006
    #6
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.