I've problem displaying a string variable that  contains character double
quote or carriage return.
Infact if I substitute the following line
parent.right.document.write("<%= simple_string %>");
with
parent.right.document.write("<%= string_with_quotes%>");
or with
parent.right.document.write("<%= string_with_quotes%>");

I've the following strange behaviour:
The left frame shows correctly all the 3 variables, while the right frame do not show 
anything.
What I did wrong?
thanks a lot Maria Baldassarri

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">

<%@ page language="java" import = "org.apache.xalan.xslt.*" %>
<%!
     String simple_string="simplestring";
     String string_with_quotes="string  \" with quotes ";
     String string_with_cr="string  \n with cr";
%>
<HTML>
<HEAD>
     <TITLE>test</TITLE>
     <META NAME="keywords" CONTENT="">
     <META NAME="description" CONTENT="">

</HEAD>
<BODY  BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#FFFFFF"  TOPMARGIN="2" LEFTMARGIN="2" 
RIGHTMARGIN="2" MARGINWIDTH="2" MARGINHEIGHT="2">
<font size=-2>
<!-- ***************************** -->
<!-- writing on left  frame           -->
<!-- ***************************** -->
<% simple_string="simplestring"; %>
<%= "writing simple_string on top frame <BR><font size=-2> " + simple_string + " 
</font>" %>
<%= "writing string_with_quotes on left frame <BR><font size=-2> " + 
string_with_quotes + " </font>" %>
<%= "writing string_with_cr on left frame <BR><font size=-2> " + string_with_cr + " 
</font>" %>
</font>
<!-- **************************** -->
<!-- writing on  right  frame -->
<!-- **************************** -->
<SCRIPT language="JavaScript">
<!--
parent.right.document.write("<HTML><HEAD><TITLE>bottom frame</TITLE></HEAD><BODY>");
parent.right.document.write("writing on right frame<br>");
parent.right.document.write("<%= simple_string %>");
parent.right.document.write("</BODY></HTML>");
parent.right.document.close();
-->
</SCRIPT>
</BODY>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to