-
(string) array_or_string_for_javascript ()
Browse code
converts the given PHP array or string to the corresponding javascript array or string.
javascript strings need to be single quoted.
returns javascript string or array equivalent
-
(string) boolean_for_javascript ()
Browse code
converts the given PHP boolean to the corresponding javascript boolean.
booleans need to be true or false (php would print 1 or nothing).
returns javascript boolean equivalent
-
Returns a button that will trigger a javascript function using the
onclick handler and return false after the fact.
Examples:
-
Mark the end of a block that should only be shown in the browser if JavaScript
is switched on.
-
-
Mark the start of a block that should only be shown in the browser if JavaScript
is switched on.
-
javascript_cdata_section ()
Browse code
-
Returns a JavaScript tag with the '$content' inside. If no content is passed, it works as the slot() method and will output everythin between
javascript_tag() and end_javascript_tag(),
Example:
=>
alert('All is good')
-
Returns a link that will trigger a javascript function using the
onclick handler and return false after the fact.
Examples:
'Really?')) ?>
-
(string) options_for_javascript ()
Browse code
converts the the PHP options array into a javscript array
returns javascript arry equivalent