473,326 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

How to compare String in javascript

Hi,
I have a array of string and a variable containing string and i code like as;

if(String.compare(DFArray[i],checkBox.name)==0) {

alert("R U HERE?");
f=false;
return;
}

but it throws an error Object does not support this property or method.
So can you Plz help me in this.

Thanks & regards
Swapnil V. Ladhe
May 24 '07 #1
1 21709
dmjpro
2,476 2GB
Welcome to TSDN.

Suppose u have two strings like ......

var str1 = "Debasis Jana",
str2 = "Debasis;

now to check these two strings whether these r same or not ......
do

if(str1 == str2) {
//Ur statements here.
}
kind regards.
dmjpro.
May 24 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: J.W. | last post by:
How do I compare strings in javascript? The "==" double equals or "!=" doesn't seem to work in this case. I'm sure string comparison has been explained before but searching Google didn't find...
4
by: Richard Hollenbeck | last post by:
I'm trying to write some code that will convert any of the most popular standard date formats twice in to something like "dd Mmm yyyy" (i.e. 08 Jan 1908) and compare the first with the second and...
3
by: Matt | last post by:
if (123 > 33) will return true and if ("123" > 33) will return true So my question is, if the above behaviors are the same?? If string is a number, and compare with another number, it will...
4
by: Matt | last post by:
I posted this problem before but no reply. Now I repost again. I want to compare the address number in javascript, and the address number is alphanumeric. I have a text box and the user needs to...
3
by: Peter | last post by:
ASP.NET 1.1, this is a Intranet application and runs only on IE. I have two webform text boxes which contain dates - starting date and ending date. The dates could be in any format. for...
7
by: joeyej | last post by:
How do I compare today's date with this string (in my inc file) so that I can set an alert if date choice i.e. May 15, 2006 not at least greater than two days from current date? <option...
12
by: Assimalyst | last post by:
Hi, I have a working script that converts a dd/mm/yyyy text box date entry to yyyy/mm/dd and compares it to the current date, giving an error through an asp.net custom validator, it is as...
11
by: balakrishnan.dinesh | last post by:
hi frnds, Im having two 20digit numbers, But while comparing those it is giiving wrong ouput in javascript. for example here is my code, my secanrio is , ~ If first 20 digit number is...
11
by: Marshall Dudley | last post by:
I am comparing two numbers, and the comparison gives absolutely bizzare results. I am comparing 5 with a number that is entered in a form. Then if the number entered is 5, or between 50 and 95, it...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.