Using Id: To Disable the Element: jQuery(‘#id’).attr(‘disabled’,’disabled’); //Here id is form element id To Enable the Element: jQuery(‘#id’).removeAttr(“disabled”); Using Name: To Disable the Element: jQuery(‘input[name=”elementname”]’).attr(‘disabled’,’disabled’); … disable and enable form element using jqueryRead more
Month: January 2011
Get the text box value using jquery
By using textboxid: jQuery(‘#texboxid’).val(); By using name: jQuery(‘input[name=”textboxname”]’).val();
Get hours, minutes and second of the current time using date function in php
<?php $hours = date(“H”); $minutes = date(“i”); $seconds = date(“s”); ?>
get number of days between two given dates using MySQL
SELECT DATEDIFF(“2007-03-07”, “2007-03-01”); // For static dates SELECT DATEDIFF(ColumnA, ColumnB); // For Table column based dates
Difference between include and require
require(): It will cause a fatal error and halt the execution of the script if the file not found. include(): If the file not found … Difference between include and requireRead more
get number of records count in mysql
To get the records count of table in mysql: SELECT COUNT(‘fieldname’) AS RecordsCount FROM TableName; (OR) SELECT COUNT(*) FROM TableName;
What is AJAX and it’s full form
Full Form: Asynchronous JavaScript and XML. Ajax uses web technologies on the client-side to create asynchronous web applications. With Ajax, web applications can send and … What is AJAX and it’s full formRead more
Get the current date using MySQL
SELECT NOW(); (OR) SELECT CURDATE(); (OR) SELECT CURRENT_DATE();
Submit a form without submit button
document.formname.submit(); //It will work when we are using single form in a page document.forms[‘formname’].submit(); //It will work when we are using multiple forms // above … Submit a form without submit buttonRead more
Maximum length of a Database name, Table name, Field name in MySQL
Database name: 64 characters Table name: 64 characters Column name: 64 characters