Jquery Tutorials
- What is JQuery
- DOM Document Object Model
- JQuery Syntax
- Jquery Selector
- Get & Set Form value
- jQuery - Attributes
- Attribute Methods
- jQuery - DOM Manipulation
- JQuery Events
- JQuery Effects
- JQuery Html/Css
- jQuery Insert Content
- Auto Hide Div
- JQuery noConflict()
- JQuery Form Validation
- Form Validation
- Login Form Validation
- Jquery Fadeout message
- Modal popup
- Jquery Ajax Forms
- Dependent Dropdown
- Autocomplete Country jquery ajax
- Dynamic Content Load using jQuery AJAX
- Dynamic star rating jQuery AJAX
- Drag and Drop Image Upload
- show Hide Elements By click on checkbox
- How to Add class in jQuery
- calculate discount in jQuery
- Calculate GST by input value in text box
- check Password strength in jQuery
- Count Remaining Character
- onClick Checkbox check all
- password match or not
- DataTable
- Date Picker
- Multiselect Dropdown with Checkbox
- Add Dynamic Input Field (Add More Input Field)
- submit button disable after one click
- Show hide password in Password textbox using checkbox
- Put value in the text field
- Set Data and Attributes
Customer Say
How to put value in the text field.
File name : index.php
function create_newISNO(val){
var ISID = document.getElementById("isid").options[document.getElementById("isid").selectedIndex].text;
var oldISID = ISID.split(':')[0];
var newdocNumber = oldISID;
if($("#docType").val()!= ''){
newdocNumber = $("#docType").val() + ' ' + $("#docNum").val();
}
if($("#part").val()!= ''){
newdocNumber = newdocNumber + ' : Part ' + $("#part").val();
}
if($("#section").val()!= ''){
newdocNumber = newdocNumber + ' : Sec ' + $("#section").val();
}
if($("#subsection").val()!= ''){
newdocNumber = newdocNumber + ' : SubSec ' + $("#subsection").val();
}
$("#newdocNumber").val(newdocNumber);
}
Example :-
File name : index.php
function genDocnum(docNum)
{
var docType = document.getElementById("docType").options[document.getElementById("docType").selectedIndex].text;
var docNum = docNum;
var part = 'Part' + ' ' + document.getElementById("part").value;
/*var Part = 'Part';*/
/*var part1 = Part.concat(' ',part);*/
var Section = ' ' + ':'+ ' '+ 'Sec' + ' ' + document.getElementById("section").value;
var SubSection = ' ' + ':'+ ' '+ 'SubSec' + ' ' + document.getElementById("subsection").value;
var year = document.getElementById("yearStd").value;
var docValue = docType.concat(' ',docNum,' ');
var docValue1 = docValue.concat(':',' ',part);
var docValue2 = docValue1.concat(Section);
var docValue3 = docValue2.concat(SubSection);
if(document.getElementById("part").value =='' && document.getElementById("section").value =='')
{
document.getElementById("docNumber").value= docValue;
document.getElementById("docYear").value= year;
}
else if(document.getElementById("part").value !='' && document.getElementById("section").value =='')
{
document.getElementById("docNumber").value= docValue1;
document.getElementById("docYear").value= year;
}
else if(document.getElementById("part").value !='' && document.getElementById("section").value !='' && document.getElementById("subsection").value =='')
{
document.getElementById("docNumber").value= docValue2;
document.getElementById("docYear").value= year;
}
else if(document.getElementById("part").value !='' && document.getElementById("section").value !='' && document.getElementById("subsection").value !='')
{
document.getElementById("docNumber").value= docValue3;
document.getElementById("docYear").value= year;
}
}
File name : index.php
File name : index.php