You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Tuan H. Le" <tu...@phsadc.com> on 2002/10/22 19:33:02 UTC
with JavaScript
Hi
Can some one please show me a tip on how to pass a dynamic value into a JavaScript function within <html:link> tag? What I need is to pass an employee ID in the openModal( '/editSalary.do?id=### ).
Here's my code
<script language="javaScript">
function openModal( theURL ){
window.showModalDialog(theURL,'','dialogWidth:662px;, dialogHeight:180px; help:no; scroll:no; status:no; center:yes; resizable:no; unadorned:yes;');
}
</script>
<logic:iterate id="employee" name="employeeList" scope="request" type="com.abc.EmployeeVO" ...>
<td>
<html:link href="JavaScript:void()" onclick="openModal('/editSalary.do')"><img src="common/images/edit.gif" width="9" height="18" border="0" alt="edit"></html:link>
</td>
</logic:iterate>
I know how to create a <html:link> that generates an HREF with a passing dynamic parameter value as such
<html:link href="/editSalary.do" paramId="id" paramName="employee" paramProperty="employeeId" target="_blank">
The code above works fine, but I need a way to open a modal dialog window with a specific size.
Thanks in advance!
Tuan