I’m using the following script for a window.onload custom radio button replacement (http://ryanfait.com/resources/custom-checkboxes-and-radio-buttons/custom-form-elements.js) and I need to use a body.onload event to load a cookie:
<body onLoad="getCookie('cookie1')">
Obviously the problem I’m having is the body.onload is blocking the window.onload from running so the radio button replacements aren’t showing up. I’ve seen a lot of “answers” on how to fix body.onload and window.onload interaction, but nothing has worked.
It doesn’t matter which of the two scripts load first, I just need both to load correctly.
Please help.
You could call Custom.init from your body onload event handler, and then remove the last line from the custom-form-elements.js file.