Jump to content

Execute js on pageload


julien59

Recommended Posts

Hi all,

 

On my site, I added a notion of delivery date.

In a FrontController override in my module, in init(), I make a check to see if the delivery is still possible on the same day or, if it is too late, I postpone the delivery to the next day.

I would like to display an alert (or fancybox or lightbox or ...) on pageload, one time only, to warn customer that his delivery date has been changed

I cannot really see how to add javascript from FrontController / init() function. I come from the .net world and would add RegisterStartupScript() in that case, but in php ... I am not that confortable ;-)

Any clue ?

Thanks

 

Julien

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...