Forums
This topic is locked
evaluation of string in if-construction
Posted 14 Aug 2002 15:13:19
1
has voted
14 Aug 2002 15:13:19 Erwin Hendriks posted:
I've got java-code in my .jsp to show/hide a button.If a given string starts with '-' (negative) or is equal to "0.00" then hide pay-button.
The code looks like this:
IF (string == "0.00" || string.substring(0,1) = "-"

Evaluation strings in this way doesn't seem to work...
Suggestions please! I know, rtfm, but thanks anyway....
Replies
Replied 14 Aug 2002 15:50:08
14 Aug 2002 15:50:08 Erwin Hendriks replied:
Solution: if (string.substring(0,1).equals("-"
....
This works fine!
Nakhba

This works fine!
Nakhba
Replied 02 Nov 2002 01:04:31
02 Nov 2002 01:04:31 Auz Clement replied:
can anyone please tell me how to store the contents of a string while ignoring the last 4 characters using ASP w/VBscript?
thanks
John Auzheal Clement
(www.digitm.com)
thanks
John Auzheal Clement
(www.digitm.com)
Replied 04 Nov 2002 18:55:57
04 Nov 2002 18:55:57 Brent Colflesh replied: