You could put; and I'm a Javan00b, but I think this is what you mean:
It's not in Javascript ^^^^^^^
if checkbox = empty execute this function
if checkbox = filled execute this function
Here's my atepmt with the actual javascript :
Code:
<script type="text/javascript">
function displaymessage()
{
document.write("You just checked the checkbox!");
}
</script>
<form>
<input type="checkbox" onclick="document.write(displaymessage())" />
</form>
That script displays a message saying 'you just checked the checkbox!' when you click it.
Right now your code does nothing, it doesn't output anything, I mean. You need to give things name to correspond to the fiends.
Oh, and you don't want textareas, you want inputs.
Here's a simple input box that goes with a script.
Code:
<input type="text" id="myinputfield" />
Last edited by Physicsguy; 05-31-2009 at 11:47 AM..
|