PHP Wizards

From: Peter (BOUGHTONP)26 Apr 2011 16:13
To: Ken (SHIELDSIT) 100 of 101
YesNoMaybe. :P

What do you mean by "if they forget or something" - should the generated report always be added to the monthly report?

If so, just do it without asking them.

If not, under what conditions should it be added?

If those conditions can be determined in advance, make it a selection they do before even running the report.

(i.e. in general, give options to the user up-front, rather than bugging them with alerts after the fact.)

Anyway, for the functionality, it's main JavaScript you want (which is entirely different to Java, despite the similar names), though probably want a bit of CF too.

For closing the browser, the best you've got is the onunload JS event for the body, which will fire on more than just closing, but you can't avoid that.

For detecting back button, you'll want to set some flag on each request (e.g. a cookie), and then use JavaScript to call a webservice to check if that value is the latest one or an old one.

Not sure if that's explained very well, but don't have time for better right now... try googling it and someone might have an existing chunk of code you can use.
From: Ken (SHIELDSIT)26 Apr 2011 16:16
To: Peter (BOUGHTONP) 101 of 101
Good point. I think I will have it do it without asking if it isn't already in the database.