struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff_Mycha...@nlgroup.ca
Subject Re: <html:link> with JavaScript
Date Tue, 22 Oct 2002 18:01:59 GMT


Try:
<logic:iterate id="employee" name="employeeList" scope="request" type
  ="com.abc.EmployeeVO" ...>
  <td>
  <html:link href="JavaScript:void()" onclick="openModal('/editSalary.do?<%
  = employee.getId() %>')"><img src="common/images/edit.gif" width="9"
  height="18" border="0" alt="edit"></html:link>
  </td>

</logic:iterate>




"Tuan H. Le" <tuan.le@phsadc.com> on 10/22/2002 12:33:02 PM

Please respond to "Struts Users Mailing List"
       <struts-user@jakarta.apache.org>

To:    "Struts Users Mailing List (E-mail)"
       <struts-user@jakarta.apache.org>
cc:

Subject:    <html:link> 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





(See attached file: winmail.dat)
--
To unsubscribe, e-mail:   <
mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <
mailto:struts-user-help@jakarta.apache.org>





Mime
View raw message