struts-user mailing list archives

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

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


"Tuan H. Le" <> on 10/22/2002 12:33:02 PM

Please respond to "Struts Users Mailing List"

To:    "Struts Users Mailing List (E-mail)"

Subject:    <html:link> with JavaScript


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( '/ ).

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;');

<logic:iterate id="employee" name="employeeList" scope="request" type
  ="" ...>
  <html:link href="JavaScript:void()" onclick="openModal
  ('/')"><img src="common/images/edit.gif" width="9" height
  ="18" border="0" alt="edit"></html:link>


I know how to create a <html:link> that generates an HREF with a passing
dynamic parameter value as such

<html:link href="/" 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!

(See attached file: winmail.dat)
To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message