This is client API (go to server)

Warning: Reason support is experimental. We are looking for beta-tester and contributors.

Module Eliom_output.​Html5

module Html5 : sig..end

Eliom service registration and forms creation for HTML5 page



Links and forms


val make_string_uri : 
  ?absolute:bool ->
  ?absolute_path:bool ->
  ?https:bool ->
  service:('a, unit, [< Eliom_services.get_service_kind ],
   [< Eliom_services.suff ], 'b, unit,
   [< Eliom_services.registrable ], 'c)
   Eliom_services.service ->
  ?hostname:string ->
  ?port:int ->
  ?fragment:string ->
  ?keep_nl_params:[ `All | `None | `Persistent ] ->
  ?nl_params:Eliom_parameters.nl_params_set -> 'a -> string

Creates the string corresponding to the relative URL of a service applied to its GET parameters.

If absolute is set to true, or if there is a protocol change, the URL will be absolute.

If absolute_path is set to true, and absolute is false, the URL will be absolute, but without protocol://server:port.

Default hostname is determined from the Host http header of the request (or the attribute of <host> tag in configuration file if the option <usedefaulthostname/> is set). Default port is the current port (or another port of the server if you are switching from or to https). But you can choose the hostname or port you want by setting the optional ?hostname and ?port parameters here.

val make_uri : 
  ?absolute:bool ->
  ?absolute_path:bool ->
  ?https:bool ->
  service:('a, unit, [< Eliom_services.get_service_kind ],
   [< Eliom_services.suff ], 'b, unit,
   [< Eliom_services.registrable ], 'c)
   Eliom_services.service ->
  ?hostname:string ->
  ?port:int ->
  ?fragment:string ->
  ?keep_nl_params:[ `All | `None | `Persistent ] ->
  ?nl_params:Eliom_parameters.nl_params_set -> 'a -> HTML5_types.uri

Creates the URL for a service. Like the a function, it may take extra parameters.

val make_uri_components : 
  ?absolute:bool ->
  ?absolute_path:bool ->
  ?https:bool ->
  service:('a, unit, [< Eliom_services.get_service_kind ],
   [< Eliom_services.suff ], 'b, unit,
   [< Eliom_services.registrable ], 'c)
   Eliom_services.service ->
  ?hostname:string ->
  ?port:int ->
  ?fragment:string ->
  ?keep_nl_params:[ `All | `None | `Persistent ] ->
  ?nl_params:Eliom_parameters.nl_params_set ->
  'a -> string * (string * string) list * string option

Creates the URL for a service. Returns the path (as a string, encoded), the association list of get parameters (not encoded), and the fragment (not encoded, if any). Like the a function, it may take extra parameters.

val make_post_uri_components : 
  ?absolute:bool ->
  ?absolute_path:bool ->
  ?https:bool ->
  service:('a, 'b, [< Eliom_services.post_service_kind ],
   [< Eliom_services.suff ], 'c, 'd,
   [< Eliom_services.registrable ], 'e)
   Eliom_services.service ->
  ?hostname:string ->
  ?port:int ->
  ?fragment:string ->
  ?keep_nl_params:[ `All | `None | `Persistent ] ->
  ?nl_params:Eliom_parameters.nl_params_set ->
  ?keep_get_na_params:bool ->
  'a ->
  'b ->
  string * (string * string) list * string option *
  (string * string) list

Like make_uri_components, but also creates a table of post parameters.

val a : 
  ?absolute:bool ->
  ?absolute_path:bool ->
  ?https:bool ->
  ?a:HTML5_types.a_attrib Eliom_pervasives.HTML5.M.attrib list ->
  service:('a, unit, [< Eliom_services.get_service_kind ],
   [< Eliom_services.suff ], 'b, unit,
   [< Eliom_services.registrable ], 'c)
   Eliom_services.service ->
  ?hostname:string ->
  ?port:int ->
  ?fragment:string ->
  ?keep_nl_params:[ `All | `None | `Persistent ] ->
  ?nl_params:Eliom_parameters.nl_params_set ->
  ?no_appl:bool ->
  'd Eliom_pervasives.HTML5.M.elt list ->
  'a -> [> 'd HTML5_types.a ] Eliom_pervasives.HTML5.M.elt

a service cont () creates a link to service. The text of the link is cont. For example cont may be something like [pcdata "click here"].

The last parameter is for GET parameters. For example a service cont (42,"hello")

The ~a optional parameter is used for extra attributes.

The ~fragment optional parameter is used for the "fragment" part of the URL, that is, the part after character "#".

When possible, all links generated by Eliom are relative, for example to make easier the use with reverse proxies. But in case of protocol change (if you want to switch to https using ~https:true for example, or if the service imposes https), absolute links will be generated. In that case, default hostname is determined from the Host http header of the request (or the attribute of <host> tag in configuration file if the option <usedefaulthostname/> is set). Default port is the current port (or another port of the server if you are switching from or to https). But you can choose the hostname or port you want by setting the optional ?hostname and ?port parameters here. These options have no effect for relative links.

You can add non-localized parameters using the optional parameter nl_params. See Eliom_parameters.nl_params_set.

If ~keep_nl_params is `Persistent (resp. `All), persistent (resp all) non localized GET parameters will be kept in the URL (default is the default for the service).

If a client side application is running, and unless ~no_appl:true is specified, it will use <a onclick=...> instead of <a href=...> to send process cookies. Thus, if the destination service belongs to the same application, the client side process will not be stopped when the link is clicked.

Creates a <link> tag for a Cascading StyleSheet (CSS).

val js_script : 
  ?a:HTML5_types.script_attrib Eliom_pervasives.HTML5.M.attrib list ->
  uri:HTML5_types.uri ->
  unit -> [> HTML5_types.script ] Eliom_pervasives.HTML5.M.elt

Creates a <script> tag to add a javascript file

val get_form : 
  ?absolute:bool ->
  ?absolute_path:bool ->
  ?https:bool ->
  ?a:HTML5_types.form_attrib Eliom_pervasives.HTML5.M.attrib list ->
  service:('a, unit, [< Eliom_services.get_service_kind ],
   [< Eliom_services.suff ], 'b, 'c,
   [< Eliom_services.registrable ], 'd)
   Eliom_services.service ->
  ?hostname:string ->
  ?port:int ->
  ?fragment:string ->
  ?keep_nl_params:[ `All | `None | `Persistent ] ->
  ?nl_params:Eliom_parameters.nl_params_set ->
  ?no_appl:bool ->
  ('b -> HTML5_types.form_content Eliom_pervasives.HTML5.M.elt list) ->
  [> HTML5_types.form ] Eliom_pervasives.HTML5.M.elt

get_form service formgen creates a GET form to service. The content of the form is generated by the function formgen, that takes the names of the service parameters as parameters.

val lwt_get_form : 
  ?absolute:bool ->
  ?absolute_path:bool ->
  ?https:bool ->
  ?a:HTML5_types.form_attrib Eliom_pervasives.HTML5.M.attrib list ->
  service:('a, unit, [< Eliom_services.get_service_kind ],
   [< Eliom_services.suff ], 'b, 'c,
   [< Eliom_services.registrable ], 'd)
   Eliom_services.service ->
  ?hostname:string ->
  ?port:int ->
  ?fragment:string ->
  ?keep_nl_params:[ `All | `None | `Persistent ] ->
  ?nl_params:Eliom_parameters.nl_params_set ->
  ?no_appl:bool ->
  ('b ->
   HTML5_types.form_content Eliom_pervasives.HTML5.M.elt list Lwt.t) ->
  [> HTML5_types.form ] Eliom_pervasives.HTML5.M.elt Lwt.t

The same but taking a cooperative function.

val post_form : 
  ?absolute:bool ->
  ?absolute_path:bool ->
  ?https:bool ->
  ?a:HTML5_types.form_attrib Eliom_pervasives.HTML5.M.attrib list ->
  service:('a, 'b, [< Eliom_services.post_service_kind ],
   [< Eliom_services.suff ], 'c, 'd,
   [< Eliom_services.registrable ], 'e)
   Eliom_services.service ->
  ?hostname:string ->
  ?port:int ->
  ?fragment:string ->
  ?keep_nl_params:[ `All | `None | `Persistent ] ->
  ?keep_get_na_params:bool ->
  ?nl_params:Eliom_parameters.nl_params_set ->
  ?no_appl:bool ->
  ('d -> HTML5_types.form_content Eliom_pervasives.HTML5.M.elt list) ->
  'a -> [> HTML5_types.form ] Eliom_pervasives.HTML5.M.elt

post_form service formgen creates a POST form to service. The last parameter is for GET parameters (as in the function a).

If ~keep_nl_params is `Persistent (resp. `All), persistent (resp all) non localized GET parameters will be kept in the URL (default is the default for the service).

val lwt_post_form : 
  ?absolute:bool ->
  ?absolute_path:bool ->
  ?https:bool ->
  ?a:HTML5_types.form_attrib Eliom_pervasives.HTML5.M.attrib list ->
  service:('a, 'b, [< Eliom_services.post_service_kind ],
   [< Eliom_services.suff ], 'c, 'd,
   [< Eliom_services.registrable ], 'e)
   Eliom_services.service ->
  ?hostname:string ->
  ?port:int ->
  ?fragment:string ->
  ?keep_nl_params:[ `All | `None | `Persistent ] ->
  ?keep_get_na_params:bool ->
  ?nl_params:Eliom_parameters.nl_params_set ->
  ?no_appl:bool ->
  ('d ->
   HTML5_types.form_content Eliom_pervasives.HTML5.M.elt list Lwt.t) ->
  'a -> [> HTML5_types.form ] Eliom_pervasives.HTML5.M.elt Lwt.t

The same but taking a cooperative function.


Form widgets


val int_input : 
  ?a:HTML5_types.input_attrib Eliom_pervasives.HTML5.M.attrib list ->
  input_type:[< `Hidden | `Password | `Submit | `Text ] ->
  ?name:[< int Eliom_parameters.setoneradio ]
   Eliom_parameters.param_name ->
  ?value:int ->
  unit -> [> HTML5_types.input ] Eliom_pervasives.HTML5.M.elt

Creates an <input> tag for an integer

val int32_input : 
  ?a:HTML5_types.input_attrib Eliom_pervasives.HTML5.M.attrib list ->
  input_type:[< `Hidden | `Password | `Submit | `Text ] ->
  ?name:[< int32 Eliom_parameters.setoneradio ]
   Eliom_parameters.param_name ->
  ?value:int32 ->
  unit -> [> HTML5_types.input ] Eliom_pervasives.HTML5.M.elt

Creates an <input> tag for an integer

val int64_input : 
  ?a:HTML5_types.input_attrib Eliom_pervasives.HTML5.M.attrib list ->
  input_type:[< `Hidden | `Password | `Submit | `Text ] ->
  ?name:[< int64 Eliom_parameters.setoneradio ]
   Eliom_parameters.param_name ->
  ?value:int64 ->
  unit -> [> HTML5_types.input ] Eliom_pervasives.HTML5.M.elt

Creates an <input> tag for an integer

val float_input : 
  ?a:HTML5_types.input_attrib Eliom_pervasives.HTML5.M.attrib list ->
  input_type:[< `Hidden | `Password | `Submit | `Text ] ->
  ?name:[< float Eliom_parameters.setoneradio ]
   Eliom_parameters.param_name ->
  ?value:float ->
  unit -> [> HTML5_types.input ] Eliom_pervasives.HTML5.M.elt

Creates an <input> tag for a float

val string_input : 
  ?a:HTML5_types.input_attrib Eliom_pervasives.HTML5.M.attrib list ->
  input_type:[< `Hidden | `Password | `Submit | `Text ] ->
  ?name:[< string Eliom_parameters.setoneradio ]
   Eliom_parameters.param_name ->
  ?value:string ->
  unit -> [> HTML5_types.input ] Eliom_pervasives.HTML5.M.elt

Creates an <input> tag for a string

val user_type_input : 
  ('a -> string) ->
  ?a:HTML5_types.input_attrib Eliom_pervasives.HTML5.M.attrib list ->
  input_type:[< `Hidden | `Password | `Submit | `Text ] ->
  ?name:[< 'a Eliom_parameters.setoneradio ] Eliom_parameters.param_name ->
  ?value:'a ->
  unit -> [> HTML5_types.input ] Eliom_pervasives.HTML5.M.elt

Creates an <input> tag for a user type

val raw_input : 
  ?a:HTML5_types.input_attrib Eliom_pervasives.HTML5.M.attrib list ->
  input_type:[< `Button | `Hidden | `Password | `Reset | `Submit | `Text ] ->
  ?name:string ->
  ?value:string ->
  unit -> [> HTML5_types.input ] Eliom_pervasives.HTML5.M.elt

Creates an untyped <input> tag. You may use the name you want (for example to use with Eliom_parameters.any).

val file_input : 
  ?a:HTML5_types.input_attrib Eliom_pervasives.HTML5.M.attrib list ->
  name:[< Eliom_pervasives.file_info Eliom_parameters.setoneradio ]
   Eliom_parameters.param_name ->
  unit -> [> HTML5_types.input ] Eliom_pervasives.HTML5.M.elt

Creates an <input> tag for sending a file

val image_input : 
  ?a:HTML5_types.input_attrib Eliom_pervasives.HTML5.M.attrib list ->
  name:[< Eliom_parameters.coordinates Eliom_parameters.oneradio ]
   Eliom_parameters.param_name ->
  ?src:HTML5_types.uri ->
  unit -> [> HTML5_types.input ] Eliom_pervasives.HTML5.M.elt

Creates an <input type="image" name="..."> tag that sends the coordinates the user clicked on

val int_image_input : 
  ?a:HTML5_types.input_attrib Eliom_pervasives.HTML5.M.attrib list ->
  name:[< (int * Eliom_parameters.coordinates) Eliom_parameters.oneradio ]
   Eliom_parameters.param_name ->
  value:int ->
  ?src:HTML5_types.uri ->
  unit -> [> HTML5_types.input ] Eliom_pervasives.HTML5.M.elt

Creates an <input type="image" name="..." value="..."> tag that sends the coordinates the user clicked on and a value of type int

val int32_image_input : 
  ?a:HTML5_types.input_attrib Eliom_pervasives.HTML5.M.attrib list ->
  name:[< (int32 * Eliom_parameters.coordinates)
   Eliom_parameters.oneradio ]
   Eliom_parameters.param_name ->
  value:int32 ->
  ?src:HTML5_types.uri ->
  unit -> [> HTML5_types.input ] Eliom_pervasives.HTML5.M.elt

Creates an <input type="image" name="..." value="..."> tag that sends the coordinates the user clicked on and a value of type int32

val int64_image_input : 
  ?a:HTML5_types.input_attrib Eliom_pervasives.HTML5.M.attrib list ->
  name:[< (int64 * Eliom_parameters.coordinates)
   Eliom_parameters.oneradio ]
   Eliom_parameters.param_name ->
  value:int64 ->
  ?src:HTML5_types.uri ->
  unit -> [> HTML5_types.input ] Eliom_pervasives.HTML5.M.elt

Creates an <input type="image" name="..." value="..."> tag that sends the coordinates the user clicked on and a value of type int64

val float_image_input : 
  ?a:HTML5_types.input_attrib Eliom_pervasives.HTML5.M.attrib list ->
  name:[< (float * Eliom_parameters.coordinates)
   Eliom_parameters.oneradio ]
   Eliom_parameters.param_name ->
  value:float ->
  ?src:HTML5_types.uri ->
  unit -> [> HTML5_types.input ] Eliom_pervasives.HTML5.M.elt

Creates an <input type="image" name="..." value="..."> tag that sends the coordinates the user clicked on and a value of type float

val string_image_input : 
  ?a:HTML5_types.input_attrib Eliom_pervasives.HTML5.M.attrib list ->
  name:[< (string * Eliom_parameters.coordinates)
   Eliom_parameters.oneradio ]
   Eliom_parameters.param_name ->
  value:string ->
  ?src:HTML5_types.uri ->
  unit -> [> HTML5_types.input ] Eliom_pervasives.HTML5.M.elt

Creates an <input type="image" name="..." value="..."> tag that sends the coordinates the user clicked on and a value of type string

val user_type_image_input : 
  ('a -> string) ->
  ?a:HTML5_types.input_attrib Eliom_pervasives.HTML5.M.attrib list ->
  name:[< ('a * Eliom_parameters.coordinates) Eliom_parameters.oneradio ]
   Eliom_parameters.param_name ->
  value:'a ->
  ?src:HTML5_types.uri ->
  unit -> [> HTML5_types.input ] Eliom_pervasives.HTML5.M.elt

Creates an <input type="image" name="..." value="..."> tag that sends the coordinates the user clicked on and a value of user defined type

val raw_image_input : 
  ?a:HTML5_types.input_attrib Eliom_pervasives.HTML5.M.attrib list ->
  name:string ->
  value:string ->
  ?src:HTML5_types.uri ->
  unit -> [> HTML5_types.input ] Eliom_pervasives.HTML5.M.elt

Creates an <input type="image" name="..." value="..."> tag that sends the coordinates the user clicked on and an untyped value

val bool_checkbox : 
  ?a:HTML5_types.input_attrib Eliom_pervasives.HTML5.M.attrib list ->
  ?checked:bool ->
  name:[ `One of bool ] Eliom_parameters.param_name ->
  unit -> [> HTML5_types.input ] Eliom_pervasives.HTML5.M.elt

Creates a checkbox <input> tag that will have a boolean value. The service must declare a bool parameter.

val int_checkbox : 
  ?a:HTML5_types.input_attrib Eliom_pervasives.HTML5.M.attrib list ->
  ?checked:bool ->
  name:[ `Set of int ] Eliom_parameters.param_name ->
  value:int ->
  unit -> [> HTML5_types.input ] Eliom_pervasives.HTML5.M.elt

Creates a checkbox <input> tag that will have an int value. Thus you can do several checkboxes with the same name (and different values). The service must declare a parameter of type set.

val int32_checkbox : 
  ?a:HTML5_types.input_attrib Eliom_pervasives.HTML5.M.attrib list ->
  ?checked:bool ->
  name:[ `Set of int32 ] Eliom_parameters.param_name ->
  value:int32 ->
  unit -> [> HTML5_types.input ] Eliom_pervasives.HTML5.M.elt

Creates a checkbox <input> tag that will have an int32 value. Thus you can do several checkboxes with the same name (and different values). The service must declare a parameter of type set.

val int64_checkbox : 
  ?a:HTML5_types.input_attrib Eliom_pervasives.HTML5.M.attrib list ->
  ?checked:bool ->
  name:[ `Set of int64 ] Eliom_parameters.param_name ->
  value:int64 ->
  unit -> [> HTML5_types.input ] Eliom_pervasives.HTML5.M.elt

Creates a checkbox <input> tag that will have an int64 value. Thus you can do several checkboxes with the same name (and different values). The service must declare a parameter of type set.

val float_checkbox : 
  ?a:HTML5_types.input_attrib Eliom_pervasives.HTML5.M.attrib list ->
  ?checked:bool ->
  name:[ `Set of float ] Eliom_parameters.param_name ->
  value:float ->
  unit -> [> HTML5_types.input ] Eliom_pervasives.HTML5.M.elt

Creates a checkbox <input> tag that will have a float value. Thus you can do several checkboxes with the same name (and different values). The service must declare a parameter of type set.

val string_checkbox : 
  ?a:HTML5_types.input_attrib Eliom_pervasives.HTML5.M.attrib list ->
  ?checked:bool ->
  name:[ `Set of string ] Eliom_parameters.param_name ->
  value:string ->
  unit -> [> HTML5_types.input ] Eliom_pervasives.HTML5.M.elt

Creates a checkbox <input> tag that will have a string value. Thus you can do several checkboxes with the same name (and different values). The service must declare a parameter of type set.

val user_type_checkbox : 
  ('a -> string) ->
  ?a:HTML5_types.input_attrib Eliom_pervasives.HTML5.M.attrib list ->
  ?checked:bool ->
  name:[ `Set of 'a ] Eliom_parameters.param_name ->
  value:'a ->
  unit -> [> HTML5_types.input ] Eliom_pervasives.HTML5.M.elt

Creates a checkbox <input> tag that will have a "user type" value. Thus you can do several checkboxes with the same name (and different values). The service must declare a parameter of type set.

val raw_checkbox : 
  ?a:HTML5_types.input_attrib Eliom_pervasives.HTML5.M.attrib list ->
  ?checked:bool ->
  name:string ->
  value:string ->
  unit -> [> HTML5_types.input ] Eliom_pervasives.HTML5.M.elt

Creates a checkbox <input> tag with untyped content. Thus you can do several checkboxes with the same name (and different values). The service must declare a parameter of type any.

val string_radio : 
  ?a:HTML5_types.input_attrib Eliom_pervasives.HTML5.M.attrib list ->
  ?checked:bool ->
  name:[ `Radio of string ] Eliom_parameters.param_name ->
  value:string ->
  unit -> [> HTML5_types.input ] Eliom_pervasives.HTML5.M.elt

Creates a radio <input> tag with string content

val int_radio : 
  ?a:HTML5_types.input_attrib Eliom_pervasives.HTML5.M.attrib list ->
  ?checked:bool ->
  name:[ `Radio of int ] Eliom_parameters.param_name ->
  value:int ->
  unit -> [> HTML5_types.input ] Eliom_pervasives.HTML5.M.elt

Creates a radio <input> tag with int content

val int32_radio : 
  ?a:HTML5_types.input_attrib Eliom_pervasives.HTML5.M.attrib list ->
  ?checked:bool ->
  name:[ `Radio of int32 ] Eliom_parameters.param_name ->
  value:int32 ->
  unit -> [> HTML5_types.input ] Eliom_pervasives.HTML5.M.elt

Creates a radio <input> tag with int32 content

val int64_radio : 
  ?a:HTML5_types.input_attrib Eliom_pervasives.HTML5.M.attrib list ->
  ?checked:bool ->
  name:[ `Radio of int64 ] Eliom_parameters.param_name ->
  value:int64 ->
  unit -> [> HTML5_types.input ] Eliom_pervasives.HTML5.M.elt

Creates a radio <input> tag with int64 content

val float_radio : 
  ?a:HTML5_types.input_attrib Eliom_pervasives.HTML5.M.attrib list ->
  ?checked:bool ->
  name:[ `Radio of float ] Eliom_parameters.param_name ->
  value:float ->
  unit -> [> HTML5_types.input ] Eliom_pervasives.HTML5.M.elt

Creates a radio <input> tag with float content

val user_type_radio : 
  ('a -> string) ->
  ?a:HTML5_types.input_attrib Eliom_pervasives.HTML5.M.attrib list ->
  ?checked:bool ->
  name:[ `Radio of 'a ] Eliom_parameters.param_name ->
  value:'a ->
  unit -> [> HTML5_types.input ] Eliom_pervasives.HTML5.M.elt

Creates a radio <input> tag with user_type content

val raw_radio : 
  ?a:HTML5_types.input_attrib Eliom_pervasives.HTML5.M.attrib list ->
  ?checked:bool ->
  name:string ->
  value:string ->
  unit -> [> HTML5_types.input ] Eliom_pervasives.HTML5.M.elt

Creates a radio <input> tag with untyped string content (low level)

val string_button : 
  ?a:HTML5_types.button_attrib Eliom_pervasives.HTML5.M.attrib list ->
  name:[< string Eliom_parameters.setone ] Eliom_parameters.param_name ->
  value:string ->
  HTML5_types.button_content Eliom_pervasives.HTML5.M.elt list ->
  [> HTML5_types.button ] Eliom_pervasives.HTML5.M.elt

Creates a <button> tag with string content

val int_button : 
  ?a:HTML5_types.button_attrib Eliom_pervasives.HTML5.M.attrib list ->
  name:[< int Eliom_parameters.setone ] Eliom_parameters.param_name ->
  value:int ->
  HTML5_types.button_content Eliom_pervasives.HTML5.M.elt list ->
  [> HTML5_types.button ] Eliom_pervasives.HTML5.M.elt

Creates a <button> tag with int content

val int32_button : 
  ?a:HTML5_types.button_attrib Eliom_pervasives.HTML5.M.attrib list ->
  name:[< int32 Eliom_parameters.setone ] Eliom_parameters.param_name ->
  value:int32 ->
  HTML5_types.button_content Eliom_pervasives.HTML5.M.elt list ->
  [> HTML5_types.button ] Eliom_pervasives.HTML5.M.elt

Creates a <button> tag with int32 content

val int64_button : 
  ?a:HTML5_types.button_attrib Eliom_pervasives.HTML5.M.attrib list ->
  name:[< int64 Eliom_parameters.setone ] Eliom_parameters.param_name ->
  value:int64 ->
  HTML5_types.button_content Eliom_pervasives.HTML5.M.elt list ->
  [> HTML5_types.button ] Eliom_pervasives.HTML5.M.elt

Creates a <button> tag with int64 content

val float_button : 
  ?a:HTML5_types.button_attrib Eliom_pervasives.HTML5.M.attrib list ->
  name:[< float Eliom_parameters.setone ] Eliom_parameters.param_name ->
  value:float ->
  HTML5_types.button_content Eliom_pervasives.HTML5.M.elt list ->
  [> HTML5_types.button ] Eliom_pervasives.HTML5.M.elt

Creates a <button> tag with float content

val user_type_button : 
  ('a -> string) ->
  ?a:HTML5_types.button_attrib Eliom_pervasives.HTML5.M.attrib list ->
  name:[< 'a Eliom_parameters.setone ] Eliom_parameters.param_name ->
  value:'a ->
  HTML5_types.button_content Eliom_pervasives.HTML5.M.elt list ->
  [> HTML5_types.button ] Eliom_pervasives.HTML5.M.elt

Creates a <button> tag with user_type content

val raw_button : 
  ?a:HTML5_types.button_attrib Eliom_pervasives.HTML5.M.attrib list ->
  button_type:[< `Button | `Reset | `Submit ] ->
  name:string ->
  value:string ->
  HTML5_types.button_content Eliom_pervasives.HTML5.M.elt list ->
  [> HTML5_types.button ] Eliom_pervasives.HTML5.M.elt

Creates a <button> tag with untyped string content

val button : 
  ?a:HTML5_types.button_attrib Eliom_pervasives.HTML5.M.attrib list ->
  button_type:[< `Button | `Reset | `Submit ] ->
  HTML5_types.button_content Eliom_pervasives.HTML5.M.elt list ->
  [> HTML5_types.button ] Eliom_pervasives.HTML5.M.elt

Creates a <button> tag with no value. No value is sent.

val textarea : 
  ?a:HTML5_types.textarea_attrib Eliom_pervasives.HTML5.M.attrib list ->
  name:[< string Eliom_parameters.setoneradio ]
   Eliom_parameters.param_name ->
  ?value:string ->
  rows:int ->
  cols:int ->
  unit -> [> HTML5_types.textarea ] Eliom_pervasives.HTML5.M.elt

Creates a <textarea> tag

val raw_textarea : 
  ?a:HTML5_types.textarea_attrib Eliom_pervasives.HTML5.M.attrib list ->
  name:string ->
  ?value:string ->
  rows:int ->
  cols:int ->
  unit -> [> HTML5_types.textarea ] Eliom_pervasives.HTML5.M.elt

Creates a <textarea> tag for untyped form

type 'a soption = 
  HTML5_types.option_attrib Eliom_pervasives.HTML5.M.attrib list * 'a *
  HTML5_types.pcdata Eliom_pervasives.HTML5.M.elt option * bool
type 'a select_opt =  | Optgroup of 
    [ `Accesskey
    | `Class
    | `Contenteditable
    | `Contextmenu
    | `Dir
    | `Disabled
    | `Draggable
    | `Hidden
    | `Id
    | `OnAbort
    | `OnBlur
    | `OnCanPlay
    | `OnCanPlayThrough
    | `OnChange
    | `OnClick
    | `OnContextMenu
    | `OnDblClick
    | `OnDrag
    | `OnDragEnd
    | `OnDragEnter
    | `OnDragLeave
    | `OnDragOver
    | `OnDragStart
    | `OnDrop
    | `OnDurationChange
    | `OnEmptied
    | `OnEnded
    | `OnError
    | `OnFocus
    | `OnFormChange
    | `OnFormInput
    | `OnInput
    | `OnInvalid
    | `OnKeyDown
    | `OnKeyPress
    | `OnKeyUp
    | `OnLoad
    | `OnLoadStart
    | `OnLoadedData
    | `OnLoadedMetaData
    | `OnMouseDown
    | `OnMouseMove
    | `OnMouseOut
    | `OnMouseOver
    | `OnMouseUp
    | `OnMouseWheel
    | `OnPause
    | `OnPlay
    | `OnPlaying
    | `OnProgress
    | `OnRateChange
    | `OnReadyStateChange
    | `OnScroll
    | `OnSeeked
    | `OnSeeking
    | `OnSelect
    | `OnShow
    | `OnStalled
    | `OnSubmit
    | `OnSuspend
    | `OnTimeUpdate
    | `OnVolumeChange
    | `OnWaiting
    | `Spellcheck
    | `Style_Attr
    | `Tabindex
    | `Title
    | `User_data
    | `XML_lang
    | `XMLns ] Eliom_pervasives.HTML5.M.attrib list * string
     * 'a soption
     * 'a soption list
 | Option of 'a soption

The type for <select> options and groups of options.* The field of type 'a in soption is the value that will be sent by the form.

  • If the pcdata_elt option is not present it is also the value displayed.
  • The string in select_opt is the label


val int_select : 
  ?a:HTML5_types.select_attrib Eliom_pervasives.HTML5.M.attrib list ->
  name:[< `One of int ] Eliom_parameters.param_name ->
  int select_opt ->
  int select_opt list ->
  [> HTML5_types.select ] Eliom_pervasives.HTML5.M.elt

Creates a <select> tag for int values.

val int32_select : 
  ?a:HTML5_types.select_attrib Eliom_pervasives.HTML5.M.attrib list ->
  name:[< `One of int32 ] Eliom_parameters.param_name ->
  int32 select_opt ->
  int32 select_opt list ->
  [> HTML5_types.select ] Eliom_pervasives.HTML5.M.elt

Creates a <select> tag for int32 values.

val int64_select : 
  ?a:HTML5_types.select_attrib Eliom_pervasives.HTML5.M.attrib list ->
  name:[< `One of int64 ] Eliom_parameters.param_name ->
  int64 select_opt ->
  int64 select_opt list ->
  [> HTML5_types.select ] Eliom_pervasives.HTML5.M.elt

Creates a <select> tag for int64 values.

val float_select : 
  ?a:HTML5_types.select_attrib Eliom_pervasives.HTML5.M.attrib list ->
  name:[< `One of float ] Eliom_parameters.param_name ->
  float select_opt ->
  float select_opt list ->
  [> HTML5_types.select ] Eliom_pervasives.HTML5.M.elt

Creates a <select> tag for float values.

val string_select : 
  ?a:HTML5_types.select_attrib Eliom_pervasives.HTML5.M.attrib list ->
  name:[< `One of string ] Eliom_parameters.param_name ->
  string select_opt ->
  string select_opt list ->
  [> HTML5_types.select ] Eliom_pervasives.HTML5.M.elt

Creates a <select> tag for string values.

val user_type_select : 
  ('a -> string) ->
  ?a:HTML5_types.select_attrib Eliom_pervasives.HTML5.M.attrib list ->
  name:[< `One of 'a ] Eliom_parameters.param_name ->
  'a select_opt ->
  'a select_opt list ->
  [> HTML5_types.select ] Eliom_pervasives.HTML5.M.elt

Creates a <select> tag for user type values.

val raw_select : 
  ?a:HTML5_types.select_attrib Eliom_pervasives.HTML5.M.attrib list ->
  name:string ->
  string select_opt ->
  string select_opt list ->
  [> HTML5_types.select ] Eliom_pervasives.HTML5.M.elt

Creates a <select> tag for any (untyped) value.

val int_multiple_select : 
  ?a:HTML5_types.select_attrib Eliom_pervasives.HTML5.M.attrib list ->
  name:[< `Set of int ] Eliom_parameters.param_name ->
  int select_opt ->
  int select_opt list ->
  [> HTML5_types.select ] Eliom_pervasives.HTML5.M.elt

Creates a <select> tag for int values.

val int32_multiple_select : 
  ?a:HTML5_types.select_attrib Eliom_pervasives.HTML5.M.attrib list ->
  name:[< `Set of int32 ] Eliom_parameters.param_name ->
  int32 select_opt ->
  int32 select_opt list ->
  [> HTML5_types.select ] Eliom_pervasives.HTML5.M.elt

Creates a <select> tag for int32 values.

val int64_multiple_select : 
  ?a:HTML5_types.select_attrib Eliom_pervasives.HTML5.M.attrib list ->
  name:[< `Set of int64 ] Eliom_parameters.param_name ->
  int64 select_opt ->
  int64 select_opt list ->
  [> HTML5_types.select ] Eliom_pervasives.HTML5.M.elt

Creates a <select> tag for int64 values.

val float_multiple_select : 
  ?a:HTML5_types.select_attrib Eliom_pervasives.HTML5.M.attrib list ->
  name:[< `Set of float ] Eliom_parameters.param_name ->
  float select_opt ->
  float select_opt list ->
  [> HTML5_types.select ] Eliom_pervasives.HTML5.M.elt

Creates a <select> tag for float values.

val string_multiple_select : 
  ?a:HTML5_types.select_attrib Eliom_pervasives.HTML5.M.attrib list ->
  name:[< `Set of string ] Eliom_parameters.param_name ->
  string select_opt ->
  string select_opt list ->
  [> HTML5_types.select ] Eliom_pervasives.HTML5.M.elt

Creates a <select> tag for string values.

val user_type_multiple_select : 
  ('a -> string) ->
  ?a:HTML5_types.select_attrib Eliom_pervasives.HTML5.M.attrib list ->
  name:[< `Set of 'a ] Eliom_parameters.param_name ->
  'a select_opt ->
  'a select_opt list ->
  [> HTML5_types.select ] Eliom_pervasives.HTML5.M.elt

Creates a <select> tag for user type values.

val raw_multiple_select : 
  ?a:HTML5_types.select_attrib Eliom_pervasives.HTML5.M.attrib list ->
  name:string ->
  string select_opt ->
  string select_opt list ->
  [> HTML5_types.select ] Eliom_pervasives.HTML5.M.elt

Creates a <select> tag for any (untyped) value.