Try move the onclick javascript function out, something like this:

<script language="javascript">

    function verify() {
        var msg = "<beam:message key="confirm.paragraph.delete" />";

        return confirm(msg);
    }
</script>


<html:submit property="command" value="Delete"
  onclick="return verify();"/>


Saul
  ----- Original Message ----- 
  From: Craig Berry 
  To: [EMAIL PROTECTED] 
  Sent: Tuesday, March 23, 2004 9:46 PM
  Subject: bean:message inside onclick javascript string?


  I have a webpage on which I do a Javascript popup to confirm a deletion.
  The JSP fragment looks like this:

  <html:submit property="command" value="Delete"
    onclick="return confirm('Are you sure you want to delete this
  paragraph permanently?')"/>

  I would dearly love to replace that fixed text with <bean:message
  key="confirm.paragraph.delete"/>, but all my experimentation has not
  succeeded in finding a relatively straightforward way to do this.  I'm
  using the -el taglibs, if that matters.  Anybody have ideas on an
  elegant solution?

  -- 
  Craig Berry
  Principal Architect and Technical Manager
  PortBlue
  (310) 566-7546
   

  ---------------------------------------------------------------------
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to