• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Alert

 
rose hegde
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Through java code i want to display alert box.
A value is checked for from database and if its greater a alert box has to be displayed.
Like i display it on java console using System.out.println...i want to display in the form of alert box when assessing from jsp file.
Thanx
 
jyothsna kumari
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hai,
from server side java u cannot show the alert box directly.if u want u can pass a value to the jsp form and check for that value in body onload.if it is set u can show the alert box.on client side java u can call a function on checkbox being checked.in that u can call a alert box.
thanks,
jyothsna
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can also manipulate the body tag of the generated HTML page to show a Javascript alert with a custom text in its onload argument.
 
Mathias Nilsson
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
you can do this using a hidden Frame.
Let's say you have a frameset. You make one frame 1x1 px; when you
press a button from let's say frame "a" then send a query to the hidden frame.
Make the process with database query and just do an
document.form[ "a" ].showAlert( "Message" );
You can't do it from the same frame without reloading the page. using this technique you don't have to reload the frame visible for the user. If you want it more dynamic use java applet.
// Mathias
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65129
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's clear that this is much more of an HTML/Javascript question than one on JSP, so I'm moving it accordingly.
bear
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic