Skip to main content
Post Undeleted by Rudy
Addendum
Source Link
Rudy
  • 133
  • 6

Turned outHmm, I've found that if I needed to add ".value" to the end of the variable assignment, the script works. However, if I move the script to a Static Resource, it no longer works. 

i.e.:

var override_plat = document.getElementById('{!$Component.page1.block1.form1.overr_plat}').value; //works in <script> tags on VF page, but not in Static Resource

Turned out that I needed to add ".value" to the end of the variable assignment. i.e.:

var override_plat = document.getElementById('{!$Component.page1.block1.form1.overr_plat}').value;

Hmm, I've found that if I add ".value" to the end of the variable assignment, the script works. However, if I move the script to a Static Resource, it no longer works. 

i.e.:

var override_plat = document.getElementById('{!$Component.page1.block1.form1.overr_plat}').value; //works in <script> tags on VF page, but not in Static Resource
Post Deleted by Rudy
Source Link
Rudy
  • 133
  • 6

Turned out that I needed to add ".value" to the end of the variable assignment. i.e.:

var override_plat = document.getElementById('{!$Component.page1.block1.form1.overr_plat}').value;