Created
April 29, 2014 19:23
-
-
Save yetanotherion/11409597 to your computer and use it in GitHub Desktop.
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
| let create_form = | |
| (fun (url_name, location_name) -> | |
| let location_input = string_input ~input_type:`Text ~name:location_name () in | |
| [p [string_input ~input_type:`Text ~name:url_name ~a:[a_onchange {{ | |
| (fun _ -> | |
| let location = Html5.To_dom.of_element %location_input in | |
| (Js.Unsafe.coerce location)##value <- "tome val"; | |
| Firebug.console##log("I was here"); | |
| ) | |
| }}] (); | |
| location_input; | |
| string_input ~input_type:`Submit ~value:"insert" (); | |
| ] | |
| ]) | |
| let _ = | |
| Eliom_registration.Html5.register_service ["inserttest"] unit | |
| (fun () () -> | |
| let f = get_form ~service:insert_url_service | |
| create_form | |
| in | |
| Lwt.return (html | |
| (head (title (pcdata "Insert an url")) []) | |
| (body [f]))); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment