| | |
How to compare string value
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Dec 2005
Posts: 1
Reputation:
Solved Threads: 0
function validate1(){
if(document.all.doc1.value == ""){
alert('Please select 1st Docoment !!');
document.all.doc1.focus();
document.all.doc2.value = "";
}
var doc1 = eval(document.all.doc1.value);
var doc2 = eval(document.all.doc2.value);
if(doc2 < doc1){
alert('First Document number must greater than secondnd Document number!!');
document.all.doc1.focus();
document.all.doc2.value = "";
}
the script above used to compare string between combo box it can compare integer value but can't compare string value
please help soon
if(document.all.doc1.value == ""){
alert('Please select 1st Docoment !!');
document.all.doc1.focus();
document.all.doc2.value = "";
}
var doc1 = eval(document.all.doc1.value);
var doc2 = eval(document.all.doc2.value);
if(doc2 < doc1){
alert('First Document number must greater than secondnd Document number!!');
document.all.doc1.focus();
document.all.doc2.value = "";
}
the script above used to compare string between combo box it can compare integer value but can't compare string value
please help soon
-1
#5 Oct 24th, 2009
•
•
•
•
Para que se usa el string.value, ayudenme a crear una clase cuenta. Manda a pedir si quieres crear una cuenta de ahorro o una de credito...
Do you see how frustrating it is that I used my mother language?
> This thread is from 2005. If you have something to post, do it in English.
By the way the above is Greek. Ζήτω η Ελλάς.
Check out my New Bike at my Public Profile at the "About Me" tab
![]() |
Similar Threads
- JSTL compare string (JSP)
- how to compare a string to null... (C++)
- Compare String with Strings (Visual Basic 4 / 5 / 6)
- no matching function for call to 'strcmp(std::string&, std::string&)' (C++)
- Question about comparing a string with a character (C++)
- Help with String Comparison (C++)
- string comparison in VB.net (VB.NET)
Other Threads in the Java Forum
- Previous Thread: Ant
- Next Thread: why is there a NullPointerException?
| Thread Tools | Search this Thread |
-xlint android api applet application array arrays automation bi binary blackberry block bluetooth chat class classes client code compile compiler component database developmenthelp eclipse error event exception fractal freeze game gameprogramming givemetehcodez graphics gui health html ide image input integer j2me j2seprojects java javac javaprojects jetbrains jni jpanel jtable julia learningresources lego linux list login loop loops mac map method methods mobile netbeans newbie notdisplaying number online oracle page print problem program programming project qt recursion scanner screen server set singleton size sms sort sql string swing system template textfields threads time title tree tutorial-sample update variablebinding windows working xor






