Bill Moseley wrote:
> 
> At 10:47 AM 03/05/02 +0800, Stas Bekman wrote:
> >> Ok, I'll grab it from google later tonight when I get some time.
> >
> >Thanks
> 
> Well, this seems to work in tmpl/custom/html/head
> 
> <body background="[% doc.dir.abs_doc_root %]/images/bgline.gif"
> bgcolor="#ffffff" onLoad="document.forms[0].elements[0].focus()">
> 
> I poked around a bit at Javascript sites and found out the real danger with
> Javascript -- all the Javascript sites have those damn pop-up ads.


first of all i dont think we should use js _at all_.

a) with all the absolute positioned divs we are going to
spend a lot of time to satisfy ns4 (others?)

b) why bother? yes we gain slightly on userbility, but what
if i hit enter and i am focused?


_if_ we want this functionality we should use a syntax like this:
onLoad="document.form_name.query.focus()"

if we add other forms or elemnts later we dont know
beforehand the index [0,1,2 etc].
besides that is more readable for humans maintaing the code :-)

 
> Also, I was wondering why the <form> tag is in the "page" template instead
> of just wrapped around the form in the "search" template?  And then </form>
> is in navbar_local_top.  Why the separation of tags in different templates?

that happened because of the "width" or rather "height" that
the form tag and hidden tags consume, so we ended up we a
"lot" of un-necesary whitespace.
for the above js-code to work we need to put the <form> tag
just next to the body start and end tags i think (ns4+) plus
replace some other stuff or position divs relative blah blah
endless blah ...:)

so i am +1 for skipping all this js

./allan who think a "js-clean" site is simply too cool.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to