HomeSaturday, August 18, 2018, 20:19:20
4

How to check checkbox checked

Wednesday, February 18, 15, 17:43:45, 4 Yaers Ago Via cilipe, Hits: 7014
Checking if checkbox is checked with jQuery
Code:
<form>
<input type="checkbox" name="mycheckbox" id="fieldid" value="1" /> One<br>
<input type="submit" id="query" name="query" value="query" />
</form>
<div id="echo"></div>

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script>
$("form").submit(function(event) {
if($('#fieldid:checked').size() == '') {
$("#echo").text("Not Checked" ).show();
event.preventDefault();
return false;
}
$("#echo").text("Checked!").show();
return;
});
</script>

Sign In

Sponsor

Related

View content in a zip file with PHP

List all files in a zip archive with PHP

Smarty Paginate Example - Smarty Pagination with PHP

Smarty Paginate Example, Smarty Pagination with PHP. SmartyPaginate: a class/plugin for data set pagination within the Smarty template environment

MySQL Inner Join

MySQL Inner Join - Creating Dynamic Webpages Using PHP and MySQL, Requirement(s): PHP Server, MySQL

Creating a Math CAPTCHA with PHP - PHP Tutorial

This tutorial will show you how to create a form with Math Captcha.

PHP form with image upload

Advanced Contact Form with email and form field validation.It allows your visitors to send you an email directly from your website.Features: Image Upload, HTML Output, Captcha Image.

Email to Friend - PHP Script

This form allows your visitors to suggest your site to a friend. It features an HTML email format and an admin notification email.

How to set up password for phpMyAdmin in Wamp Server

Password for phpMyAdmin in Wamp

PHP Write to File

PHP Write to File :: PHP Tutorial, requirement(s): PHP server

PHP filesize

The filesize function returns the size of the specified file.

PHP Form Action Self Submit

PHP form action self submit tutorial, requirement(s): PHP server
About Author

wain

Date Registered: Sun, Feb 8, 15
Last Time Online: Sun, Mar 18, 18
So far has created 115 entries.
wain
This author has not yet filled in any details.