| Author |
confirm message in JSP
|
nuthan kumar
Ranch Hand
Joined: Feb 14, 2006
Posts: 47
|
|
Hi, I need to write a JSP code for the follwoing logic int count = get from database if(count <0) { show confirm message if(true) do something 1 else do something 2 } I tried like this if( (mlMCOList != null) && (mlMCOList.size()>0) ) { %> <SCRIPT language=JavaScript> var answer; answer = confirm('Are you sure?'); alert(answer); if(answer == true){ <% System.out.println("yes"); %> } <% } but it is not working .. can any help me in this ..? Thanks in advace Nuthan
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56207
|
|
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.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: confirm message in JSP
|
|
|