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 2 of 2

Thread: button

  1. #1
    New to the CF scene
    Join Date
    Jun 2004
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    button

    Code:
    Strength [ <a href="javascript:stats.inc('strength')">+</a> ]
    how do I write a button to work like this javascript?

    I tried to write it like this:
    Code:
    <FORM METHOD="LINK" ACTION="javascript:stats.inc('strength')">
    <INPUT TYPE="submit" VALUE="+">
    </FORM>
    but it doesnt work,, why?

  • #2
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by daemon
    Code:
    Strength [ <a href="javascript:stats.inc('strength')">+</a> ]
    how do I write a button to work like this javascript?

    I tried to write it like this:
    Code:
    <FORM METHOD="LINK" ACTION="javascript:stats.inc('strength')">
    <INPUT TYPE="submit" VALUE="+">
    </FORM>
    but it doesnt work,, why?
    You did not like this? : <a href="javascript:stats.inc('strength')">+</a>

    For your button use type=button

    IE: <INPUT TYPE="button" VALUE="+" onclick="stats.inc('strength')">

    .....Willy


  •  

    Posting Permissions

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