<div class="gmail_quote">On Thu, Apr 12, 2012 at 2:17 AM, Morel Pisum <span dir="ltr"><<a href="mailto:morel.pisum@googlemail.com">morel.pisum@googlemail.com</a>></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">> On 04/11/12 16:44, Morel Pisum wrote:<br>
>> Hi.<br>
>><br>
>> How can I write<br>
>> <body onload="javascript:document.getElemByID('q').focus();"><br>
>> in BlazeHtml?<br>
>><br>
>> The problem is that single quotes are always converted to HTML.<br>
>><br>
>> I'd appreciate a quick response. Thanks in advance.<br>
>><br>
> While Jasper's response answered your literal question, I'd add that the<br>
</div>Yes, Jasper solved my quotation-mark-issue.<br>
<div class="im">> reason your code isn't working isn't the HTML encoding, which should be<br>
> left alone. The problem is that your event handler shouldn't have<br>
</div>> "javascript:" in front of it, and the DOM method is "getElem*ent*ById",<br>
<div class="im">> not getElemById.<br>
><br>
> Try<br>
><br>
> document.getElementById('q').focus()<br>
><br>
> which should come out with &apos;, which is fine.<br>
><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'd be better to use the autofocus attribute of inputs. Javascript focusing is quirky and not configurable. <br></div></div>