Rudebox.co.nr How To Forums

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

Share | 
 

 DefaultButton , On Enter Press Raise Default Button Event

Go down 
AuthorMessage
Admin
Admin
avatar

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

PostSubject: DefaultButton , On Enter Press Raise Default Button Event   Wed 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
View user profile http://rudebox.editboard.com
 
DefaultButton , On Enter Press Raise Default Button Event
Back to top 
Page 1 of 1
 Similar topics
-
» No start fight button !?
» fantage bacck to school event!
» Enter friends codes window
» Olympic Games Event
» Can't enter my Cub Condo [LOCK]

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: