...

View Full Version : what is the right script for this button



eyestrain
07-31-2010, 09:23 PM
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

semiSkim
08-01-2010, 12:23 AM
its a HTML button what's to explain?



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

djh101
08-01-2010, 03:49 AM
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.


<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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum