I have setup jgrowl and everything seems to working correctly. I currently have to press a button to trigger the message to appear in the top right side of the screen like this:
<input type="button" onclick="$.jGrowl('Your transaction has been processed', { life: 10000 });" href="javascript:void(0);" value="Default"/>
What i want is for the jgrowl message to now pop-up automatically when i redirect in my controller:
def ch_sum_total
#....some processing stuff code....
respond_to do |format|
format.html { redirect_to(:back) }
format.js {}
end
end
How can i do this?