Problem Resolved. When I set jsMessage in the following manner:
<% String jsMessage = (String) "\'" + request.getAttribute("jsMessage") + "\'"; %> By providing the single-quotes to jsMessage it is evaluated as 'Are you sure you want to delete' Previously jsMesage was being evaluated as Are you sure....without any quotes which to the Explorer will appear as a series of non-comma separated parameters hence erroneous. Thanks to all the kind responses, Fank and Puneet especially, or resolving this problem. Chetan Pandey -----Original Message----- From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] Sent: Thursday, September 07, 2006 2:37 PM To: Struts Users Mailing List Subject: Re: Setting a Variable in Javascript Functions parameter When you say these suggestions didn't work, what is happening? What is in the generated HTML returned to the browser? Frank Chetan Pandey wrote: > onclick = '<%="return confirmationMessage(" + jsMessage + ")" %>' > > Did not work. > > Chetan > > -----Original Message----- > From: Puneet Lakhina [mailto:[EMAIL PROTECTED] > Sent: Friday, September 08, 2006 2:18 PM > To: Struts Users Mailing List > Subject: Re: Setting a Variable in Javascript Functions parameter > >> <html:link action="/delete" onclick = > '<%="returnconfirmationMessage(jsMessage)" %>' > > Ok , I think I made a mistake here. This should actually be > <html:link action="/delete" onclick = '<%="return confirmationMessage(" + > jsMessage + ")" %>' > > Did you try it this way? > -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM/Yahoo: fzammetti MSN: [EMAIL PROTECTED] Author of "Practical Ajax Projects With Java Technology" (2006, Apress, ISBN 1-59059-695-1) Java Web Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you don't have to reinvent it! --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]