letsbedecent
asked on
struts bean tag with javascript.
Hi ,
I am using html:button onclick="javascript:editCi tizen('<be an:write name="issueVO" property="citizen.id"/>')" value="Edit Citizen"
to pass the value of id variable in citizen object (which is a variable in issueVO).
The compiler complains that it is expecting an "equal symbol" !!!
Where does it require that ???
And When i use
<a href="javascript:editCitiz en('<bean: write name="issueVO" property="citizen.id"/>')" >Edit Citizen</a>
It works....
explanation please !!
javascript function is as follows :
function editCitizen(id)
{
var theForm = document.citizenForm;
theForm.id.value = id;
theForm.submit();
}
I am using html:button onclick="javascript:editCi
to pass the value of id variable in citizen object (which is a variable in issueVO).
The compiler complains that it is expecting an "equal symbol" !!!
Where does it require that ???
And When i use
<a href="javascript:editCitiz
It works....
explanation please !!
javascript function is as follows :
function editCitizen(id)
{
var theForm = document.citizenForm;
theForm.id.value = id;
theForm.submit();
}
ASKER
you got it wrong..... the
<a href="javascript:editCitiz en('<bean: write name="issueVO" property="citizen.id"/>')" >Edit Citizen</a>
WORKS FINE.
Its the button part thats not working !!
<a href="javascript:editCitiz
WORKS FINE.
Its the button part thats not working !!
sorry, misread your q
Hi,
Can you post your entire <html:button .... /> ?
Regards
Dave
Can you post your entire <html:button .... /> ?
Regards
Dave
Hi,
As it is compiler problem, it means that your JavaScript is okay. The only problem is on your JSP.
Regards
Dave
As it is compiler problem, it means that your JavaScript is okay. The only problem is on your JSP.
Regards
Dave
ASKER
<html:button onclick="javascript:editCi tizen('<be an:write name="issueVO" property="citizen.id"/>')" value="Edit Citizen"\>
Hi,
<html:button onclick="javascript:editCi tizen('<be an:write name="issueVO" property="citizen.id"/>')" value="Edit Citizen"\>
should be
<html:button onclick="javascript:editCi tizen('<be an:write name="issueVO" property="citizen.id"/>')" value="Edit Citizen" />
is it a typo or not :) ?
Regards
Dave
<html:button onclick="javascript:editCi
should be
<html:button onclick="javascript:editCi
is it a typo or not :) ?
Regards
Dave
Did you try:
<html:button onclick="javascript:editCi tizen('<be an:write name=\"issueVO\" property=\"citizen.id\"/>' )" ..
<html:button onclick="javascript:editCi
Mmm...aozarov,
Just curious, what is the difference between
<bean:write name=\"issueVO\" property=\"citizen.id\"/>
and
<bean:write name="issueVO" property="citizen.id"/>
I just never use it before and I hope you don't mind to answer :).
Regards
Dave
Just curious, what is the difference between
<bean:write name=\"issueVO\" property=\"citizen.id\"/>
and
<bean:write name="issueVO" property="citizen.id"/>
I just never use it before and I hope you don't mind to answer :).
Regards
Dave
> The compiler complains that it is expecting an "equal symbol" !!!
Can u post the complete error details
Can u post the complete error details
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>>Just try aozarov's suggestion to use plain HTML.
That should work, but it wasn't my suggestion :-)
I suggested to escape the inners quotes.
That should work, but it wasn't my suggestion :-)
I suggested to escape the inners quotes.
Then...
>>"That should work, but it wasn't my suggestion :-)"
Please try my suggestion hahaha :). This forum is fun :).
Regards
Dave
>>"That should work, but it wasn't my suggestion :-)"
Please try my suggestion hahaha :). This forum is fun :).
Regards
Dave
<a href="javascript:editCitiz