Split[] / parse[]

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John Taylor-Johnston

    Split[] / parse[]

    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("B TO - Taking Care of Business.Score" ) contains "completed" )
    {
    document.write( "yeah, you passed");
    }

    :) John

  • Lasse Reichstein Nielsen

    #2
    Re: Split[] / parse[]

    John Taylor-Johnston <taylorjo@colle gesherbrooke.qc .ca> writes:
    [color=blue]
    > I want to check if my string value
    >
    > getCookie("BTO - Taking Care of Business.Score" )
    >
    > contains the word "completed" . How?[/color]

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

    /L
    --
    Lasse Reichstein Nielsen - lrn@hotpop.com
    DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleD OM.html>
    'Faith without judgement merely degrades the spirit divine.'

    Comment

    • John Taylor-Johnston

      #3
      Re: Split[] / parse[]

      Thanks.
      J

      Comment

      • Douglas Crockford

        #4
        Re: Split[] / parse[]

        > I can do this with Perl or PHP, but non JS. I don't have a clue :)

        Then get a clue. Be an educated person. Read a book.



        Comment

        Working...