/    Sign up×
Community /Pin to ProfileBookmark

div does not support table

I have a html file with some javascript that hides transaction details and shows them when a user clicks on the transaction. The problem is the script i wrote works fine but when i embed the the detail line in <div> tags and give it an id, it does not hide. Need help urgently, html file is attached.

[upl-file uuid=2560b52b-539a-4ea9-87a8-9dc770d47315 size=1kB]test.zip[/upl-file]

to post a comment
HTML

2 Comments(s)

Copy linkTweet thisAlerts:
@kloon_zaauthorJul 19.2006 — Please can someone help me real quick, i beg of u
Copy linkTweet thisAlerts:
@toicontienJul 19.2006 — A DIV tag can only be inside a TD tag or completely outside a TABLE.

A TABLE can only directly contain the following elements:

CAPTION, THEAD, TR, TD, TH, TBODY, TFOOT, COLGROUP

TR can only contain: TH, TD

You'll probably want to give the TR tags you want hidden a class name. Then you can test for the class name using JavaScript and hide them as needed. And, you only need to loop through TR tags, not every tag in the document, when doing the document.getElementsByTagName() function call.
×

Success!

Help @kloon_za spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...