I have a Visualforce page which shows an error:

Uncaught TypeError: Cannot set property 'value' of null
at submitToSalesforce (main.js:55)

But when I update the visualforce page it does not update main.js. I am not sure how main.js is generated. One strange thing happening is that it seems to be pulling most of it's code from a separate Visualforce page than the one that's loaded. Another note that might be relevant is that handlebar.js is used on the page. Finally, this is a public facing visualforce page. I have a tool installed which shows a different color on chrome tabs for different orgs you are logged into. And the org in which i'm editing the visualforce page is a different color than when I view the page. I think it may have to do with it being a public facing visualforce page. I'm not sure how i can access the code for that page. I did see that it is a custom url in the 'site detail' section.

How is main.js generated?


1 Answer 1


Just a thought - it is possible that you have added some sort of incompatible JS library or plugin which "masks" methods or global variables with the same name that are auto-added by Visualforce as part of its normal operation. As a result, when Visualforce tries to do normal things, it errors out as seen above.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .