You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Jacques Le Roux (JIRA)" <ji...@apache.org> on 2012/12/15 12:12:12 UTC

[jira] [Closed] (OFBIZ-5098) javascript error in hidden form

     [ https://issues.apache.org/jira/browse/OFBIZ-5098?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux closed OFBIZ-5098.
----------------------------------

       Resolution: Fixed
    Fix Version/s: Release Branch 12.04
                   SVN trunk
                   Release Branch 11.04
                   Release Branch 10.04
         Assignee: Jacques Le Roux

Thanks Naofumi,

I was right to ask ;)

Your patch is in
trunk r1422207
R12.04 r1422212
R11.04 r1422215
R10.04 r1422220


                
> javascript error in hidden form
> -------------------------------
>
>                 Key: OFBIZ-5098
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5098
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: Release 10.04, SVN trunk
>            Reporter: Naofumi Fukue
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: Release Branch 10.04, Release Branch 11.04, SVN trunk, Release Branch 12.04
>
>         Attachments: HtmlMenuRenderer.java.patch
>
>
> HtmlMenuRenderer generates like bellow form tags. It generates double target="_BLANK" , then cause javascript error.
>   <li><form method="post" action="/ar/control/invoice.pdf" target="_BLANK" name="InvoiceSubTabBar_pdf_LF_8"><input name="invoiceId" value="8010" type="hidden"/></form><a target="_BLANK" href="javascript:document.InvoiceSubTabBar_pdf_LF_8.submit()">PDF</a></li>
>  
> document.InvoiceSubTabBar_pdf_LF_8 is undefined @ javascript:document.InvoiceSubTabBar_pdf_LF_8.submit()
> Index: framework/widget/src/org/ofbiz/widget/html/HtmlMenuRenderer.java
> ===================================================================
> --- framework/widget/src/org/ofbiz/widget/html/HtmlMenuRenderer.java	(revision 1419381)
> +++ framework/widget/src/org/ofbiz/widget/html/HtmlMenuRenderer.java	(working copy)
> @@ -455,10 +455,12 @@
>                  writer.append(name);
>                  writer.append("\"");
>              }
> -            if (UtilValidate.isNotEmpty(targetWindow)) {
> -                writer.append(" target=\"");
> -                writer.append(targetWindow);
> -                writer.append("\"");
> +            if (!"hidden-form".equals(linkType)) {
> +                if (UtilValidate.isNotEmpty(targetWindow)) {
> +                    writer.append(" target=\"");
> +                    writer.append(targetWindow);
> +                    writer.append("\"");
> +                }
>              }
>  
>              writer.append(" href=\"");

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira