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)
{
var issError = false;
var samplItem = [];
var method = "post";
var issError = false;
var samplItem = [];
var method = "post";
var tranId = document.getElementById("tran_id").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 ;
if( issError == false)
{
post_to_url1(path,method);
}
}
else
{
alert("Select Flieght Code from pophelp.");
issError == true;
}
}
function post_to_url1(path, method) {
method = method || "post";
var form = document.createElement("form");
form.setAttribute("method", method);
form.setAttribute("action", path);
document.body.appendChild(form);
form.submit();
function post_to_url1(path,method)
{
var xmlhttp;
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
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();
}
}
}
xmlhttp.send();
}
function openPophelp(id)
{
var selectedFlight = document.getElementById("flight_code").value;
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' );
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