View Full Version : Java table beginner advice needed

03-05-2013, 08:07 AM
Hi All,

I want to create a table consisting of football results, so I can then display using java

Gameweek results
Would show all games and results for that week

Team results
Would show all results for that team, as in who they played and on what week.

I'd like each element to be linkable, so I could go from displaying gameweek 25 and then click Tottenham and then see their results.

What would be that best way to go about this?

03-10-2013, 11:06 AM
You need javascript (not java) to show/hide content on click. You can go with a javascript framework such as jQuery which has a function called .toggle() to display/hide content.

04-05-2013, 07:26 AM
you can also simply do in straight JS (no jquery):

function toggle(id, isVisible) { //id is string, isVisible is Boolean true/false
if (isVisible) {
document.getElementById(id).style.visibility='visi ble';
} else {
document.getElementById(id).style.visibility='hidd en';