Rudebox.co.nr How To Forums

Rudebox How To Forums - Ask Anything, View How To's
Home­FAQ­Search­Register­Memberlist­Usergroups­Log in
Post new topic   Reply to topicShare | 
 

 DefaultButton , On Enter Press Raise Default Button Event

View previous topic View next topic Go down 
AuthorMessage
Admin
Admin


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

PostSubject: DefaultButton , On Enter Press Raise Default Button Event   Thu Dec 06, 2007 6:29 am

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
View user profile http://rudebox.editboard.com
 

DefaultButton , On Enter Press Raise Default Button Event

View previous topic View next topic Back to top 
Page 1 of 1

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