www.webdeveloper.com
Results 1 to 6 of 6

Thread: Simple image button in JavaScript

  1. #1
    Join Date
    Jun 2011
    Posts
    8

    Angry Simple image button in JavaScript

    Im trying to make a simple button with an image in JavaScript for my web page. The code is

    <FORM>
    <INPUT type="image" src="Files/ContinueButton.png" name="button1" style="z-index: 0; left: 105px; position: absolute; top: 310px" onClick="continue() ">
    </FORM>

    Everything else is ok, except when i click the button it should execute function continue() but it doesnt.

  2. #2
    Join Date
    Nov 2003
    Location
    Worthington, OH, USA
    Posts
    3,634
    Syntax looks correct, are you getting an error when loading or when clicking the button?
    54 68 65 42 65 61 72 4D 61 79

  3. #3
    Join Date
    Jun 2011
    Posts
    8
    I dont get any errors or anything, but when i click the button it doesnt run the function and adds

    ?button1.x=140&button1.y=20

    to the URL bar, and it shouldnt do that

  4. #4
    Join Date
    Jun 2011
    Posts
    8
    It doesnt work no matter what browser i use.

  5. #5
    Join Date
    Jun 2011
    Posts
    8
    Some1 please help...

  6. #6
    Join Date
    Jun 2011
    Posts
    8
    Oh, i found the problem..
    I used "continue" as a name of a function but continue is a function like in javascript so it ran the continue thing when i pressed the button, not my continue function.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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