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
    Jul 2010
    Posts
    1
    Thanks
    1
    Thanked 0 Times in 0 Posts

    what is the right script for this button

    this is from php

    and its a button
    <input type='submit' value='GET YOUR VALUE'>
    </form>

    ";
    ?>

    I want to use this on javascript or html...
    is it the same?

    i really cant make that thing work...
    sory im just starting on this

    anyone please show me how...

    TIA..
    regards
    Last edited by eyestrain; 07-31-2010 at 08:27 PM.

  • #2
    Regular Coder
    Join Date
    Feb 2010
    Posts
    104
    Thanks
    5
    Thanked 3 Times in 3 Posts
    its a HTML button what's to explain?

    Code:
    <input type='submit' value='Button Name' />

  • #3
    Regular Coder djh101's Avatar
    Join Date
    May 2009
    Location
    California
    Posts
    626
    Thanks
    51
    Thanked 67 Times in 67 Posts
    It's a submit button, which submits all the data inside the form that it is contained in. If you want a button (not specifically a submit button), <input type="button" /> would take care of that, and you can alter the code accordingly. You can add a Javascript function to either type of button, though, but using button for type would be more appropriate if you're not submitting a form.
    Code:
    <input type="button" name="myButton" value="Click Me"
    			onClick="return confirmSubmit()" />
    <script type="text/javascript"><!--
    			function confirmSubmit(){
    				var agree=confirm("Are you want to press this button?");
    				if (agree) return true ;
    				else return false ; } // -->
    		</script>
    The above is a button that brings up a window confirming whether or not you want to press the button. The button itself, though, doesn't actually do anything.


  •  

    Posting Permissions

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