Is that a JS error? If so, then the whole JSF code and story is a bit irrelevant now.
As JS runs entirely at the client side, you need investigate the generated HTML/CSS/JS/whateverClientSide output, determine the root cause, trackback it to the JSF component in the server side and fix it accordingly.
It is hard to help you without knowing the details. Your questions and statements are way too general and high-level.
What piece of JS code caused the error?
What piece of JSF code generated the JS code?
What JSF implementation/version are you using? If I recall correctly, there was some JS bug related to document.forms in Safari fixed around Mojarra 1.2_08. Getting the latest Mojarra version may solve this problem.
Fergus Tam wrote:The error comes from this js code
Is that own code or code from a JSF component? If own, just fix it accordingly. If from a component, report a bug to the boys behind the component. I have never seen the "bns-h" component library, so I can't tell much about them.
Please do not shoot the fish in this barrel. But you can shoot at this tiny ad:
a bit of art, as a gift, the permaculture playing cards