button probs

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Joe

    #1

    button probs

    I have 5 submit buttons and various text boxes on a web page.

    My problem is - I have for example a text box that says:
    City:______ <btnLookupCit y>

    But when the user types in their city and hits <RETURN>, it pushes another
    button on the page instead of the button right next to the text box.

    I have messed with tabindex and other things and as far as I can tell - by
    hitting return in any text box - it auto pushes the FIRST button placed on
    the page.

    How can I change this without re-laying out my page?


  • Joe

    #2
    Re: button probs

    Here was my JS solution to this problem:
    if (document.all)
    { document.onkeyd own = function ()
    { var key_enter= 13; // 13 = Enter
    if (key_enter==eve nt.keyCode)
    {
    event.keyCode=0 ;
    document.getEle mentById('SubMe nuFile_btnLogin ').click()
    return false;
    }
    }
    }
    "Joe" <bill@msn.com > wrote in message
    news:u8NUzDjuFH A.1560@TK2MSFTN GP09.phx.gbl...[color=blue]
    >I have 5 submit buttons and various text boxes on a web page.
    >
    > My problem is - I have for example a text box that says:
    > City:______ <btnLookupCit y>
    >
    > But when the user types in their city and hits <RETURN>, it pushes another
    > button on the page instead of the button right next to the text box.
    >
    > I have messed with tabindex and other things and as far as I can tell - by
    > hitting return in any text box - it auto pushes the FIRST button placed on
    > the page.
    >
    > How can I change this without re-laying out my page?
    >[/color]


    Comment

    Working...