Html body tag modification?

Permabanned
Joined
25 Oct 2004
Posts
9,078
Hiya,

Working on a CMS type site at the moment and one of the JS scripts i want to use requires that the <body> element have an onload function for it to function.

Thing is i cannot add the onload function to it as the <body> element is created by the CMS itself, I only have control of the content between the <body></body> elements.

Is it possible to alter the <body> element through js to add the onload part ?
 
Also, if you are using a framework such as MooTools or jQuery you'll need to use their methods of hooking into the onload event so as to avoid conflicts.
 
Actually run into another problem with javascript.

Using a chained drill down menu script i need to initiate them using

Code:
initListGroup('category_list', document.csv_genfrm.["csvdata[type]"], document.csv_genfrm.["csvdata[compression]"]);

But because of how my form data is stored (php/sql session) and how i process the data using a foreach loop javascript doesnt like the [] around my form input names.

Is there anyway to get around this, i've tried the usual " etc around the data but it wont work.
 
Back
Top Bottom