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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T06:29:29+00:00 2026-06-18T06:29:29+00:00

I have on this page a clickable +/- icon that will expand and collapse

  • 0

I have on this page a clickable +/- icon that will expand and collapse a table of information when the user clicks on it in the jsp page, but the issue is that if the user tabs to this icon and try to expand/collapse it by pressing the enter button, the javascript won’t run; it only works with mouse click for some reason. Here’s what I have on the jsp page:

<td>
<a onclick="hideShowTable(${count}, this.id)" style="cursor:hand"
title="Expand/Collapse Table" tabindex="40"
id="eCTable${count}"
>+  
</a>
</td>

That executes this function in the js file:

function hideShowTable(tableCounter, id)
{
    //Loop through all rows of the month
    for(i=1; i<=12; i++)
    {
    var tableElm = document.getElementById("tableMonth"+ i +"_"+tableCounter);

    //Hide or show the div tag
    if (tableElm .style.display == "block"){
        tableElm .style.display = "none";
        document.getElementById(id).innerText="+";
    }
    else{
        tableElm .style.display = "block";
        document.getElementById(id).innerText="-";
    }

}

}

  • 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-18T06:29:30+00:00Added an answer on June 18, 2026 at 6:29 am

    The description says:

    The onclick event occurs when the pointing device button is clicked over an element. This attribute may be used with most elements.

    I think you can try using form’s onsubmit() rather than onclick() . Give a try..

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

Sidebar

Related Questions

i have this page . login: fer password: m Note: after login you will
So I have this page that has some basic custom tabs: http://demo.unlockedmanagement.com/users/view/2 * NOTE
I have this PHP page where the user can select and un-select items. The
I have a simple profile page which has image and some information. This profile
I'm about to have to write a web page/app that will serve the agenda
I have a functioning modal link that is clickable from a certain page in
I'm pretty sure that many people have thought of this, but for some reason
I have an tag on my page that looks something like this: <a href=javascript:void();
I have this page which has three peson searchs on them. Basically it's a
I have this page: http://www.thedome.it/cmsms/index.php?page=alla-spina I'd like to send a newsletter to subscribers every

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.