Commit 25dbff0d authored by caluka's avatar caluka

js for Flight Booking Link save data StarClub Employee details.[W14BSUN003]


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@95138 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 2959f635
function setActionVal1(value) function setActionVal1(value)
{ {
var issError = false; var issError = false;
var samplItem = []; var samplItem = [];
var method = "post";
var issError = false; var issError = false;
var samplItem = []; var samplItem = [];
var method = "post"; var method = "post";
var tranId = document.getElementById("tran_id").value; var tranId = document.getElementById("tran_id").value;
var selectedFlight = document.getElementById("flight_code").value; var selectedFlight = document.getElementById("flight_code").value;
if( selectedFlight == null ||selectedFlight.trim()== 0 ) if(selectedFlight != null && selectedFlight != "")
{ {
issError == true; var path = '/ibase/webitm/jsp/EmpFlightsave.jsp?flight_code='+selectedFlight+'&tran_id='+tranId ;
alert("Enter Valid Flieght Code...."); if( issError == false)
return false; {
} post_to_url1(path,method);
}
}
else else
{ {
alert("Select Flieght Code from pophelp.");
var path = '/ibase/webitm/jsp/EmpFlightsave.jsp?flight_code='+selectedFlight+'&tran_id='+tranId ; issError == true;
if( issError == false)
{
post_to_url1(path,method);
}
} }
} }
function post_to_url1(path, method) {
function post_to_url1(path,method)
method = method || "post"; {
var form = document.createElement("form"); var xmlhttp;
form.setAttribute("method", method); if (window.XMLHttpRequest)
form.setAttribute("action", path); {// code for IE7+, Firefox, Chrome, Opera, Safari
document.body.appendChild(form); xmlhttp=new XMLHttpRequest();
form.submit(); }
window.close(); else
} {// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open(method,path,true);
xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
xmlhttp.onreadystatechange= function ()
{
if (xmlhttp.readyState==4)
{ if (xmlhttp.status == 200)
{ var time = xmlhttp.responseText;
window.close();
}
}
}
xmlhttp.send();
}
function openPophelp(id) function openPophelp(id)
{ {
var selectedFlight = document.getElementById("flight_code").value; var selectedFlight = document.getElementById("flight_code").value;
var url = '/ibase/webitm/jsp/empTravelFlightCode.jsp?flight_code='+selectedFlight; var url = '/ibase/webitm/jsp/empTravelFlightCode.jsp?flight_code='+selectedFlight;
var win = window.open( url, '', 'toolbar=no,status=yes,resizable=no,scrollbars=yes,left=100,top=50,width=500,height=406' ); var win = window.open( url, '', 'toolbar=no,status=yes,resizable=no,scrollbars=yes,left=100,top=50,width=500,height=406' );
win.focus();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment