<div class="gmail_quote">On Thu, Apr 12, 2012 at 2:17 AM, Morel Pisum <span dir="ltr">&lt;<a href="mailto:morel.pisum@googlemail.com">morel.pisum@googlemail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hey<br>
<br>
Am 12.04.2012 00:44, schrieb Jeremy Bowers:<br>
<div class="im">&gt; On 04/11/12 16:44, Morel Pisum wrote:<br>
&gt;&gt; Hi.<br>
&gt;&gt;<br>
&gt;&gt; How can I write<br>
&gt;&gt; &lt;body onload=&quot;javascript:document.getElemByID(&#39;q&#39;).focus();&quot;&gt;<br>
&gt;&gt; in BlazeHtml?<br>
&gt;&gt;<br>
&gt;&gt; The problem is that single quotes are always converted to HTML.<br>
&gt;&gt;<br>
&gt;&gt; I&#39;d appreciate a quick response. Thanks in advance.<br>
&gt;&gt;<br>
&gt; While Jasper&#39;s response answered your literal question, I&#39;d add that the<br>
</div>Yes, Jasper solved my quotation-mark-issue.<br>
<div class="im">&gt; reason your code isn&#39;t working isn&#39;t the HTML encoding, which should be<br>
&gt; left alone. The problem is that your event handler shouldn&#39;t have<br>
</div>&gt; &quot;javascript:&quot; in front of it, and the DOM method is &quot;getElem*ent*ById&quot;,<br>
<div class="im">&gt; not getElemById.<br>
&gt;<br>
&gt; Try<br>
&gt;<br>
&gt; document.getElementById(&#39;q&#39;).focus()<br>
&gt;<br>
&gt; which should come out with &amp;apos;, which is fine.<br>
&gt;<br>
</div>In fact, I had this problem, yes. Thank you for your help but I was able<br>
to solve this problem before. Thanks anyway.<br></blockquote><div><br>Also it&#39;d be better to use the autofocus attribute of inputs. Javascript focusing is quirky and not configurable. <br></div></div>