Skip to content

Instantly share code, notes, and snippets.

@snay2
Created July 1, 2011 17:44
Show Gist options
  • Save snay2/1059053 to your computer and use it in GitHub Desktop.
Save snay2/1059053 to your computer and use it in GitHub Desktop.
Dialoguing using a module
rule draw {
select when explicit draw
pre {
placeholder = event:param("placeholder");
html = <<
<div><form>
Last name: <input type="text" name="byufb_dir_last" class="inputtext" />
First name: <input type="text" name="byufb_dir_first" class="inputtext" />
<input type="button" value="Search" class="uiButton" onclick="byufb_dir_search_prep();"/>
</form></div>
<div id="byufb_dir_res" style="display:none">&nbsp;</div>
>>;
}
{
emit <|
byufb_dir_search_prep = function() {
$K("#byufb_dir_res").show();
$K("#byufb_dir_res").prepend('<img src="' + spinner_url + '" /><br />');
byufb_dir_search();
};
|>;
dialogue:get_data(["[name=byufb_dir_last]", "[name=byufb_dir_first]"], "val",
["byufb_dir_last", "byufb_dir_first"], "directory_searched", "byufb_dir_search");
byufb:addsection("Directory", html, placeholder);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment