3 Replies Latest reply on Aug 31, 2007 11:37 AM by kglad

    2 action button

      Hi guys. I need some help with this code:

      if (search.text != "" )
      on (release, keyPress "<Enter>")
      getURL(" http://google.com/search", "_blank", "GET");
      search.text = "";

      else getURL(" http://www.google.com");

      I have a text input and i want the search button to act in two different ways. I want it to either search the string on google, or to open a webpage(google.com for example) if the text input is empty (kinda like a home/search button combo)
      Currently i get an error saying Statement must appear within on handler Source: if(search.text != "")

      What's the correct code?

      Thanks in advance :)