S
Sunny
Hi,
I have cr8ed a javascript function in the head section of a jsp
page.
<!--
function go(theURL) {
alert(theURL);
if (theURL!=null){
window.open(theURL,'popup','scrollbars=yes,resizable=yes,width=800,h
eight=600');
}
}
//-->
This function receives a url and displays it in the pop up window.
This function is called by the onLoadevent() during the loading of the
page. The parameter passed is obtained using the request attribute in
the foll. manner.
<body text="#003366" onLoad="javascript:go(
<%request.getParameter("val");%>)" >
The alert() function in the javascript method display "unspecified"
message in this example.
However, accessing the request attribute and storing it in a string
gives me the required result.
ie. String url = <%request.getParameter("val");%> gets the correct
url.
Just want to know if it is possible to use the request attribute
during the onLoad() event.
cheers
String name=request.getParameter("val");
<a href="javascript:go('<%=url %>')">Click to view</a>
<jsp:forward page = "centre1.jsp">
<jsp
aram name = "val" value="<%= url %>"/>
</jsp:forward>
<%/*response.sendRedirect("centre1.jsp");*/%>
I have cr8ed a javascript function in the head section of a jsp
page.
<!--
function go(theURL) {
alert(theURL);
if (theURL!=null){
window.open(theURL,'popup','scrollbars=yes,resizable=yes,width=800,h
eight=600');
}
}
//-->
This function receives a url and displays it in the pop up window.
This function is called by the onLoadevent() during the loading of the
page. The parameter passed is obtained using the request attribute in
the foll. manner.
<body text="#003366" onLoad="javascript:go(
<%request.getParameter("val");%>)" >
The alert() function in the javascript method display "unspecified"
message in this example.
However, accessing the request attribute and storing it in a string
gives me the required result.
ie. String url = <%request.getParameter("val");%> gets the correct
url.
Just want to know if it is possible to use the request attribute
during the onLoad() event.
cheers
String name=request.getParameter("val");
<a href="javascript:go('<%=url %>')">Click to view</a>
<jsp:forward page = "centre1.jsp">
<jsp
</jsp:forward>
<%/*response.sendRedirect("centre1.jsp");*/%>