JavaScript "TextBox.Select()" function problem with new .NET 2.0 browser control

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • subbarao.puvvada@gmail.com

    #1

    JavaScript "TextBox.Select()" function problem with new .NET 2.0 browser control

    Hi All,


    I am working on a Windows application, Which browser control on main
    form itself develped in .NET 1.1. Recently we have migrated it to .NET
    2.0. It's combination of Web pages and .NET Windows forms. We have
    complete web application also. After we convert this application
    from .NET 1.1 to .NET 2.0, if we select all text in textbox onfocus
    event of textbox, again I am unable to Unselect the selected text with
    mouse.

    Can any one you experienced the same problem. If Yes, please let me
    know how you resolve that issue.


    Here is my sample code:


    HTML page:



    <html>
    <head>
    <script language='javas cript'>
    function SelectAll(Field No)
    {
    switch (FieldNo)
    {
    case 1 :
    {
    Login.User.sele ct();
    break;
    }

    case 2 :
    {
    Login.Password. select();
    break;
    }
    }
    }
    </script>
    </head>
    <body>
    <form method="GET" name="Login" action>
    <input type="text" name="User" onfocus="Select All(1)"><br>
    <input type="text" name="txt2">
    </form>
    </body>
    </html>



    Thanks,

    Subbarao.

  • =?ISO-8859-1?Q?G=F6ran_Andersson?=

    #2
    Re: JavaScript &quot;TextBox.S elect()&quot; function problem with new .NET2.0 browser control

    subbarao.puvvad a@gmail.com wrote:
    Hi All,
    >
    >
    I am working on a Windows application, Which browser control on main
    form itself develped in .NET 1.1. Recently we have migrated it to .NET
    2.0. It's combination of Web pages and .NET Windows forms. We have
    complete web application also. After we convert this application
    from .NET 1.1 to .NET 2.0, if we select all text in textbox onfocus
    event of textbox, again I am unable to Unselect the selected text with
    mouse.
    >
    Can any one you experienced the same problem. If Yes, please let me
    know how you resolve that issue.
    >
    That is probably because the field recieves focus when you click in it.

    --
    Göran Andersson
    _____
    Göran Anderssons privata hemsida.

    Comment

    Working...