This works with your first question. Might work for all. html: <form .......... onsubmit="return validate()"> <input ........ name="name"> </form>
javascript: function validate() { form = document.name_of_form; if( form.name.value == '' ) { alert( "You forgot to write your name." ); document.forms[0].name.focus(); return false; } else { return true; } } tommy "Denis L. Menezes" <[EMAIL PROTECTED]> wrote in message 001401c2b8c4$3da5ebe0$942d7dcb@pcdenisxp">news:001401c2b8c4$3da5ebe0$942d7dcb@pcdenisxp... Hello friends, Can someone please redirect me to some source with javascript for following? 1. Checking if a text box is populated before going to the next page. 2. To check if any item is selected in a listbox before posting data to the next page. 3. to check if a radio button is selected before posting data to the next page. Many thanks denis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php