-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: Neeraj_Bangalore
Message 4 in Discussion


Hey, 

 
I 
think all the trouble is because you are unable to set the focus on the control 
where you want. To set the focus try this in your aspx page : 

 
<body 
onload="javascript:document.forms[0].elements['MYCONTROLID'].focus()">
 
Regarding handling keycodes like, my personal feeling is - Do not play 
with them. This time it is the TextBox, tommorow it could be any other control 
that will give trouble. Well, this is my personal feeling, so very well go ahead 
with it.
 
Regards,
Neeraj 
Saluja
SCT Software Solutions, Bangalore

 

  -----Original Message-----
From: BDOTNET 
  [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 07, 2004 
  5:49 PM
To: BDOTNET
Subject: Client side script in aspx 
  page


  
    
      
      New Message on BDOTNET
    
      

  Client 
    side script in aspx page


    
      
      
        Reply

        
          
            
            
               
              Recommend 
              Message 1 in 
                Discussion 
      
        
          
            
            
              From: vishnuvr 
            
              
I have a asp.net aspx page where in 
                i want to disable enter key(i have done this because iam not 
                able to focus on default button) for that form, that to work i 
                wrote onkeyPress event in form element this is what i have 
                done...

>
function handleEnter (field, 
                event)
{
var keyCode = event.keyCode ? event.keyCode : 
                event.which ? event.which : event.charCode;
if (keyCode == 
                13) 
{
return false;
} 
else
return true;
} 
                

<FORM onkeypress="return handleEnter(this, event)" 
                id=Form1 method=post runat="server"></FORM>

This 
                is working fine for whole aspx page but in some forms i have 
                textbox with multi line option even in this case the enter 
                button is not working, iam using servercontrols in the form.. 
                can any body tell me how to enable enter button only in 
                textbox

thanks in 
      advance
vishnu
View other groups in this 
    category. 



-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/BDOTNET/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to