posted 16 years ago
Yes Sir,
i did it and it also working.
but sir is it possible,as i write a separate js file in which i find the element which has focus.
instead i give attribute onfocus to each element.
because sir there are 10 to 15 forms and each has 10 to 15 element.
i do it as:
function getElementWithFocus()
{
var f_ele = null;
for(var i=0;i<parent.mainFrame.document.forms.length;i++)
{
try
{
if ( parent.mainFrame.document.forms.elements[i].gotFocus )
{
alert( parent.mainFrame.document.forms.elements[i].name + ' has focus!');
f_ele = parent.mainFrame.document.forms.elements[i];
break;
}
}
catch (ex)
{
}
return f_ele;
}
}
but its not working or not showing any error.