J
John
In my script
<script language="javascript">
function AddItinerary()
{
var newRow;
var newCell1,newCell2,newCell3,newCell4,newCell5,newCell6;
newRow = document.createElement("tr");
newCell1 = document.createElement("td");
newCell2 = document.createElement("td");
newCell3 = document.createElement("td");
newCell4 = document.createElement("td");
newCell5 = document.createElement("td");
newCell6 = document.createElement("td");
var depdate = AirItineraryForm.DepDate_TextBoxID.value + " " +
AirItineraryForm.cmbDepHH + ":" + AirItineraryForm.cmbDepMM;
var arrdate = AirItineraryForm.ArrDate_TextBoxID.value + " " +
AirItineraryForm.cmbArrHH + ":" + AirItineraryForm.cmbArrMM;
newCell1.innerHTML = "<span
style=\"color:#003366;font-family:Trebuchet MS;font-size:X-Small;\">"
+ AirItineraryForm.txtDepFrom.value + "</span>";
newCell2.innerHTML = "<span
style=\"color:#003366;font-family:Trebuchet MS;font-size:X-Small;\">"
+ AirItineraryForm.txtDesig.value + "</span>";
newCell3.innerHTML = "<span
style=\"color:#003366;font-family:Trebuchet MS;font-size:X-Small;\">"
+ depdate + "</span>";
newCell4.innerHTML = "<span
style=\"color:#003366;font-family:Trebuchet MS;font-size:X-Small;\">"
+ arrdate + "</span>";
newCell5.innerHTML = "<span
style=\"color:#003366;font-family:Trebuchet MS;font-size:X-Small;\">"
+ AirItineraryForm.txtClass.value + "</span>";
newCell6.innerHTML = "<span
style=\"color:#003366;font-family:Trebuchet MS;font-size:X-Small;\">"
+ AirItineraryForm.txtFlight.value + "</span>";
newRow.appendChild(newCell1);
newRow.appendChild(newCell2);
newRow.appendChild(newCell3);
newRow.appendChild(newCell4);
newRow.appendChild(newCell5);
newRow.appendChild(newCell6);
/**************************************************************/
alert("About to add"); // upto this it is working
/**************************************************************/
/* Not Working after this line */
/***************************************************************
window.opener.tblAirTravel.firstChild.appendChild(newRow);
alert("Added to Table");
return true;
}
What i have to do to add a row dynamically to the table in the parent
window?
Thanks in Advance
John.
<script language="javascript">
function AddItinerary()
{
var newRow;
var newCell1,newCell2,newCell3,newCell4,newCell5,newCell6;
newRow = document.createElement("tr");
newCell1 = document.createElement("td");
newCell2 = document.createElement("td");
newCell3 = document.createElement("td");
newCell4 = document.createElement("td");
newCell5 = document.createElement("td");
newCell6 = document.createElement("td");
var depdate = AirItineraryForm.DepDate_TextBoxID.value + " " +
AirItineraryForm.cmbDepHH + ":" + AirItineraryForm.cmbDepMM;
var arrdate = AirItineraryForm.ArrDate_TextBoxID.value + " " +
AirItineraryForm.cmbArrHH + ":" + AirItineraryForm.cmbArrMM;
newCell1.innerHTML = "<span
style=\"color:#003366;font-family:Trebuchet MS;font-size:X-Small;\">"
+ AirItineraryForm.txtDepFrom.value + "</span>";
newCell2.innerHTML = "<span
style=\"color:#003366;font-family:Trebuchet MS;font-size:X-Small;\">"
+ AirItineraryForm.txtDesig.value + "</span>";
newCell3.innerHTML = "<span
style=\"color:#003366;font-family:Trebuchet MS;font-size:X-Small;\">"
+ depdate + "</span>";
newCell4.innerHTML = "<span
style=\"color:#003366;font-family:Trebuchet MS;font-size:X-Small;\">"
+ arrdate + "</span>";
newCell5.innerHTML = "<span
style=\"color:#003366;font-family:Trebuchet MS;font-size:X-Small;\">"
+ AirItineraryForm.txtClass.value + "</span>";
newCell6.innerHTML = "<span
style=\"color:#003366;font-family:Trebuchet MS;font-size:X-Small;\">"
+ AirItineraryForm.txtFlight.value + "</span>";
newRow.appendChild(newCell1);
newRow.appendChild(newCell2);
newRow.appendChild(newCell3);
newRow.appendChild(newCell4);
newRow.appendChild(newCell5);
newRow.appendChild(newCell6);
/**************************************************************/
alert("About to add"); // upto this it is working
/**************************************************************/
/* Not Working after this line */
/***************************************************************
window.opener.tblAirTravel.firstChild.appendChild(newRow);
alert("Added to Table");
return true;
}
What i have to do to add a row dynamically to the table in the parent
window?
Thanks in Advance
John.