File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes confirm message in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "confirm message in JSP" Watch "confirm message in JSP" New topic

confirm message in JSP

nuthan kumar
Ranch Hand

Joined: Feb 14, 2006
Posts: 47
I need to write a JSP code for the follwoing logic

int count = get from database
if(count <0)
show confirm message
do something 1
do something 2

I tried like this
if( (mlMCOList != null) && (mlMCOList.size()>0) )
<SCRIPT language=JavaScript>
var answer;
answer = confirm('Are you sure?');
if(answer == true){

but it is not working .. can any help me in this ..?

Thanks in advace
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63854

You can't mix Java and Javascript in a JSP like that and expect it to act serially.

Please read this article to find out why.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: confirm message in JSP
jQuery in Action, 3rd edition