home PYTHONJAVA
 

Ruby CGI method

The following is a rundown of techniques for CGI classes:

serial numbermethod description
1CGI::new([ level="query"])
Create a CGI object. The question can be the accompanying qualities:
  • query: No HTML created output

  • html3: HTML3.2

  • html4: HTML4.0 Strict

  • html4Tr: HTML4.0 Transitional

  • html4Fr: HTML4.0 Frameset

2CGI::escape( str)
Use URL encoding to escape strings
3CGI::unescape( str)
Decodes a string encoded by break().
4CGI::escapeHTML( str)
Encode HTML uncommon characters, including: & < >.
5CGI::unescapeHTML( str)
Decode HTML uncommon characters, including: & < >.
6CGI::escapeElement( str[, element...])
Encode HTML uncommon characters in the predefined HTML component.
7CGI::unescapeElement( str, element[, element...])
Decoding HTML uncommon characters in the predefined HTML component .
8CGI::parse( query)
Parse the question string and return the key containing the hash = "esteem pair."
9CGI::pretty( string[, leader=" "])
Returns a perfect HTML position. On the off chance that leader is indicated, it will be kept in touch with the start of each line. leader defaults to two spaces.
10CGI::rfc1123_date( time)
Format the time as per RFC-1123 (for instance, Tue, 2 Jun 2008 00:00 :00 GMT).

CGI instantiation method

In the accompanying precedent, we dole out the CGI::new item to the c variable. The technique list is as follows:

serial numbermethod description
1c[ name]
restores a cluster containing the estimation of the comparing field named name.
2c.checkbox( name[, value[, check=false]])
C.checkbox( options)

Returns a HTML string that characterizes the checkbox field. The label's properties can be passed as a parameter with a hash work.
3c.checkbox_group( name, value...)
C.checkbox_group( options)

> Returns a HTML string that characterizes the checkbox gathering. The label's properties can be passed as a parameter with a hash work.
4c.file_field( name[, size=20[, max]])
C.file_field( options)

Returns the HTML string that characterizes the record field.
5c.form([ method="post"[, url]]) { ...}
C.form( options)

Returns the HTML string that characterizes the structure. On the off chance that a code square is indicated, it will be yield as the structure content. The label's properties can be passed as a parameter with a hash work.
6c.cookies
Returns a CGI::Cookie object containing the key-esteem matches in the treat.
7c.header([ header])
Returns data about the CGI header. In the event that the header parameter is a hash esteem, its key-esteem pair is utilized to make header data.
8c.hidden( name[, value])
C.hidden( options)

Returns a HTML string that characterizes a concealed field. The label's properties can be passed as a parameter with a hash work.
9c.image_button( url[, name[, alt]])
C.image_button( options)

Returns a HTML string that characterizes a picture catch. The label's properties can be passed as a parameter with a hash work.
10c.keys
Returns a cluster containing the field names of the structure.
11c.key?( name)
C.has_key?( name)
C.include?( name)

Returns genuine if the structure contains the predetermined field name.
12c.multipart_form([ url[, encode]]) { ...}
C.multipart_form( choices) { ...}

Returns a HTML string that characterizes a sight and sound structure (multipart). The label's properties can be passed as a parameter with a hash work.
13c.out([ header]) { ...}
Generate HTML and yield. Utilize the yield of the square to make a string created by the body of the page.
14c.params
Returns a hash containing the structure field name and esteem.
15c.params=hash
Set the field name and incentive to utilize.
16c.password_field( name[, value[, size=40[, max]]])
C.password_field( options)

Returns a HTML string that characterizes a secret word field. The label's properties can be passed as a parameter with a hash work.
17c.popup_menu( name, value...)
C.popup_menu( options)
C.scrolling_list( name, value...)
C.scrolling_list( options)

Returns a HTML string that characterizes a popup menu. The label's properties can be passed as a parameter with a hash work.
18c.radio_button( name[, value[, checked=false]])
C.radio_button( options)

Returns a HTML string that characterizes a radio field. The label's properties can be passed as a parameter with a hash work.
19c.radio_group( name, value...)
C.radio_group( options)

Returns a HTML string that characterizes a radio catch gathering. The label's properties can be passed as a parameter with a hash work.
20c.reset( name[, value])
C.reset( options)

Returns a HTML string that characterizes a reset catch. The label's properties can be passed as a parameter with a hash function
21c.text_field( name[, value[, size=40[, max]]])
C.text_field( options)

Returns a HTML string that characterizes a content field. The label's properties can be passed as a parameter with a hash work.
22c.textarea( name[, cols=70[, rows=10]]) { ...}
C.textarea( alternatives) { ...}

Returns a HTML string that characterizes a textarea field. In the event that a square is determined, the string yield by the code square will be the substance of the textarea. The label's properties can be passed as a parameter with a hash work.






welookups is optimized for learning.© welookups. 2018 - 2019 All Right Reserved and you agree to have read and accepted our term and condition.