?
Solved

Alert from JSP

Posted on 2000-04-24
3
Medium Priority
?
517 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 300 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
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:
Suggested Courses
Course of the Month12 days, 9 hours left to enroll

777 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