find error in this code

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • amiparna
    New Member
    • Mar 2007
    • 5

    find error in this code

    hi,
    What is the error in this code...

    s="aa.htm";

    if(parent.frame 2.location.href .find(s)==true)
    {
    parent.frame2.l ocation.href=s;
    }
    else
    {
    parent.frame2.l ocation.href="a a1.htm";
    }
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by amiparna
    hi,
    What is the error in this code...

    s="aa.htm";

    if(parent.frame 2.location.href .find(s)==true)
    {
    parent.frame2.l ocation.href=s;
    }
    else
    {
    parent.frame2.l ocation.href="a a1.htm";
    }
    Moved to web related forum

    Comment

    • gits
      Recognized Expert Moderator Expert
      • May 2007
      • 5388

      #3
      hi ...

      find is not a built in js-function. do you have defined one for yourself? ... if not then use search or indexof or a regEx for that ...

      kind regards

      Comment

      • pbmods
        Recognized Expert Expert
        • Apr 2007
        • 5821

        #4
        No [CODE] tags is what's wrong.

        Comment

        Working...