Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mozilla Compatibility????

Status
Not open for further replies.

tmilluah4

Programmer
Joined
Jan 16, 2007
Messages
8
Location
US
The red highlighted portion of this code is throws fits in Mozilla but works fine in IE...Im trying to make this cross browser compatible so does anything jump out in this that Mozilla is going to throw a red flag at????

function AddMenuOptions(strID,ParentChartId)
{


var inputColl = document.getElementByIdstrID).getElementsByTagName('INPUT');
var idColl = ParentChartId;

var idComponents = strID.split('_');
if(idComponents.length == 2)
{
idColl = idComponents[1];
}

for(i=0;i<inputColl.length;i++)
{

if(inputColl.type.toUpperCase() == "CHECKBOX")
{

if(idColl != "")
{
idColl += "|";
}
This code works in IE but not in Mozilla, can someone please tell me the correct standard and syntax I should be using to be cross browser compatible....THANX!!!
idColl += inputColl.parentElement.getAttribute('ChartID')+"="+inputColl.checked.toString();



}
}

document.getElementById('<%= this.ModBOX.ClientID %>').value = idColl;
document.getElementById('<%= this.MODBTN.ClientID %>').click();// nav w/o saving cntrl collection
}
 
parentElement is IE only, use parentNode

-kaht

[small](All puppies have now found loving homes, thanks for all who showed interest)[/small]
 
That was it...THANKS KAHT!!!!!!!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top