This seems pretty strange to me, but the results of my ASP/Javascript code don't appear the way that I would anticipate. I don't uderstand the carriage returns in the output of my DescriptionLine1 variable in the client code. This gives me a "unterminated string constant" error, but when I look at the length, it is 60 DescriptionLine1, just as I would expect. take a look...
This is my ASP code
This is what is generated on the client:
This is my ASP code
Code:
<%
Response.Write(Len(DescriptionLine1) & "!") 'For troubleshooting
%>
var x = "<%=Trim(DescriptionLine1)%>" + "\n";
x += "<%=Trim(DescriptionLine2)%>" + "\n";
x += "<%=Trim(DescriptionLine3)%>" + "\n";
x += "<%=Trim(DescriptionLine4)%>" + "\n";
x += "<%=Trim(DescriptionLine5)%>" + "\n";
x += "<%=Trim(DescriptionLine6)%>" + "\n";
x += "<%=Trim(DescriptionLine7)%>" + "\n";
x += "<%=Trim(DescriptionLine8)%>" + "\n";
x += "<%=Trim(DescriptionLine9)%>" + "\n";
x += "<%=Trim(DescriptionLine10)%>";
document.modifyForm.desc.value = x;
This is what is generated on the client:
Code:
60!
<script language="JavaScript">
<!--
var x = "Testing out the new add and reported by
" + "\n";
x += " " + "\n";
x += "" + "\n";
x += "" + "\n";
x += "" + "\n";
x += "" + "\n";
x += "" + "\n";
x += "" + "\n";
x += "" + "\n";
x += "";
document.modifyForm.desc.value = x;