It's not a secret anymore!*
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
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: 24187
    
  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]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using button how to write condition