Welcome Guest, Not a member yet? Register   Sign In
HTML table trouble
#1

[eluser]PH-MJS[/eluser]
Hi everyone,

I want to create a HTML table with clickable rows (<tr>) to trigger a js function.

Please check the message here (http://pastebin.com/jCm2LkiF) because the forum remove all js in the code even between the code-tags.


Regards,
PH-MJS
#2

[eluser]PhilTem[/eluser]
I don't see a good and nice way to actually achieve what you wanna get.

But, I'd recommend changing your layout a little to have something like

Code:
<tr>
  <td data-click="first-argument">First td</td>
  <td>Second td</td>
  {and so on}
</tr>

and, if you have fancy jQuery skills, just make that doFunction() so intelligent, that it will get the argument from the first td's data('click') and then it will process the data however you want it.

But, as stated above, I don't see a nice possibility to achieve your result in an easy way (besides extending the HTML-Table class in a fancy way Wink )
#3

[eluser]PH-MJS[/eluser]
Hi PhilTerm,

Thanks for your time and reply.

Regards,
PH-MJS




Theme © iAndrew 2016 - Forum software by © MyBB