views:

55

answers:

1

Hi all ,

Is it possible to use the structs tags(logic:equal, logic:match) inside a javascript function? Actually I need to set value in the <td> of the table dynamically getting from the Bean. How can I achieve this?

A: 

Thinking of your problem in a non programming way: You are an astronaut standing on the moon and you realized you forgot your camera on Earth. You can not just make one appear so you are out of luck unless you take a trip back. So you need to make sure you pack your camera from the beginning or spend the time to travel back to get it.

JavaScript runs on the client. Your Java code runs on the server. It is impossible for them to run together.

By the time the JavaScript code runs your Java code completely done running.

So as my moon example stated, you either render everything out to start and show hide it with JavaScript. Your other option is to wait for the content and use the XMLHttpRequest object to make a call to the server to get what you are after.

epascarello