You need to sign in to do that
Don't have an account?
Alo Sen
<apex:pageBlockSectionItem rendered="{!recurrenceTrue}">
<apex:outputLabel >End Date</apex:outputLabel> <apex:inputfield value="{!newEvent.Date__c}" required="true" id="alo" onchange="checkValue2()" />
</apex:pageBlockSectionItem>
input4 is a checkbox and input5 is a date field
<script>
function checkValue2(){ if(jQuery('[id$=alo]').val() != null && jQuery('[id$=alo]').val() != '')
{
jQuery('[id$=input4]').hide();
jQuery('[id$=input5]').hide();
}
</script>
When a new date is chosen in the newEvent.Date__c field it should hide the checkbox(input4) and another datefield(input5).These elements are under separate PageBlockSectionItem.
The funny part is last evening everything was working and this morning this function is not working and I have not changed anything. Is there a way to see in the log if this function got called and executed? Is there a difference in save and quicksave?
I have other jQuery functions in this vf page as well. I have one question regarding this - should i have this under separate script tag?
calling a jQuery function in visual force
<apex:pageBlockSectionItem rendered="{!recurrenceTrue}">
<apex:outputLabel >End Date</apex:outputLabel> <apex:inputfield value="{!newEvent.Date__c}" required="true" id="alo" onchange="checkValue2()" />
</apex:pageBlockSectionItem>
input4 is a checkbox and input5 is a date field
<script>
function checkValue2(){ if(jQuery('[id$=alo]').val() != null && jQuery('[id$=alo]').val() != '')
{
jQuery('[id$=input4]').hide();
jQuery('[id$=input5]').hide();
}
</script>
When a new date is chosen in the newEvent.Date__c field it should hide the checkbox(input4) and another datefield(input5).These elements are under separate PageBlockSectionItem.
The funny part is last evening everything was working and this morning this function is not working and I have not changed anything. Is there a way to see in the log if this function got called and executed? Is there a difference in save and quicksave?
I have other jQuery functions in this vf page as well. I have one question regarding this - should i have this under separate script tag?
You are missing a } at the end.
Hope that helps. If you are using Chrome, you can also debug and use breakpoints with javascript console.
All Answers
You are missing a } at the end.
Hope that helps. If you are using Chrome, you can also debug and use breakpoints with javascript console.
<style>
.dateFormat { display: none; }
</style>
So the question was if this can be achieved inside the jQuery function just for one particular field?