:: Forum >>

Firefox focus on AW.UI.Button requires multiple tabs

Hi,
This is basically my script for a button which is required to clear some fields.

<HEAD>
<LINK rel="stylesheet" type="text/css" HREF="/aw/styles/aw.css">
<script src="/aw/scripts/aw.js" type="text/javascript"></script>
<script>
AW.UI.ClearButton=AW.UI.Button.subclass();
AW.UI.ClearButton.create=function()
{
        var obj=this.superclass.prototype;
        obj.setControlText("CLEAR");
};

AW.UI.ClearButton.prototype.addTable=function(obj,rowArr,tabind)
{
    
    if(tabind)
    this.setAttribute("tabIndex",tabind);
    this.setAttribute("hideFocus","false");
    this.onControlClicked = function(){
        this.clearthefields();
    };
    this.onKeySpace=this.onControlClicked;
    this.onKeyEnter=this.onControlClicked;
    
    this.clearthefields=function()
    
{
        eval(rowArr+'()');
    }
};

</script>
</HEAD>
<BODY>
HELLO WORLD
<form>
<Input type="text" name="floor" tabindex="2">
<Input type="text" name="floorDesc" tabindex="3">
<SCRIPT>
    var clearbutton2 = new AW.UI.ClearButton;
    clearbutton2.addTable(null,'clearRow',"4");
document.write("&nbsp" + clearbutton2);

    var clearbutton = new AW.UI.ClearButton;
    clearbutton.addTable(null,'clearRow',"5");
document.write("&nbsp" + clearbutton);
</SCRIPT>
</form>
</BODY>
<script>
function clearRow()
{

    document.forms[0].floor.value='';
    document.forms[0].floorDesc.value='';
}
</SCRIPT>


I have added two buttons just to make it clearer what is going wrong when using firefox. When i press tab from the second text field to the first button then it takes an equivalent number of tab pressed for the button to be shown as focused. That is i have to press tab thrice in this case to focus from the second textfield to the first clear button. This is happening only in the case of firefox. I tried searching the forums but did not find anythign.
Sandip
Thursday, October 26, 2006
Yes. There seems to be some issues with FireFox and buttons especially.

Alex, any comments?
Karl Thoroddsen
Wednesday, November 1, 2006

This topic is archived.


Back to support forum

Forum search