Check form field empty before submit

<script type="text/javascript" language="JavaScript">
function nameempty()
    if ( document.form.first_name.value == '' )
        alert('No Name was entered!')
        return false;
	 if(document.form.last_name.value == '')
		alert('No Last name entered!')
		return false;
	 if(document.form.address1.value == '')
		alert('No Address entered!')
		return false;
	 if( == '')
		alert('No City entered!')
		return false;
	 if( == '')
		alert('No Zip code entered!')
		return false;
 	 if(document.form.state.value == '')
		alert('No State entered!')
		return false;
	 if( == '')
		alert('No Country entered!')
		return false;

<form action="paypal.php" method="post" name="form" onSubmit="return nameempty();">
Fist Name:<input type="text" name="first_name" value=""><br />
Last Name:<input type="text" name="last_name" value=""><br />
Address1:<input type="text" name="address1" value=""><br />
Address2:<input type="text" name="address2" value=""><br />
City: <input type="text" name="city" value="" /> <br/>
State:<input type="text" name="state" value=""><br />
<input type="hidden" name="item_name" value=""><br/>
<input type="hidden" name="amount" value=""><br/>
Zip:<input type="text" name="zip" value=""><br />
Country:<input type="text" name="country" value=""><br />

<input type="image" src="" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!" >
<img alt="" border="0" src="" width="1" height="1">

Tagged: , , ,

20 thoughts on “Check form field empty before submit

  1. sprawl March 11, 2010 at 4:55 am Reply

    Do you have copy writer for so good articles? If so please give me contacts, because this really rocks! πŸ™‚

  2. OrdinarySomething March 12, 2010 at 6:12 pm Reply

    It is extremely interesting for me to read that blog. Thanks for it. I like such themes and anything connected to this matter. I would like to read more soon.

    Best wishes

  3. PaidSurveysOnline March 13, 2010 at 4:52 am Reply

    Cool site, you have inspired me to try and make one myself haha.

  4. AttaiftIninny March 20, 2010 at 1:19 pm Reply

    i very much adore your posting way, very unique,
    don’t quit and also keep creating because it simply just worth to read it,
    excited to look into a whole lot more of your own writing, have a good one πŸ™‚

  5. Phpdug March 29, 2010 at 1:42 pm Reply


    I saw this really great post today….

  6. midpart April 13, 2010 at 6:01 pm Reply

    Gays thanx for all so inspiring Reply……..

  7. Debt Relief April 21, 2010 at 5:35 am Reply

    Sorry for my bad english. Thank you so much for your good post. Your post helped me in my college assignment, If you can provide me more details please email me.

  8. Laurel Haulk April 26, 2010 at 3:03 am Reply

    I usually don’t post on Blogs but ya forced me to, great info.. excellent! … I’ll bookmark your site.

  9. Majid May 3, 2010 at 2:48 am Reply

    It above my understanding!

  10. agency escorts August 22, 2010 at 6:11 am Reply

    Pretty cool site you’ve got here. Thanx for it. I like such topics and anything connected to them. I would like to read a bit more soon.

    Julia Swenson

  11. GFlam November 21, 2011 at 12:07 am Reply

    This is great thanks a ton! really helped much appreciated!

  12. site May 26, 2012 at 8:55 pm Reply

    Im getting a browser error, is anyone else?

  13. Lael Wetzel October 26, 2012 at 12:44 am Reply

    I simply want to tell you that I’m all new to blogging and truly enjoyed your blog. Most likely I’m likely to bookmark your website . You really have amazing writings. Thank you for sharing with us your web-site.

  14. blackmart apk Android October 30, 2012 at 1:38 pm Reply

    Wow, wonderful blog layout! How long have you been blogging for? you make blogging look easy. The overall look of your site is fantastic, let alone the content!. Thanks For Your article about Check form field empty before submit Online Document .

  15. Check This Out November 7, 2012 at 5:39 am Reply

    I don’t normally comment but I gotta state appreciate it for the post on this amazing one : D.

  16. Try Here November 9, 2012 at 1:23 am Reply

    I like this website very much, Its a rattling nice post to read and find info .

  17. cold sore free forever review November 10, 2012 at 2:19 am Reply

    great post! loved it and will come back πŸ™‚

  18. continue reading November 13, 2012 at 7:24 am Reply

    The very next time I read a blog, Hopefully it does not disappoint me as much as this one. I mean, I know it was my choice to read through, but I really thought you would probably have something helpful to say. All I hear is a bunch of moaning about something that you could possibly fix if you were not too busy looking for attention.

  19. dig this November 20, 2012 at 5:03 am Reply

    Utterly pent written content , Really enjoyed examining .

  20. Franklyn Hollo November 26, 2012 at 8:38 am Reply

    I just want to say I am all new to weblog and absolutely enjoyed your web page. More than likely I’m want to bookmark your blog . You actually have incredible stories. Thanks a bunch for revealing your web-site.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: