Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
194
rated 0 times [  197] [ 3]  / answers: 1 / hits: 17771  / 11 Years ago, tue, october 8, 2013, 12:00:00

I have below script where im passing scriptlet variable to javascript function. But there is no alert box displaying.. Please let me what im missing here..



<script language=JavaScript>
window.onload = function(){
<%
String res = request.getParameter(Message);
%>
var Value = <%=res%>;
alert(Value);
document.Form.submit();
};
</script>


Thanks in advance


More From » jsp

 Answers
0

try this....



<script type=text/javascript>
window.onload = function(){
<%
String res = request.getParameter(Message);
%>
var Value = <%=res%>;
windows.alert(Value);
document.Form.submit();
};
</script>

[#75157] Sunday, October 6, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
leighamarleem

Total Points: 75
Total Questions: 121
Total Answers: 111

Location: Norway
Member since Mon, May 23, 2022
2 Years ago
;