cancel
Showing results for 
Search instead for 
Did you mean: 

Trapping the CARRIAGE RETURN to click button in Web tools CRM

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

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.

Former Member
0 Kudos

I used a different key instead of looking for the Carriage return key.

Former Member
0 Kudos

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