I want to access a custom field of my administrator profile in a Visualforce page which has a standard controller i.e. "Company__c". I want to access the custom field in javascript portion of that visualforce page. How can I do this?
my example Code is :
<apex:page standardController="Company__c" extensions="CompaniesHouseExtension"
showHeader="true" sidebar="true">
<script>
var myOpenWindow = function() {
var URL = "";
var data_server = "{!Data_Service_Provider__c}";
if (data_server == "Website1.com"){
URL = "/apex/Website1";
}else if (data_server == "Website2.com"){
URL = "/apex/Website2";
}
var myOpenedWindow = myOpenedWindow || window.open(URL);
myOpenedWindow.location.href= URL;
myOpenedWindow.focus();
}
</script>
<apex:page>
Here I have a picklist saved in my profile. Here I select a value , then according to the selection, I want to get data from a website. Now I want the selection in javascript code written above.. I want to assign the selected value from profile to Variable "data_server" and want to make condition as above.
By using this method, I am getting error:
"Previous load of class failed: Class3: line 24, column 54: Constructor not defined: [Class1].<Constructor>()" etc....
How can I solve this?