aspose file tools*
The moose likes JSP and the fly likes getParameter value of a button Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "getParameter value of a button" Watch "getParameter value of a button" New topic
Author

getParameter value of a button

WeiJie Lim
Ranch Hand

Joined: Sep 05, 2012
Posts: 89
The following code activates when a button named "search-btn" is clicked.

However, why does it still work even when I set the value of the button to null ?

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61662
    
  67

"" is not null. It is the empty string.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
WeiJie Lim
Ranch Hand

Joined: Sep 05, 2012
Posts: 89
Bear Bibeault wrote:"" is not null. It is the empty string.


Oh I see, thanks.

So in fact the code will always activate for buttons right ? Since there isn't a case which the value attribute can be null.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61662
    
  67

Did you try omitting the value attribute completely?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: getParameter value of a button