Got some script that works fine in IE but not FF
Here the cut down version of HTML
<div id="jsBlock">
<ul>
<li><input type="checkbox" name="mesGroups[]"checked="checked" value="1"/>Group 1 <span class="sml">[<a href="#" name="viewContacts1" src="1" mth="vContacts">View contacts</a>]</span></li>
<li><input type="checkbox" name="mesGroups[]"checked="checked" value="3"/>Group 2 <span class="sml">[<a href="#" name="viewContacts3" src="3" mth="vContacts">View contacts</a>]</span></li>
</ul>
</div>
Here is the javascript
window.onload=function()
{
var d1=document.getElementById('jsBlock')
applyBehaviour(d1,MyHTC);
}
function MyHTC(aArgs)
{
this.inherit(HTC);
this.inherit(WebServiceConnector);
var oThis=this;
/*=== @desc : Internal entry point for class to initialize and execute itself ===*/
function init()
{
var myA=oThis.getElementsByTagName("a");
for(var i=0;i<myA.length;i++)
{
alert(myA.src); // FIREFOX doesn't / IE does and returns 1 and 3
alert(my.name); //FIREFOX/IE works fine gives me viewContacts1 and viewContacts3 like it should
}
}
init();
}
Here the cut down version of HTML
<div id="jsBlock">
<ul>
<li><input type="checkbox" name="mesGroups[]"checked="checked" value="1"/>Group 1 <span class="sml">[<a href="#" name="viewContacts1" src="1" mth="vContacts">View contacts</a>]</span></li>
<li><input type="checkbox" name="mesGroups[]"checked="checked" value="3"/>Group 2 <span class="sml">[<a href="#" name="viewContacts3" src="3" mth="vContacts">View contacts</a>]</span></li>
</ul>
</div>
Here is the javascript
window.onload=function()
{
var d1=document.getElementById('jsBlock')
applyBehaviour(d1,MyHTC);
}
function MyHTC(aArgs)
{
this.inherit(HTC);
this.inherit(WebServiceConnector);
var oThis=this;
/*=== @desc : Internal entry point for class to initialize and execute itself ===*/
function init()
{
var myA=oThis.getElementsByTagName("a");
for(var i=0;i<myA.length;i++)
{
alert(myA.src); // FIREFOX doesn't / IE does and returns 1 and 3
alert(my.name); //FIREFOX/IE works fine gives me viewContacts1 and viewContacts3 like it should
}
}
init();
}