logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > Javascript and JS frameworks
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 03-05-2013, 08:07 AM   #1
action711
 
Join Date: Nov 2009
Posts: 24
Default Java table beginner advice needed

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?
action711 is offline   Reply With Quote
Old 03-10-2013, 11:06 AM   #2
gentleone
gentleone's Avatar
 
Join Date: Nov 2009
Location: Rhodes, Greece
Posts: 2,837
Default

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.
http://api.jquery.com/toggle/
__________________
www.gentlemedia.nl
gentleone is offline   Reply With Quote
Old 04-05-2013, 07:26 AM   #3
jmichae3
 
Join Date: Dec 2010
Posts: 366
Default

you can also simply do in straight JS (no jquery):
Code:
function toggle(id, isVisible) { //id is string, isVisible is Boolean true/false
    if (isVisible) {
        document.getElementById(id).style.display='block';
        document.getElementById(id).style.visibility='visible';
    } else {
        document.getElementById(id).style.display='none';
        document.getElementById(id).style.visibility='hidden';
    }
}
__________________
------------
Jim Michaels
HTML Code:
improperly<strong>nested<em>elements</strong>cause</em>
browser confusion (I believe the term is 'tag soup')!

Last edited by jmichae3; 04-05-2013 at 07:29 AM.. Reason: missing style.
jmichae3 is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:28 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com