Hi All:
I am using the follwing javascript function in my jsp file
<script language="javascript">
function openPopup()
{
var firstname = escape(<%=addressBean.getFirstName()%>);
var lastname = escape(<%=addressBean.getLastName()%>);
alert(firstname);
alert(lastname);
var mywindow = window.open('<%= link("*", "BBFBUpdatePickupInfo")%>&ShoppingCartKey=<%=cartKey%>&operation=<%=operation%>&isEproAcc=<%=isEpro%>&firstName="+firstname+"&lastName="+lastname+"&areaCode=<%=addressBean.getPhoneAreaCode()%>&phoneNum=<%=addressBean.getPhoneNumber()%>','static','width=625,height=500,toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=yes,resizable=0');
mywindow.focus();
}
</script>
When addressBean.getFirstName() and addressBean.getLastName() returns names like "RED" as firstname and "WHITE" as lastname it is working fine. But when these two methods returns name like "VALENTINE" as firstname and "D'LOREY" as second name it is throwing below javascript error
Error: Unterminated string constant
Code: 0
Please help me to come out of this problem. Thanks in advance