You need to sign in to do that
Don't have an account?
Mike @ BlackTab
Run Javascript inside a PageReference
I'm trying to run a javascript function: box.hide(); after the "burns" records are saved. How can I use a PageReference to execute javascript, or is there another way?
public pageReference save(){ insert burns; PageReference back = new PageReference(JAVASCRIPT GOES HERE); back.setRedirect(true); return null; }
Hi,
As you know Javascript is a client side scripting language. So you can't use Javascript inside the controller. So you have to use javascript on your VF page insted of controller.
Thanks, I actually figured it out.
I added an "oncomplete" attribute and insereted the javascript code.