4

I have the following code, and raising the web event doesn't do what it should do. I have disabled all of my extensions to ensure that it isn't something there. Please help. I find it hard to build an app if I can't debug my junk. HELP ME!!!

dispatch {
    // Some example dispatch domains
    // domain "example.com"
    domain "google.com"
}

global {

}
rule temp_rule is active{
    select when pageview ".*"
    pre{

    }
    {
        notify("111",'123');

        emit<<
            var tempapp = KOBJ.get_application("a710x19");
            tempapp.raise_event("temp2");
        >>;
    }
}

rule temp2 is active{
    select when web temp2
    pre{

    }
    {
        notify("222",'<div id="fbp_fblogo">123</div>');
        emit<<
            try{
                console.log("TEMP2'd");  
            }catch(e){}  
        >>;
    }
}
frosty
  • 21,036
  • 7
  • 52
  • 74

1 Answers1

4

The problem is that your event name contains a numeral. Event names are only to contain letters.

Remove the 2 from your raise_event call in your emit and from your select statement and it will work.

Alex
  • 64,178
  • 48
  • 151
  • 180
  • Alex, it works when I raise the event explicitly from one another rule, however it doesn't work when I raise it from a web event. What think yee of this? – frosty Apr 06 '11 at 17:02