on 07-31-2009 9:07 PM
I created a custom search users page (searchuser.aspx).
On any admin or CRM pages, the CARRIAGE RETURN, always submits the top SEARCH box. I think it is somehow done in Component Art using their keypress or some event bound to the whole document.
I can also intercept the keypress events but I cannot stop the default WBTLs carriage return event from initiating the SEARCH box.
Any ideas on how to prevent the default CARRIAGE RETURN event from firing off the search page?
I can intercept the carriage returns also but that does not prevent the SEARCH event to be triggered.
Mike
On some pages, if you view page source you will see a javascript method at the end that catches keypress events. You can use that as a guide but I think what you need to do is add to your search textbox an "onkeydown" javascript event and in your function see if it's a CR and if so you do your own thing.
If you wanted you could re-write the search plugin so it doesn't use an imagebutton (I think) which renders as an asp:image tag. These get triggered automatically when a CR is pressed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I used a different key instead of looking for the Carriage return key.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My guess is that you need to look at the ASP.Net property defaultbutton
See link below for some info, or google defaultbutton.
[http://weblogs.asp.net/skoganti/archive/2004/09/20/231695.aspx]
Edited by: Pat Macpherson on Aug 3, 2009 9:22 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.