Skip to Content
author's profile photo Former Member
Former Member

Trapping the CARRIAGE RETURN to click button in Web tools CRM

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 03, 2009 at 07:21 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 04, 2009 at 03:58 PM

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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 13, 2009 at 06:58 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.