[thelist] The best way to load very little javascript.

Chris Price chris.price at choctaw.co.uk
Fri Jun 15 11:07:54 CDT 2007


Jon Hughes wrote:
> I don't want to have <body onload="..."> - I don't mind adding the tag
> with javascript, but I don't know how I would init that javascript
> either...
>   
You don't need a 'body onload..' you can do it in the javascript

Something like:

window.onload = initVisibility
function initVisibility() { define function }

If the element has an id you can target it with 
document.getElementById('id')
or for a tag, document.getElementsByTagName('tag')[n]

Kind Regards
-- 
Chris Price

Choctaw

chris.price at choctaw.co.uk
http://www.choctaw.co.uk

Tel. 01524 825 245
Mob. 0777 451 4488

Beauty is in the Eye of the Beholder
while Excellence is in the Hand of the Professional

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-+- Sent on behalf of Choctaw Media Ltd -+-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Choctaw Media Limited is a company
registered in England and Wales
with company number 04627649

Registered Office:
Lonsdale Partners,
Priory Close,
St Mary's Gate,
Lancaster LA1 1XB
United Kingdom





More information about the thelist mailing list