Created
          July 1, 2011 17:44 
        
      - 
      
- 
        Save snay2/1059053 to your computer and use it in GitHub Desktop. 
    Dialoguing using a module
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | 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"> </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