<script type="text/javascript">
function documentTepe() {
var dt3 = document.getElementById('docType_text'); // As combo
var docType_text = dt3.options[dt3.selectedIndex].value;
alert("docType_text"+docType_text);
if(docType_text == 0 || docType_text == 4 || docType_text == 5 || docType_text == 6 || docType_text == 7 || docType_text == 8 || docType_text == 9){
//prapto_place_oneText
alert("and sign");
document.getElementById('prapto_place_oneText').style.display = 'none';
document.getElementById('prapto_place_twoText').style.display = 'none';
document.getElementById('prapto_place_threeText').style.display = 'none';
document.getElementById('prapto_place_tenText').style.display = 'none';
document.getElementById('prapto_place_elevenText').style.display = 'none';
}
</script>
******************************************
var dutyDrA = document.getElementById('dutyDr').checked; //As check box
//alert("dutyDrA"+dutyDrA);
var full_nameA = document.getElementById('full_name').value; //As input field
alert("full_nameA"+full_nameA);
RAPH
Radio :Gender
----------------
Step 1:Page Design
<input name="" type="radio" value="" />Male</span>
<span><input name="" type="radio" value="" />Female</span>
<span><input name="" type="radio" value="" />Others</span>
Step 2:only Save (Insert situation)
N.B: No need if else apply
N.B: name is common when get value script
<td colspan="2" class="textAlignL">
<span><input id="genderOne" name="gender" type="radio" value="M" />Male</span>
<span><input id="genderTwo" name="gender" type="radio" value="F" />Female</span>
<span><input id="genderThree" name="gender" type="radio" value="O" />Others</span>
</td>
Step 3: Get value using script For Radio Button
//***** Start this portion is use for get Gender radio button value //gender(genderOne,genderTwo,genderThree)
var radiosA=document.getElementsByName('gender');
alert("radiosA"+radiosA);
var statusValA;
for (var i = 0, length = radiosA.length; i < length; i++) {
if (radiosA[i].checked) {
statusValA=radiosA[i].value;
alert("statusValA"+statusValA);
break;
}
}
N.B: statusValA( This value will be pass in the java class file )
function documentTepe() {
var dt3 = document.getElementById('docType_text'); // As combo
var docType_text = dt3.options[dt3.selectedIndex].value;
alert("docType_text"+docType_text);
if(docType_text == 0 || docType_text == 4 || docType_text == 5 || docType_text == 6 || docType_text == 7 || docType_text == 8 || docType_text == 9){
//prapto_place_oneText
alert("and sign");
document.getElementById('prapto_place_oneText').style.display = 'none';
document.getElementById('prapto_place_twoText').style.display = 'none';
document.getElementById('prapto_place_threeText').style.display = 'none';
document.getElementById('prapto_place_tenText').style.display = 'none';
document.getElementById('prapto_place_elevenText').style.display = 'none';
}
</script>
******************************************
var dutyDrA = document.getElementById('dutyDr').checked; //As check box
//alert("dutyDrA"+dutyDrA);
var full_nameA = document.getElementById('full_name').value; //As input field
alert("full_nameA"+full_nameA);
RAPH
Radio :Gender
----------------
Step 1:Page Design
<input name="" type="radio" value="" />Male</span>
<span><input name="" type="radio" value="" />Female</span>
<span><input name="" type="radio" value="" />Others</span>
Step 2:only Save (Insert situation)
N.B: No need if else apply
N.B: name is common when get value script
<td colspan="2" class="textAlignL">
<span><input id="genderOne" name="gender" type="radio" value="M" />Male</span>
<span><input id="genderTwo" name="gender" type="radio" value="F" />Female</span>
<span><input id="genderThree" name="gender" type="radio" value="O" />Others</span>
</td>
Step 3: Get value using script For Radio Button
//***** Start this portion is use for get Gender radio button value //gender(genderOne,genderTwo,genderThree)
var radiosA=document.getElementsByName('gender');
alert("radiosA"+radiosA);
var statusValA;
for (var i = 0, length = radiosA.length; i < length; i++) {
if (radiosA[i].checked) {
statusValA=radiosA[i].value;
alert("statusValA"+statusValA);
break;
}
}
N.B: statusValA( This value will be pass in the java class file )
No comments:
Post a Comment