Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8408121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:33:11+00:00 2026-06-09T23:33:11+00:00

I have javascript functions for shortcut keys so want to use in entire solution

  • 0

I have javascript functions for shortcut keys so want to use in entire solution so i want that file in a javascript file use it in every screen so tell me how to use it.
here is my code.

javascript

<script type="text/javascript">
        var isCtrl = false;
        document.onkeydown = function (e) {
            // alert(event.keyCode);
            if (event.keyCode == 17) isCtrl = true;
            if (event.keyCode == 67 && isCtrl == true) {
                document.getElementById('<%= btnCreate.ClientID %>').click();
                //alert("Create New");
                //return false;
                exit();
            }
            if (event.keyCode == 83 && isCtrl == true) {
                document.getElementById('<%= btnSave.ClientID %>').click();
                //alert("Save");
                exit();
            }
            if (event.keyCode == 86 && isCtrl == true) {
                document.getElementById('<%= btnView.ClientID %>').click();
                //alert("View");
                exit();
            }
            if (event.keyCode == 82 && isCtrl == true) {
                document.getElementById('<%= btnRefresh.ClientID %>').click();
                //alert("Refresh");
                return false;
            }
            if (event.keyCode == 77 && isCtrl == true) {
                document.getElementById('<%= btnShow.ClientID %>').click();
                //alert("Show");
                exit();
            }
            if (event.keyCode == 68 && isCtrl == true) {
                document.getElementById('<%= btnDelete.ClientID %>').click();
                //alert("Delete");
                exit();
            }
        }
    </script>

tell me how to use this with a example.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T23:33:12+00:00Added an answer on June 9, 2026 at 11:33 pm

    this is more of a architectural thing than anything else. If you are on ASP.NET technology i.e. be it WebForms or MVC – they all provide a concept of Master Page. As the name goes its a master view for all the other views. You can create other views by basing on the master view. The master view we usually create with the common header for the app and common footer or anything else which can be common for the site.

    In your case, if you need some common javascript in all other views – the best logical place is to include the javascript in the master page. with this all other views which are based on master page will get the script automatically. use the script to include the JavaScript.

    hope this helps…

    Lohith (Tech Evangelist, Telerik India)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have written a lot of javascript functions that i want to use in
I have two JavaScript functions that I want to call from inside of a
I've been writing some jQuery functions that have JavaScript variables and looping, etc inside
Let's say I have a UIWebView with some javascript functions. I want those javascript
I have some javascript functions that take about 1 to 3 seconds. (some loops
Using aspnet 3.5. I have some javascript functions in my aspx file. Why do
I have a few JavaScript functions that all look similar to me. but behave
I have a javascript functions that fetches some JSON from a PHP. When I
I have the following javascript functions, which when in a standalone file, will be
I have a JavaScript class, that I don't want to port to C++ as

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.