PDA

View Full Version : Is This Possible ???????


shaz1987
12-08-2006, 12:02 AM
if a text box is less then 20.99 a message should appear saying pay for it

so if any value under 20.99 is entered the message will appear




<script>


<script>



function show()
{


y=document.form


z=y.one.value

if (z.price<20.99)

{
alert("pay for it ")

}


}

</script>

<form name = form>

<input type="text" name= "one" value="20.99">

<input type="button" name= "two" onclick= return show()>

BonRouge
12-08-2006, 04:45 AM
Yes, that's possible.

Your script tags are incomplete by the way. They should look like this: <script type="text/javascript">
...
...
</script>
You should only have one opening tag.