I am using javaScript in Visualforce page to set the value of String variable. How can I pass this updated value to the controler?
function saveFunctionality()
{ document.getElementById('VWValveSearch:VWSiteTemplate:frm1:pressureClass').value = 'Please have this value';
validateSaveInputFields();
}
<apex:actionFunction id="validateSaveInputFields" name="validateSaveInputFields" action="{!btnAddToProject}" reRender="dummy" > </apex:actionFunction>
</apex:form>
<apex:actionFunction id="validateSaveInputFields" name="validateSaveInputFields" action="{!btnAddToProject}" reRender="dummy" >
</apex:actionFunction>
The reason why I am using javascript is because the strPressureClass is a string variable and when I click on save button. Sometimes it has value or sometime it has Null value.