redho home | products | services

Programming Forums


Community for Java, PHP, Perl C, ASP and Python programmers

Ask your IT question here

testing a variable



 
Post new topic   Reply to topic    Programming Forums -> JavaScript forum
View previous topic :: View next topic  
Author Message
autos06
Enthusiastic Coder


Joined: 13 May 2006
Posts: 123
Location: New York
How can I test to see if a variable has a pattern or a substring in it ?

Reply with quote
 
Koplaf
Enthusiastic Coder


Joined: 28 May 2006
Posts: 130
autos06 you mean if a string has a pattern or substring in it?
Reply with quote
 
autos06
Enthusiastic Coder


Joined: 13 May 2006
Posts: 123
Location: New York
Yes sir
Reply with quote
 
Koplaf
Enthusiastic Coder


Joined: 28 May 2006
Posts: 130
Str.indexOf(substr) or check out regex
Reply with quote
 
autos06
Enthusiastic Coder


Joined: 13 May 2006
Posts: 123
Location: New York
How would I do a regex sir ?
Reply with quote
 
Koplaf
Enthusiastic Coder


Joined: 28 May 2006
Posts: 130
Www.regular-expressions.info
Reply with quote
 
autos06
Enthusiastic Coder


Joined: 13 May 2006
Posts: 123
Location: New York
Thx u
Location.href = which; <-- that works perfect... how can I make that spawn in a new browser ?
I'm use to doing target="_blank"

Reply with quote
 
Koplaf
Enthusiastic Coder


Joined: 28 May 2006
Posts: 130
Window.open(which)
Reply with quote
 
autos06
Enthusiastic Coder


Joined: 13 May 2006
Posts: 123
Location: New York
Thxs
Worked perfect
Thxs

Reply with quote
 
Page 1 of 1
Post new topic   Reply to topic    Programming Forums -> JavaScript forum


Dubai Forums - Expat Help | Vegan Chat | Java Programming | Free 3D tutorials and 3d textures | Paris Forum | EU Forum
Free Dubai Classifieds | Free London Classifieds | Jobs in London

High Quality, Custom 3d animation and Web Design solutions Royal Quality Web Hosting Services Vegetarian and Animal Rights news

Powered by phpBB © 2001, 2005 phpBB Group