Solved

Alert from JSP

Posted on 2000-04-24
3
511 Views
Last Modified: 2012-08-13
I want to alert the user for form level validations in a JSP as is done in Javascript. Could somebody tell me how?
0
Comment
Question by:ssindhu
3 Comments
 
LVL 3

Expert Comment

by:ovidiucraciun
ID: 2743800
as far as I no, with JSP you can create dinamicaly html pages as response.
I sugest to first write your html page that makes the alertion and after that to send it to the client in order to load the page with alert code (JavaScript)
0
 

Author Comment

by:ssindhu
ID: 2743852
Thanks it works .
I created a html page with alerts using javascript(as usual) then added that to JSP.
Thanks.
0
 

Accepted Solution

by:
diegojimenez earned 100 total points
ID: 2755495
You can make all the options that you want with Html and after you can insert de java code. You must know that the java code is allways compiled in the server , and the javaScript code is compiled in the navigator.
then if you have
<%
    ----java code----
%>
<script language="JavaScript">

       function hello(){
              alert("hello");
      }
</script>
when you'll call this function the alert will be execute.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now