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){}
>>;
}
}
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.
精彩评论