Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jan 2004
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    submit button as image

    i have a submit button with the following code.
    <input type="submit" name="btnadd" value="Add">

    However, now i want to use an image as a button. How am i going to code it?

  • #2
    New to the CF scene
    Join Date
    Jan 2004
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    add this to your <head>:
    Code:
    <script language="javascript">
    function submitForm() {
    document.formName.submit();
    }
    (Replace formName with the name of the form)

    now call the function with a <a> tag:
    Code:
    <a href="javascript:submitForm()"><img src="pic.gif" bordor="0"></a>
    replace "pic.gif with the image you want to use.
    Last edited by cdn lover; 02-12-2004 at 01:40 AM.

  • #3
    Regular Coder
    Join Date
    Jan 2004
    Location
    Georgia
    Posts
    306
    Thanks
    0
    Thanked 0 Times in 0 Posts
    No need to use javascript...



    <input type="image" src="image.gif" name="submit" value="submit">
    ~Designer's Toolz~


  •  

    Posting Permissions

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