File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Using button how to write condition Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Using button how to write condition " Watch "Using button how to write condition " New topic
Author

Using button how to write condition

saravanan rajendran
Ranch Hand

Joined: Jun 13, 2008
Posts: 75
hi, i beginner for this, i created one button in servlet code using HTML when i pressed that button one text have to print eg "welcome" please give idea i new to this
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

There are two very different ways that an HTML button can do something. First, it can send a new HTTP request back to the server; another servlet (or some such) can then send back a page that says "Hello". That new page can replace the existing one, be shown in a new tab or window, be shown in an IFRAME, or (using Javascript) it can be integrated into the existng page.

The other way is to use Javascript. In this case, all the code executes in the browser. You could display your message in any of the ways noted above, or in a Javascript alert box.


[Jess in Action][AskingGoodQuestions]
 
 
subject: Using button how to write condition
 
Similar Threads
GridBagLayout Problem
Problem in combo box
Calling Java Script function in CSS Styles
dynamic page
object doesn't support this property or method