You need to sign in to do that
Don't have an account?
jthor@entransform.com
listen to visual force page
Is there a way for a visual force page to execute something when it is called via page reference in the controller?
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
Is there a way for a visual force page to execute something when it is called via page reference in the controller?
Give it a try or let me know if you are looking after to some specific action to be performed.
Thanks,
apexpages.currentpage().getparameters().get("some parameter");
we have something in the visual force page that listens to this event and does something.
If you want to display or use the parameter value for some logic on visualforce page itself then probably you should use the following syntax
"{!$CurrentPage.parameters.Paramtervalue}" to get the parameter value of page and do logic accordingly.
if you want to do some processing in apex class (vf page contoller) then you can use the syntax you mentioned above.
Thnx, but that not what I am looking for. I wanted to make a listener in my visual force page so that when the page is called by the controller it execute a javascript function in the visualforce page. Sorry I know my question is not that clear.
You can use the same syntax in javascript as well. For example:
<script>
if("{!$CurrentPage.parameters.Paramtervalue}" == "ABC") {
//call action/javascript method here
}
</script>
Just to be clear the code excute when ever the parameter value changes right?
That means that someFunction() is executed whenever the parameter values == "ABC"
If you want to put some more logic then you can use nested if else statements to compare different parameter values and execute functions accordingly.
Regards,
-P
Thank you. Once I get it working I will select the post as working.
I mean acccept as solution.
Thanks,
P