Split[] / parse[]

  • Thread starter John Taylor-Johnston
  • Start date
J

John Taylor-Johnston

I can do this with Perl or PHP, but non JS. I don't have a clue :)
I want to check if my string value

getCookie("BTO - Taking Care of Business.Score")

contains the word "completed". How?

if(getCookie("BTO - Taking Care of Business.Score") contains "completed")
{
document.write("yeah, you passed");
}

:) John
 
L

Lasse Reichstein Nielsen

John Taylor-Johnston said:
I want to check if my string value

getCookie("BTO - Taking Care of Business.Score")

contains the word "completed". How?

if (getCookie("BTO - Taking Care of Business.Score").indexOf("completed")>=0)

/L
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top