How to remove focus from a button.
-
Hey. I have a search page containg 2 buttons and 2 textboxes. I have a javascript that cathces the enter-key event and triggers the respecting button, as in TextBox1 to Button1 and TextBox2 to Button2. My problem is that when I enter the page, the Button2 is allways in focus, no mather if I have the TextBox1 in focus or click on a CheckBox that is allsow have on the page. So when I hit the enter-key, the Button2.click event is allways triggerd. Does anyone know how to get around this. Thanks Thomas
-
Hey. I have a search page containg 2 buttons and 2 textboxes. I have a javascript that cathces the enter-key event and triggers the respecting button, as in TextBox1 to Button1 and TextBox2 to Button2. My problem is that when I enter the page, the Button2 is allways in focus, no mather if I have the TextBox1 in focus or click on a CheckBox that is allsow have on the page. So when I hit the enter-key, the Button2.click event is allways triggerd. Does anyone know how to get around this. Thanks Thomas
-
Hey. I have a search page containg 2 buttons and 2 textboxes. I have a javascript that cathces the enter-key event and triggers the respecting button, as in TextBox1 to Button1 and TextBox2 to Button2. My problem is that when I enter the page, the Button2 is allways in focus, no mather if I have the TextBox1 in focus or click on a CheckBox that is allsow have on the page. So when I hit the enter-key, the Button2.click event is allways triggerd. Does anyone know how to get around this. Thanks Thomas
set UseSubmitBehavior = true in Button property
-
Hey. I have a search page containg 2 buttons and 2 textboxes. I have a javascript that cathces the enter-key event and triggers the respecting button, as in TextBox1 to Button1 and TextBox2 to Button2. My problem is that when I enter the page, the Button2 is allways in focus, no mather if I have the TextBox1 in focus or click on a CheckBox that is allsow have on the page. So when I hit the enter-key, the Button2.click event is allways triggerd. Does anyone know how to get around this. Thanks Thomas
set UseSubmitBehavior=True in Button property