posted 23 years ago
Hello,
I have JSP page in which I pass a java value to a JavaScript function. A value is a name of a page passed to JavaScript window pop-up function. I get an error when I try to do it:
jsp page:
---------
String hlpFile = "test";
.
.
out.println("<a href=\"javascript:loadWin(" + hlpFile + ")\" class=\"nav\">" + prog + "-" + hlpFile + "</a>\n");
JavaScript function:
--------------------
function loadWin(file){
helpWin = window.open("generic_help/"+file,"help","height=650,width=800,resize=1,scrollbars=yes,top=10,left=100");
}
In browser's JavaScript "console" I get:
Error: 'test' is undefined
Any suggestions why this does not work?
thanks,
Alex
All right brain, you don't like me and I don't like you, but let's just do this one thing so I can get back to killing you with beer.<br /> <br />- Homer Simpson