You need to sign in to do that
Don't have an account?
Nikunj V
command button not excuting function
hello,
commandbutton with action function isn't working for punch in on line 32, but same kind of functionality is working on line 43. can anyone point out what is wrong?
commandbutton with action function isn't working for punch in on line 32, but same kind of functionality is working on line 43. can anyone point out what is wrong?
<apex:page standardController="Project__c" sidebar="false" showHeader="true" extensions="ProjectTime_Controller"> <apex:includeScript value="{!$Resource.modernizr}"/> <script> function doTheGeoThang() { if (Modernizr.geolocation){ navigator.geolocation.getCurrentPosition( function(position) { findMe2(position.coords.latitude,position.coords.longitude); } ); } else { alert ("Your browser isn't hit. Upgrade man!"); } } function doTheGeoThang3() { if (Modernizr.geolocation){ navigator.geolocation.getCurrentPosition( function(position) { findMe3(position.coords.latitude,position.coords.longitude); } ); } else { alert ("Your browser isn't hit. Upgrade man!"); } } </script> <apex:form > <apex:pageBlock ><apex:pageblockSection > <apex:commandButton value="Punch In" onclick="doTheGeoThang();"/><br/><br/> <apex:actionFunction name="findMe2" action="{!PunchIn}" rerender="jsvalues"> <apex:param name="lat" value="" assignTo="{!valueLat}"/> <apex:param name="long" value="" assignTo="{!valueLong}"/> </apex:actionFunction></apex:pageblockSection> </apex:pageBlock></apex:form> <apex:form ><apex:actionRegion > <b><span style="cursor: pointer;" onclick="doTheGeoThang3()"> <center>Punch Out</center> </span> </b><br/><br/> <apex:actionFunction name="findMe3" action="{!PunchOut}" rerender="jsvalues"> <apex:param name="lat" value="" assignTo="{!valueLat}"/> <apex:param name="long" value="" assignTo="{!valueLong}"/> </apex:actionFunction></apex:actionRegion> </apex:form> </apex:page>
https://developer.salesforce.com/forums/ForumsMain?id=906F0000000BMViIAO
i want to try command button instead of normal text.
i also tried.l actionregion. it isnt working.
Thanks
Please try to add reRender in Command Button at line number 32
Thanks
Amit Chaudhary