FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

form check

 


moeslimoen
I've tried to check a form

Last edited by moeslimoen on Wed Nov 28, 2007 12:00 am; edited 1 time in total
manav
cn u pls write the coments in english...

it would make it a lot easier for me to understand ur code and genuinly help u buddy....
SlovenianBoy
For checking fields:

Code:

<script type='text/javascript'>
function isEmpty(elem, helperMsg){
        if(elem.value.length == 0){
                alert(helperMsg);
                elem.focus();
                return true;
        }
        return false;
}
</script>
<form>
Required Field: <input type='text' id='req1'/>
<input type='button'
        onclick="isEmpty(document.getElementById('req1'), 'Please Enter a Value')"
        value='Check Field' />
</form>
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.