Hi,
I'm a newbie in javascript. I hope somebody will help me.
For example I have 2 textboxes and 1 button. I want to make a validation that if the 2 textboxes is empty when the user click the button then it will show an alert box. How to do that?
here is for the textboxes:
String description = request.getParameter("description");
String quantity = request.getParameter("quantity");
if (description == null || quantity == null){
%>
<script>
alert ('Please enter the necessary information')
history.go(-1);
</script>
<%
}
Wat's wrong with the above code? any sample code? Thanks


Reply With Quote
Hi, thanks.. but I prefer doing the validation by using javascript since it is faster but I don't know how... 
Bookmarks