I'm going to guess what I think you are trying to do:
You have an input on the page, and when the user enters input, you want him to raise the event and get a new value from the input entered by the user, so that you can react to what they have ever typed.
Based on the assumptions I made:
- , , , , . JavaScript
, http://kynetxappaday.wordpress.com/2010/12/16/day-8-raise-web-events-from-javascript/, - JavaScript
ruleset a60x488 {
meta {
name "raising-custom-web-events"
description <<
raising-custom-web-events
>>
author "Mike Grace"
logging on
}
rule run_on_a_pageview {
select when pageview ".*"
{
notify("Hello","I ran on a pageview") with sticky = true;
emit <|
app = KOBJ.get_application("a60x488");
app.raise_event("custom_event_just_for_me", {"answer":42});
|>;
}
}
rule respond_to_custom_event_raised_from_emitted_js {
select when web custom_event_just_for_me
pre {
answer = event:param("answer");
}
{
notify("What is the answer?",answer) with sticky = true;
}
}
}