You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beehive.apache.org by "Krista Baker (JIRA)" <be...@incubator.apache.org> on 2005/03/04 21:39:48 UTC

[jira] Updated: (BEEHIVE-410) netui:scriptBlock invalid javaScript when begin and end tag are on same line

     [ http://issues.apache.org/jira/browse/BEEHIVE-410?page=history ]

Krista Baker updated BEEHIVE-410:
---------------------------------

    Attachment: index.jsp

Jsp example that causes the script error explained in the document.  

Workaround:  Do not place javaScript code on the same line as the </netui:scriptBlock> tag.

> netui:scriptBlock invalid javaScript when begin and end tag are on same line
> ----------------------------------------------------------------------------
>
>          Key: BEEHIVE-410
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-410
>      Project: Beehive
>         Type: Bug
>   Components: NetUI
>     Versions: V1
>     Reporter: Krista Baker
>  Attachments: index.jsp
>
> When using the <netui:scriptBlock> tag, if any of the enclosed/user input javaScript is contained on the same line as the end tag </netui:scriptBlock>, the generated javaScript will be invalid.  
> Browser Behavior:  Mozilla Firefox will show a JavaScript syntax error, Netscape does not execute the JS but also does not show an error and IE will show a JS error when the action is attempted to be executed.
> Code snippet:
> <netui:scriptBlock>function swapImage(control, image){ 
> alert('here') };</netui:scriptBlock>
> Expected Results:
>   The end tag should insert a line break similar to the one placed after the <netui:scriptBlock> start tag.
> Expected Generated JavaScript:
>   <script language="JavaScript" type="text/JavaScript">
> <!--
> function swapImage(control, image){  
> alert('here');}
> -->
> </script>
>  
> Actual Results:
>   A javaScript error is created because of the end comment (-->) is on the same line as the JavaScript.  
> Actual Generated JavaScript:
> <script language="JavaScript" type="text/JavaScript">
> <!--
> function swapImage(control, image){ 
> alert('here');}-->
> </script>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira