/    Sign up×
Community /Pin to ProfileBookmark

Include checkboxes in an html table

Hi ,
I have the following html table. My requirement is if I click on ‘[Switch into edit mode]”, it will introduce some checkboxes in the table rows so that I can select them.

[CODE]<html>
<TABLE BORDER=0 BGCOLOR=”#F5F5F5″>
<a href=”coll.pl?filter=gui&amp;query=flow2&amp;mode=del”>[Switch into edit mode]<br></a>

<TR><TD>o</TD><TD><a href=”coll.pl?path=/home/default/units/results”>Regression 3.2</a></TD><TD><a href=”collstat.pl?path=/home/default/units/results”>(/home/default/units/results)</a></TD></TR>
<TR><TD>o</TD><TD><a href=”coll.pl?path=/home/micado/units/results”>Regression 3.3</a></TD><TD><a href=”collstat.pl?path=/home/micado/units/results”>(/home/micado/units/results)</a></TD></TR>
<TR><TD>o</TD><TD><a href=”coll.pl?path=/home/pll/dss/top”>Regression pll</a></TD><TD><a href=”collstat.pl?path=/home/pll/dss/top”>(/home/pll/dss/top)</a></TD></TR>
</TABLE>

</html>[/CODE]

You can delete the <a href coll.pl > stuff in [Switch into edit mode] and replace that with a javascript function to accomplish the requirement. The desired table should exactly look like below :

[CODE]<html>
<TABLE BORDER=0 BGCOLOR=”#F5F5F5″>

<TR><TD>o</TD><TD><a href=”coll.pl?path=/home/default/units/results”>Regression 3.2</a></TD><TD NOWRAP><label><input type=”checkbox” name=”DEL=/home/default/units/results” value=”on” /> Remove</label></TD><TD><a href=”collstat.pl?path=/home/default/units/results”>(/home/default/units/results)</a></TD></TR>
<TR><TD>o</TD><TD><a href=”coll.pl?path=/home/micado/units/results”>Regression 3.3</a></TD><TD NOWRAP><label><input type=”checkbox” name=”DEL=/home/micado/units/results” value=”on” /> Remove</label></TD><TD><a href=”collstat.pl?path=/home/micado/units/results”>(/home/micado/units/results)</a></TD></TR>
<TR><TD>o</TD><TD><a href=”coll.pl?path=/home/pll/dss/top”>Regression pll</a></TD><TD NOWRAP><label><input type=”checkbox” name=”DEL=/home/pll/dss/top” value=”on” /> Remove</label></TD><TD><a href=”collstat.pl?path=/home/pll/dss/top”>(/home/pll /dss/top)</a></TD></TR>
</TABLE>

</html>[/CODE]

Please help. Thanks.

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @myuser 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.29,
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,
)...