473,405 Members | 2,310 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,405 software developers and data experts.

compare

Hello!

Can someone help me with this school work...

JavaScript
Make three 22 simbol txt fields and a button "Search". The 1st and 2nd fields are txt fields were You can write in. Like, in 1st I write "Source", but in 2nd I write "ou" and click "Search" button, it tells me true in 3rd field, but if I white in 2nd "gt", it tells me false in 3rd field! 2nd fields simbols must be in 1st, then it is true, but if not, then false...

I don't know how to write this, I serched for some examples, but didn't find any...

Thanks for Helping me :)
Oct 22 '06 #1
5 1119
[HTML]
<html>
<!-- see https://sourceforge.net/projects/jsconcise -->
<body>
<script type="text/javascript">
function doSearch(){
document.fo1.f3.value = document.fo1.f1.value.indexOf(document.fo1.f2.valu e)>=0;
}
</script>
<form name="fo1">
<input type="text" name="f1"><br>
<input type="text" name="f2"><br>
<input type="text" name="f3"><br>
<input type="button" name="f4" onclick="doSearch()" value="search"><br>

</form>
</body>
</html>
[/HTML]
Oct 23 '06 #2
<html>
<!-- see https://sourceforge.net/projects/jsconcise -->
<body>
<script type="text/javascript">
function doSearch(){
document.fo1.f3.value = document.fo1.f1.value.indexOf(document.fo1.f2.valu e)>=0;
}
</script>
<form name="fo1">
<input type="text" name="f1"><br>
<input type="text" name="f2"><br>
<input type="text" name="f3"><br>
<input type="button" name="f4" onclick="doSearch()" value="search"><br>

</form>
</body>
</html>
thanx, but I don't know what to write down to get it work... In JavaScript I'm a lame! Can You give my the full code plzz?!?!?!?!
Oct 24 '06 #3
thanx, but I don't know what to write down to get it work... In JavaScript I'm a lame! Can You give my the full code plzz?!?!?!?!
from what i can see that is the whole code. :)
Oct 24 '06 #4
from what i can see that is the whole code. :)
IE Tell's me that there is an error in the code and FF don't tell anything... :( I don't know what to write in the code to get it working... :(
Oct 25 '06 #5
http://sds.e-home.lv/ko.php
But it don't work :/
Oct 25 '06 #6

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

Similar topics

13
by: MrCoder | last post by:
Hey guys, my first post on here so I'll just say "Hello everbody!" Ok heres my question for you lot. Is there a faster way to compare 1 byte array to another? This is my current code //...
5
by: Megan | last post by:
Hi everybody- I'm helping a friend with a music database. She has an old one and is creating a new one. She wants to compare records and fields in the old database with records and fields in the...
8
by: Vincent | last post by:
has any one seen a program to compare mdbs'. I have ran into a few of them, but none seem to really do that job. Basically what I need to do is, take 2 access mdb's and check the differences...
9
by: geronimo_me | last post by:
Hi, I am atempting to compare part of a field with the whole of another field in access. Is this possible? Basically I have 2 tables with the following info: Table1 Field1 = MR.
11
by: Russ Green | last post by:
How does this: public TimeSpan Timeout { get { return timeout; } set { timeout = value; if(timeout < licenseTimeout) licenseTimeout = timeout; }
1
by: Linda | last post by:
Hi, Is there a way to do a "text" (rather than "binary") compareison with the "like" operator, without changing the global "Option Compare" setting? I don't want to risk breaking many, many...
17
by: Mark A | last post by:
DB2 8.2 for Linux, FP 10 (also performs the same on DB2 8.2 for Windoes, FP 11). Using the SAMPLE database, tables EMP and EMLOYEE. In the followng stored procedure, 2 NULL columns (COMM) are...
5
by: antani | last post by:
I need to implement a function with a argument that is a compare function. This compare function must be several for every necessity. For example , I would like a compare function to analyze...
26
by: neha_chhatre | last post by:
can anybody tell me how to compare two float values say for example t and check are two variables declared float how to compare t and check please help me as soon as possible
1
by: Lambda | last post by:
I defined a class: class inverted_index { private: std::map<std::string, std::vector<size_t index; public: std::vector<size_tintersect(const std::vector<std::string>&); };
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.