* Jason said:
Hi,
In JavaScript there's a function alert() which will pop a small screen to
alert something. But I don't know if we have an alert function like that.
Any help will be appreciated.
JSP == Java *Server* Pages. The JSP is executed on the server by the
servlet container - not on the client (JavaScript otoh is executed by
the webbrowser). To show an alert-box you'll have to use JavaScript. The
script can, of course, be greated by the JSP:
Some.jsp
==========
<html>
<head>
....
<script>
showTime()
{
/* Shows a box with the current server date */
alert(<%=java.util.Date()%>);
return true;
}
</script>
</head>
<body>
<a href=".." onclick="showTime();">Show time on server</a>
</body>
</body>
The above is probably not syntax correct javascript - but you get the
idea.
//Anders
--
/**
* Anders Engström, (e-mail address removed)
* -------------------------------------
* Your mind is like an umbrella.
* It doesn't work unless you open it.
* /Frank Zappa
*/