Web Analytics Made Easy -
StatCounter Help with image button - CodingForum

Announcement

Collapse
No announcement yet.

Help with image button

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help with image button

    I have this script that I use for a button,

    <input class="formbutton" type="button" onClick="doBUILD();" value="Build Text Area" tabindex="3">

    this is works for the regular button.

    but I changed it to the following to try and get an image instead:

    <input class="formbutton" type="image" src="includes\images\build.gif" onClick="doBUILD();" value="Build Text Area" tabindex="3">

    but when I click on the button, it asks if I want to save a file, if I click cancel it goes away. Is there away to stop that....

    it still does the function correctly.... just the problem with wanting to download the file....

    any suggestions???
    Last edited by jrmevans; Feb 20, 2004, 02:16 PM.

  • #2
    I couldn't reproduce what you described, but will guess that it has something to do with submission.
    INPUT type=image Element | input type=image Object
    --------------------------------------------------------------------
    Creates an image control that, when clicked, causes the form to be immediately submitted.

    Internet Development SDK
    Using onsubmit="return false;" for the form might prevent that.
    hmm... ?

    Comment


    • #3
      Okay I solved the issue

      I found some code to put into my css file. it goes like this:

      PHP Code:
      .build background-imageurl(buildform.gif); 
      then I change the main script like this:

      PHP Code:
      <input class="build" type="button" onClick="doBUILD();"  value="" tabindex="3">&nbsp
      I changed the "class" to the css reference. Removed the value. And now it works that way i need it to work.

      Just thought I would let ya'll know.
      Thank for all your help
      Last edited by jrmevans; Feb 21, 2004, 12:57 PM.

      Comment

      Working...
      X