TextBox selected problem....

Last post 06-02-2008 5:58 AM by inx51. 5 replies.

Sort Posts:

  • TextBox selected problem....

    06-01-2008, 5:37 PM
    • Member
      point Member
    • inx51
    • Member since 05-03-2008, 9:44 AM
    • Posts 68

    Hi!

    I have an annoying problem, but Im not sure if there is any easy or smart way to get around this problem.

    You see...I have a textbox and a button belove the textbox that submites/posts the text inside the textbox once the button is pressed. But i need to press that button twice if I have entered some text in my textbox. This problem is beacause that once you start typeing in the textbox, the browser will actually select the textbox, and once you press the first time at the "post-button" it will only deselect the textbox and if you press the button again it will actuallt post the text....so what I want to do is to make it possible for a user to type some text in the textbox and then by a single click at the button it should post the content......so basiclly the selection of the textbox is the major-problem for me...is there any way around this?

     

    Thanks in advance!

  • Re: TextBox selected problem....

    06-01-2008, 6:04 PM
    • All-Star
      28,218 point All-Star
    • johram
    • Member since 06-13-2006, 10:36 AM
    • Sweden
    • Posts 3,543
    • Moderator

    Do you mean the textbox gets focus? Or is there actually a selection in the box? Do you know if you have a JavaScript that runs for this? This is a very odd behavior that you have managed to bump into here.

    If this post was useful to you, please mark it as answer. Thank you!
  • Re: TextBox selected problem....

    06-02-2008, 1:03 AM
    • Member
      20 point Member
    • saik1986
    • Member since 06-02-2008, 4:40 AM
    • India
    • Posts 5

    Hi,could you please tell me whether you used html control or asp control

    if you use javascript for this..please post here...there might be problem in the script you used. If you used onfocus in the script please remove it.If you have any issues please let me know. 

    just check this also....is that problem is with this textbox..or happening with any textbox.....

    Sai Manoj
  • Re: TextBox selected problem....

    06-02-2008, 1:09 AM
    • Contributor
      3,068 point Contributor
    • blurearc
    • Member since 04-25-2008, 11:15 AM
    • Mumbai India
    • Posts 537

    this one is funny..

    try to recreate your page from scratch.. some time this works..

    Smile

    "Mark as answered if you feel this helps you"
    "Curiosity is Bliss"
    Regards,

    Ravi Kant Srivastava
    (Sr. Consultant I)
    Neudesic
    Hyd'bad
    INDIA
  • Re: TextBox selected problem....

    06-02-2008, 5:51 AM
    • Member
      point Member
    • inx51
    • Member since 05-03-2008, 9:44 AM
    • Posts 68

    Ok..well I was quite tierd yesterday when I wrote my first post about this...but I will try to answer some stuffs now for you guys so you hopefully can help meSmile

    Ok! The TextBox is the default textbox from the visual web 2008 express..and yes its the ASP control....

    And its like once I press in the actuall textbox, it "selects" or "focus" the textbox..but once I press the button it first deselects the textbox at the first click...and at the secound click at the button it preforms the buttons actions/the code to be fired once the button is pressed......

  • Re: TextBox selected problem....

    06-02-2008, 5:58 AM
    Answer
    • Member
      point Member
    • inx51
    • Member since 05-03-2008, 9:44 AM
    • Posts 68

    hmmm...for some reason it seems like if I just removed the old TextBox and made a new one with the exact same proporties...it works fine again....I will "bug test" this a few hours and report back to you about my "discovery"Stick out tongue

     ...cant really understand why something exactlly the same can do something completly differentTongue Tied

    ....Thanks anyway!

Page 1 of 1 (6 items)