You need to sign in to do that
Don't have an account?

Help Text Image disabled if window.onload = setFocus
Hello, If I put:
But if I delete
It works.
Any idea why?
And will it affect my code if I delete this image?
I'm using this function because I have a radio button that if the answer is yes it will show more radio buttons, and they are down the page so I don't want the page to be reloaded to the top so I set focus to a button that is on the bottom.
<script type="text/javascript"> window.onload = setFocus function setFocus() { if({!reloadDown}) { document.getElementById('{!$Component.buttons.sabr}').scrollIntoView(); } } </script>The image of the help text is disabled, if I hover the mouse over it, it does nothing.
But if I delete
window.onload = setFocus
It works.
Any idea why?
And will it affect my code if I delete this image?
I'm using this function because I have a radio button that if the answer is yes it will show more radio buttons, and they are down the page so I don't want the page to be reloaded to the top so I set focus to a button that is on the bottom.
Then I have a boolean call reloadDown on my Controller that is set to false in the constructor and turned into true if a Radio Button is selected to 'Yes' or 'No'
This call on my Visualforce page:
That function set the boolean to true.