summaryrefslogtreecommitdiff
path: root/lib/htmloutputter.php
diff options
context:
space:
mode:
authorCraig Andrews <candrews@integralblue.com>2009-12-04 20:33:41 -0500
committerCraig Andrews <candrews@integralblue.com>2009-12-04 20:33:41 -0500
commitd41a0a5ed03b2f4bbf8e8b3984960103383090d1 (patch)
tree8a2802ecbd0711090dc7bcd6f94ee64bf21b7949 /lib/htmloutputter.php
parent675e32ac9ac1bdcfbb6e293eb363d2b592140ae7 (diff)
Use inlineScript() instead of element() to write inline javascript
Diffstat (limited to 'lib/htmloutputter.php')
-rw-r--r--lib/htmloutputter.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/htmloutputter.php b/lib/htmloutputter.php
index a88a5b82c..cf93944e7 100644
--- a/lib/htmloutputter.php
+++ b/lib/htmloutputter.php
@@ -477,13 +477,10 @@ class HTMLOutputter extends XMLOutputter
*/
function autofocus($id)
{
- $this->elementStart('script', array('type' => 'text/javascript'));
- $this->raw('/*<![CDATA[*/'.
+ $this->inlineScript(
' $(document).ready(function() {'.
' var el = $("#' . $id . '");'.
' if (el.length) { el.focus(); }'.
- ' });'.
- ' /*]]>*/');
- $this->elementEnd('script');
+ ' });');
}
}