From d41a0a5ed03b2f4bbf8e8b3984960103383090d1 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Fri, 4 Dec 2009 20:33:41 -0500 Subject: Use inlineScript() instead of element() to write inline javascript --- lib/htmloutputter.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'lib/htmloutputter.php') 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('/*inlineScript( ' $(document).ready(function() {'. ' var el = $("#' . $id . '");'. ' if (el.length) { el.focus(); }'. - ' });'. - ' /*]]>*/'); - $this->elementEnd('script'); + ' });'); } } -- cgit v1.2.3-54-g00ecf