Rudebox.co.nr How To Forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Rudebox.co.nr How To Forums

Rudebox How To Forums - Ask Anything, View How To's
 
HomeSearchLatest imagesRegisterLog in

 

 DefaultButton , On Enter Press Raise Default Button Event

Go down 
AuthorMessage
Admin
Admin
Admin


Number of posts : 216
Registration date : 2007-01-01

DefaultButton , On Enter Press Raise Default Button Event Empty
PostSubject: DefaultButton , On Enter Press Raise Default Button Event   DefaultButton , On Enter Press Raise Default Button Event Icon_minitimeWed Dec 05, 2007 11:29 pm

On the top of your page add

Code:
<head>
 <script language="JavaScript" type="TEXT/JAVASCRIPT">
    <!--
  //For Button
  function DefaultButton(evnt, buttonId){

      var evt = evnt ? evnt : window.event;

      var bt = document.getElementById(buttonId);

      if (bt){

          if (evt.keyCode == 13){

                bt.click();

                return false;

          }

      }

};

//For Link Button
function DefaultLinkButton(evnt, buttonId){

      var evt = evnt ? evnt : window.event;

      var bt = document.getElementById(buttonId);

      if (bt){

          if (evt.keyCode == 13){

                eval(bt.href);
               
                return false;

          }

      }

};
    //-->
    </script>
</head>
Back to top Go down
https://rudebox.editboard.com
 
DefaultButton , On Enter Press Raise Default Button Event
Back to top 
Page 1 of 1
 Similar topics
-
» UGG 1873 Bailey Button Triplet...
» How to put carriage return or ' enter ' in VB .net string
» Avoid unexpected postback after pressing Enter in textbox
» How to programmatically add onLoad to Body Tag /Raise Onload

Permissions in this forum:You cannot reply to topics in this forum
Rudebox.co.nr How To Forums :: How To - Myspace / Website /Blog Utilities :: ASP .net-
Jump to: