help with body tag

They have: 71 posts

Joined: Oct 2005

anyone know how i can correct this body tag

He has: 1,380 posts

Joined: Feb 2002

What are you trying to do?

Greg K's picture

He has: 2,145 posts

Joined: Nov 2003

You have (I added line breaks for easier reading here):

<body bgcolor="#ffffff" onload="show_clock()" "MM_preloadImages('images/HRC_r2_c2_f2.gif',
'images/HRC_r2_c4_f2.gif', 'images/HRC_r2_c6_f2.gif', 'images/HRC_r2_c8_f2.gif',
'images/HRC_r2_c10_f2.gif', 'images/HRC_r2_c12_f2.gif', 'images/HRC_r2_c14_f2.gif',
'images/HRC_r2_c15_f2.gif');">

The onload only does show_clock() The function MM_preloadImages should be called by onload as well, keep them all within the same quotes, separating the commands with a semicolon like so:

<body bgcolor="#ffffff" onload="show_clock(); MM_preloadImages('images/HRC_r2_c2_f2.gif',
'images/HRC_r2_c4_f2.gif', 'images/HRC_r2_c6_f2.gif', 'images/HRC_r2_c8_f2.gif',
'images/HRC_r2_c10_f2.gif', 'images/HRC_r2_c12_f2.gif', 'images/HRC_r2_c14_f2.gif',
'images/HRC_r2_c15_f2.gif');">

Even better though would be to have onload="pageInit()" and make a javascript fnction called pageInit() that calls all functioned needed at page load. this keeps it more organized IMO.

-Greg

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.