Replace the Space With a (+) Colorado

Today, we look at the code that searches the keywords entered in this script.

Local Companies

Database Link LLC
303 269 1801
7125 E.Townsend Dr.
Denver, CO
The Logix Group
(720) 259-7500
8801 E. Hampden Ave.
Denver, CO
Amadeus Consulting
720 564 1231
1995 N. 57th Ct.
Boulder, CO
International Computer Services
720-859-0404
10 S Havana St
Aurora, CO
deSabran
(303) 782-9101
5082 E Hampden Ave
Denver, CO
Database Link LLC
303 269 1801
7125 E.Townsend Dr.
Denver, CO
21st Century Technologies, Inc.
303-744-2178
1566 S. Pennsylvania St.
Denver, CO
EDUSS Education Software
303-779-8700
8000 E Belleview
Greenwood Village, CO
Rapid Refill Ink
303-292-9465
1719 Wazee St
Denver, CO
C Graphics
720-890-2911
8547 E. Arapahoe Rd.
Greenwood Village, CO

provided by: 
Originally published at Internet.com


Tip Forty-Tree...

I have found that one of the hardest things about writing a JavaScript is trying to set up code so that every possible thing a user could do is handled in one way or another. I always forget something.

The author of this script put in some code that I would never have thought of. Many of you know that when using a search engine, a plus sign (+) between words is a good idea to help to search. Today, we look at the code that searches the keywords entered in this script. If a space is found, then a plus sign replaces it.

But first, refresh yourself on the effect and code of this Script.

-----------------------------------

Enter the Keyword :

Select the Search Engine(s):
Yahoo
Altavista
WebCrawler
Excite
Lycos

-----------------------------------

Here's the Code

-----------------------------------

I am worried about the code that makes up the first function, wordsplit(items). It looks like this:

function wordsplit(items) { var charect = ""; for (var n = 1 ; n <= items.length ; n++) { if (items.substring(n-1,n) == " ") { charect+="+"; } else { charect+=items.substring(n-1,n); } } return charect; } ...

Read article at Internet.com site

Featured Local Company

Database Link LLC

303 269 1801
7125 E.Townsend Dr.
Denver, CO
http://www.dblink.co.nz

Related Articles
- The Case for Components Colorado
In Paul Kimmel's latest column from CodeGuru.com, he tackles the hype about classes and components. In doing so, he even presents you with information on the splitter control within Visual Basic .NET.
- Auto repositioning/resizing of child controls (using C++ templates) Colorado
- Diary of a Web Developer: Fork in the Road Colorado
- So, You Want A Menu, Huh? Colorado
- Box Properties Colorado
- Branching Method Colorado
- Understanding New JScript .NET Statements Colorado
Related Local Events
SEG - Society of Exploration Geophysicists Annual International Meeting and Exposition 2010
Dates: 10/17/2010 - 10/21/2010
Location: Denver Convention Center
Denver, CO
View Details

INTC 2009
Dates: 9/21/2009 - 9/24/2009
Location: Hyatt Convention Center Hotel
Denver, CO
View Details

Topics: 
Architecture & Design Languages & Tools Project Management Web Services
Database Microsoft & .NET Security Wireless
Java Open Source Techniques XML