73
rated 0 times
[
74]
[
1]
/ answers: 1 / hits: 18997
/ 11 Years ago, fri, august 2, 2013, 12:00:00
Hi I've the following code in jsp. I am trying to pass the value to javascript as follows. But it is not working.The code is as follows:
<td><button name = btn onclick=callMe(<c:out value='${bus.vehicleId}'/>)>Show Details</button></td>
(Vehicle id is printing if I use in my jsp.) Javascript is like this.
function callMe(myId) {
alert(myId);}
Here I am getting value as undefined. I've tried in different way as follows
<td><button name = btn onclick=callMe('${bus.vehicleId}')>Show tails</button></td>
This is also not working.Please help me asap.
More From » jsp