jsp - Dynamically set the length of td using javascript? -


i looking setting td length value 4 1 condition set length 11 other condition.

since cant access javascript values in jsp, not thinking set flag in javascript function thought of using hidden parameter concept access, since using btt framework doesnot suport feature. feature eliminated

then there other way in javascript can control display of td or tr based on condition

some thing 2 td based row

<tr>     <td>     </td>     (display if condition true)     <td length=4>     </td>     (display if condition false)     <td length=11>     </td> </tr> <tr>     <td>     </td>     <td>     </td>  </tr> 

just let jsp print java side variable if javascript variable.

<script>var width = ${width};</script> 

imagine jsp ${width} prints 11, generated output follows in webbrowser:

<script>var width = 11;</script> 

that's it. can use in js functions.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -