Advertisement
Advertisement
| 04.21.2008 at 11:35PM PDT, ID: 23341990 | Points: 50 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: |
<html>
<head>
<title>Departure Card for Bangladeshi</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="new.css" rel="stylesheet" type="text/css">
<?php
require("common.php");
?>
<script language="javascript" src="Jquery.js"></script>
<script language="javascript">
function makeSublist(parent, child, isSubselectOptional, childVal) {
$("body").append("");
$('#' + parent + child).html($("#" + child + " option"));
var parentValue = $('#' + parent).attr('value');
$('#' + child).html($("#" + parent + child + " .sub_" + parentValue).clone());
childVal = (typeof childVal == "undefined") ? "" : childVal;
$("#" + child + ' option[@value="' + childVal + '"]').attr('selected','selected');
$('#' + parent).change(
function() {
var parentValue = $('#' + parent).attr('value');
$('#' + child).html($("#" + parent + child + " .sub_" + parentValue).clone());
if (isSubselectOptional) {
$('#' + child).prepend(" More ");
}
if (document.getElementById(child)) {
if (document.getElementById(child).options.length == 1) {
document.getElementById(child).style.visibility = 'hidden';
} else {
document.getElementById(child).style.visibility = 'visible';
$('#' + child).trigger("click");
}
} else {
$('#' + child).trigger("click");
}
$('#' + child).trigger("change");
}
);
}
$(document).ready(function()
{
makeSublist('child','grandsun', true, '');
makeSublist('parent','child', false, '1');
});
function ComboText(ctlComboBox,ctlHidden)
{
val=ctlComboBox.value;
cla=ctlComboBox.className;
alert(ctlComboBox.className);
for ( i = 0; i < ctlComboBox.options.length; i++ )
{
if (ctlComboBox.options[i].value==val)
{
alert(ctlComboBox.options(i).className);
if (ctlComboBox.options[i].value==val && ctlComboBox.options[i].className==cla)
{
ctlHidden.value=ctlComboBox.options[i].text;
alert(ctlComboBox.options[i].text);
}
}
}
}
</script>
</head>
<form id="cascade" name="cascade" action="cascade3.php" method="post">
<select id="parent" style="width:200px;">
<?php // id="cascade" name="cascade" action="cascade3.php" method="post"
$c = OpenDatabase();
$rsDistrict = get_DivisionList();
oci_execute($rsDistrict);
while ($x = oci_fetch_array($rsDistrict)) {
echo "<OPTION value=".qt.$x['DIVISION_CODE'].qt.">".$x['DIVISION_NAME']."</OPTION>";
}
oci_close($c);
?>
</select>
<select name="child" id="child" style="width:200px;" onChange="ComboText(document.this(),document.child_hidden)">
<?php
$c = OpenDatabase();
$rsVillage = get_DistrictList();
oci_execute($rsVillage);
while ($x = oci_fetch_array($rsVillage)) {
echo "<OPTION class=".qt."sub_".$x['DIVISION_CODE'].qt." value=".qt.$x['DISTRICT_CODE'].qt.">".$x['DISTRICT_NAME']."</OPTION>";
}
oci_close($c);
?>
</select>
<input name="child_hidden" type="text" id="child_hidden">
<select id="grandsun" style="width:200px;">
<option value="" selected>Select Thana----</option>
<?php
$c = OpenDatabase();
$rsThana = get_ThanaList();
oci_execute($rsThana);
while ($x = oci_fetch_array($rsThana)) {
echo "<OPTION class=".qt."sub_".$x['DISTRICT_CODE'].qt." value=".qt.$x['THANA_CODE'].qt.">".$x['THANA_NAME']."</OPTION>";
}
oci_close($c);
?>
</select>
</form>
<body>
</body>
</html>
|