You need to sign in to do that
Don't have an account?
Ram Shiva Kumar
Action function is not working
Hi ,
I have small issue with the action function,i wrote acode in sucha way that i wnat to use the action function in my VF code . But wen i run the VF code iam not seeing the data{'hiiiiiiiiiiiiiiiiiii) which i mentiond in the M1 method in the debug logs\. So i think my method m1 is not beoing called form the Java script and even aim not getting the alert also which i defined in the page. My code is ,
<apex:page controller="bang1">
<script type="text/javascript">
function f1()
{
alert ('Start invoking vf action!');
}
</script>
<apex:form >
<apex:actionFunction name="f1" action="{!m1}" />
<apex:commandButton value="enter" onclick="f1" />
</apex:form>
</apex:page>
Controller:
Public class bang1
{
Public void m1()
{
System.debug('hiiiiiiii');
}
}
Pleasesuggest me.
Regards,
Siva
I have small issue with the action function,i wrote acode in sucha way that i wnat to use the action function in my VF code . But wen i run the VF code iam not seeing the data{'hiiiiiiiiiiiiiiiiiii) which i mentiond in the M1 method in the debug logs\. So i think my method m1 is not beoing called form the Java script and even aim not getting the alert also which i defined in the page. My code is ,
<apex:page controller="bang1">
<script type="text/javascript">
function f1()
{
alert ('Start invoking vf action!');
}
</script>
<apex:form >
<apex:actionFunction name="f1" action="{!m1}" />
<apex:commandButton value="enter" onclick="f1" />
</apex:form>
</apex:page>
Controller:
Public class bang1
{
Public void m1()
{
System.debug('hiiiiiiii');
}
}
Pleasesuggest me.
Regards,
Siva
Please see below updated code.
Hope this helps you!
Please accept my solution as Best Answer if my reply was helpful. It will make it available for other as the proper solution. If you felt I went above and beyond, you can give me kudos.
Thanks and Regards
Sandhya
All Answers
Please see below updated code.
Hope this helps you!
Please accept my solution as Best Answer if my reply was helpful. It will make it available for other as the proper solution. If you felt I went above and beyond, you can give me kudos.
Thanks and Regards
Sandhya
it worked well. but while loading the page alert function is not being called .please suggestr me for this.
Regards,
siva.
You mean you are not getting pop up as
alert ('Start invoking vf action!');
As I am getting in my VF page.
Thanks
Sandhya
yes ,i want to get the pop upwhile page is being loaded.
Regards,
siva