cubicweb.htmlhelpers.js — CubicWeb 3.10.1

### Navigation

- index
- modules |
- next |
- previous |
- CubicWeb 3.10.1 »
- Web side development »
- Javascript »
- <no title> »

# cubicweb.htmlhelpers.js

`cubicweb.htmlhelpers.js.` `baseuri`()

returns the document’s baseURI. (baseuri() uses document.baseURI if available and inspects the <base> tag manually otherwise.)

`cubicweb.htmlhelpers.js.` `setProgressCursor`()

set body’s cursor to ‘progress’

`cubicweb.htmlhelpers.js.` `resetCursor`(result)

reset body’s cursor to default (mouse cursor). The main purpose of this function is to be used as a callback in the deferreds’ callbacks chain.

`cubicweb.htmlhelpers.js.` `asURL`(props)

builds an url from an object (used as a dictionnary)

    >>> asURL({'rql' : "RQL", 'x': [1, 2], 'itemvid' : "oneline"})
    rql=RQL&vid=list&itemvid=oneline&x=1&x=2
    >>> asURL({'rql' : "a&b", 'x': [1, 2], 'itemvid' : "oneline"})
    rql=a%26b&x=1&x=2&itemvid=oneline

`cubicweb.htmlhelpers.js.` `firstSelected`(selectNode)

return selected value of a combo box if any

`cubicweb.htmlhelpers.js.` `toggleVisibility`(elemId)

toggle visibility of an element by its id

`cubicweb.htmlhelpers.js.` `popupLoginBox`()

toggles visibility of login popup div

returns the list of elements in the document matching the tag name and the properties provided

- tagName, the tag’s name
- properties, a js Object used as a dict

Return an iterator (if a real array is needed, you can use the
  list() function)

`cubicweb.htmlhelpers.js.` `setCheckboxesState`(nameprefix, value, checked)

sets checked/unchecked status of checkboxes

`cubicweb.htmlhelpers.js.` `html2dom`(source)

this function is a hack to build a dom node from html source

### Navigation

- index
- modules |
- next |
- previous |
- CubicWeb 3.10.1 »
- Web side development »
- Javascript »
- <no title> »