1 (edited by nickfzx 2007-07-17 20:30)

Topic: javascript question

hey,

I would like to know what this code is for in header.php

// START SUBST - <body>
if (isset($focus_element))
{
    $tpl_main = str_replace('<body onload="', '<body onload="document.getElementById(\''.$focus_element[0].'\').'.$focus_element[1].'.focus();', $tpl_main);
    $tpl_main = str_replace('<body>', '<body onload="document.getElementById(\''.$focus_element[0].'\').'.$focus_element[1].'.focus()">', $tpl_main);
}
// END SUBST - <body>

I can't seem to figure out what it does and it is causing a conflict with a piece of javascript I have included in my header.

It doesn't seem to make any noticeable difference if I remove it.

thanks

Nick

Punbb w/coppermine and wordpress integrated

see my hack to integrate punbb with wordpress comment system.
Illustration Community

Re: javascript question

no worries on this one, I figured it out and is not required for me so I have commented out the corresponding code in post.php and header.php

Punbb w/coppermine and wordpress integrated

see my hack to integrate punbb with wordpress comment system.
Illustration Community