You need to sign in to do that
Don't have an account?
T_BE
javascript onload in body tag is not working in visualforce page, running in different containers?
Hello,
I want to call a function in the body tag (onload = ""). So I wrote the following visualforce page. But the alert is not opening.
<apex:page showHeader="true"> <head> </head> <body onload="alert('asd');"> </body> </apex:page>
If i change the showHeader = "false" then the code is working.
What are the differences between this two codes? They are running in different containers???
<apex:page showHeader="false"> <head> </head> <body onload="alert('asd');"> </body> </apex:page>
Hi
I think when you write showHeader = "false" then some inbuilt java script library is loaded, that's why alert is showing .
If you want to show alert by writing showHeader = "true" then you need to write in this way...
Did this post answers your question, please accept as solutions and also don't forget to hit kudos button If this post really helps you.
Thanks