frosty
frosty

Reputation: 21762

raise_event from client not working in dev

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){}  
        >>;
    }
}

Upvotes: 4

Views: 44

Answers (1)

Alex
Alex

Reputation: 66012

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.

Upvotes: 4

Related Questions