How to display image in popup window using struts & javascript
843838Oct 2 2005 — edited Oct 2 2005I would like to display the image of a person both in the original page as well as the popup window. I have tried doing using the following ;
I have the tried following in my jsp page to display the image
<td class=<%=classname%>><html:link href="GotoImage.do?action=DisplayImage" paramId="person_Id" paramName="personbean" paramProperty="person_Id" onclick="PopupImage('GotoImage.do?action=DisplayImage','defect_Id')"><bean:write name="personbean" property="personName"/></html:link></td>
The following is my javascript
</script>
<script language=javascript>
function PopupImage(target)
{
var PopupWindow=null;
PopupWindow=window.open('<html:form action="GotoImage.do?action=DisplayImage&target" />','mywin','left=20,top=20,width=500,height=500,toolbar=1,resizable=0');
PopupWindow.focus();
}
</script>
However I'm getting error in my popup window but not in original page.
Please any help is most welcomed.
Josh