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 8974963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:46:22+00:00 2026-06-15T18:46:22+00:00

JavaScript code : common.js function setFocus(evt,data) { var keycode=evt.keyCode; $([tabindex=+data[keycode]+]).focus(); return false; } PHP

  • 0

JavaScript code: common.js

function setFocus(evt,data)
{
  var keycode=evt.keyCode;  
  $("[tabindex="+data[keycode]+"]").focus();
  return false; 
}

PHP code:

<table class="tblmenu">
   <tr>
      <td><div class="redbut"><a href="#" id="formstng"    tabindex="1" onKeyPress="setFocus(event,{'38':'5','40':'2'})">foT Aosa.Aona.Aof. laokTao saoTIMga </a></div></li></td>
   </tr>
   <tr>
      <td><div class="redbut"><a href="#" id="setting" tabindex="2" onKeyPress="setFocus(event,{'38':'1','40':'3'})">roT saoTIMga</a></div></td>
   </tr>
   <tr>
      <td><div class="redbut"><a href="#" tabindex="3" onKeyPress="setFocus(event,{'38':'2','40':'4'})">slaIpa saoTIMga</a></div></td>
   </tr>
   <tr>
      <td><div class="redbut"><a href="#" tabindex="4" onKeyPress="setFocus(event,{'38':'3','40':'5'})">isasTma saoTIMga</a></div></td>
   </tr>
   <tr>
      <td><div class="redbut"><a href="#"  tabindex="5" onKeyPress="setFocus(event,{'38':'4','40':'1'})">yauzr AonT/I</a></div></td>
   </tr>
</table>

i have try to focus on link with arrow key.this is worked fine in firefox but not in chrome
and IE.
Thanks in Advance..

  • 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-15T18:46:23+00:00Added an answer on June 15, 2026 at 6:46 pm

    Please use evt.charCode instead evt.keyCode for IE, (i.e) u can use as follows,

      var keycode =  evt.keyCode? evt.keyCode : evt.charCode
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

javascript code: function getCheckbox(name,id){ var check = 0; var deger = option-checkbox-+id; var dom
Javascript Code YAHOO.util.Event.onDOMReady(function (ev) { var carousel = new YAHOO.widget.Carousel(container, {isCircular: true, numVisible:1}); console.log(carousel.set('navigation',
My JavaScript code is as follows: $(document).keydown(function(event){ var move, inter; clearInterval(inter); inter = setInterval(move
Here is a common practice in JavaScript: (function($) { ...code... })(jQuery); I understand the
I have this javascript code: <script> $(document).ready(function() { var progValue1 = 100; var progValue2
This Javascript code is using the 'this' keyword inside a nested function (which is
In JavaScript code of web application, the table sorter is defined by: $(#my-table).tablesorter({ headers:
My javascript code is like this: function openWindows() { if(A is true) { window.open(URL_A);
The javascript code I now have can toggle a single row of data. Whether
I had no idea something like this (javascript-esque inline function) would work in PHP.

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.