You need to sign in to do that
Don't have an account?
inanskar
Representing java script value in Visualforce page
Hi All,
I got an issue that how to represent a javascript variable like the below code myDate in visualforce page
<script language="JavaScript">
var myDate = new Date(document.getElementById("{!r.Invoice_Date__c}").value);
myDate.setMonth( myDate.getMonth() + 1 );
alert(myDate);
Document.write(myDate);
</script>
can u tell the tags for representing the mydate variable in visualforce Page
Thanks in Advance
Hi inanskar,
Do try the following :-
document.getElementById('{!$Component.otherName}').value=myDate.setMonth( myDate.getMonth() + 1 );
You can assign the value to a VF hidden control which you can access in your controller when the page submits.
Hope this helps.