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
...@@ -2,49 +2,61 @@ function setActionVal1(value) ...@@ -2,49 +2,61 @@ 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;
alert("Enter Valid Flieght Code....");
return false;
}
else
{
var path = '/ibase/webitm/jsp/EmpFlightsave.jsp?flight_code='+selectedFlight+'&tran_id='+tranId ; var path = '/ibase/webitm/jsp/EmpFlightsave.jsp?flight_code='+selectedFlight+'&tran_id='+tranId ;
if( issError == false) if( issError == false)
{ {
post_to_url1(path,method); post_to_url1(path,method);
} }
} }
else
{
alert("Select Flieght Code from pophelp.");
issError == true;
}
} }
function post_to_url1(path, method) {
method = method || "post"; function post_to_url1(path,method)
var form = document.createElement("form"); {
form.setAttribute("method", method); var xmlhttp;
form.setAttribute("action", path); if (window.XMLHttpRequest)
document.body.appendChild(form); {// code for IE7+, Firefox, Chrome, Opera, Safari
form.submit(); xmlhttp=new XMLHttpRequest();
}
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(); 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