Hi all,

I want to know is it possible if I want to create a JavaScript function that when user choose menu to print a web page from the browser (not from a print button that is created) and at the same time get that print date and update to the database using PHP?
And if it is possible, how to create that function?

Please kindly give some advice because I am a newbie in web development.

Thank you

what menu ? a navigation menu or print options menu ? what kind of menu ?

what menu ? a navigation menu or print options menu ? what kind of menu ?

Print menu that is chosen from File menu.

do you mean a select menu where you choose a page to print?

do you mean a select menu where you choose a page to print?

You know, the browser have some menu on top of page, such as: File, Edit, View, etc.
If you click File, you will find Print (Ctrl + P). That's the Print menu I refer to.

oh i see, well there is onbeforeprint() and onafterprint()
but the only work with IE

Thank you for your help. But how to make it possible in Firefox? Cause many users now use Firefox and IE, so I have to make the application work on both of them.

i'm afraid it's not possible at the moment :(

whether it is possible to remove URL while printing webpage using javascript...but not manually changing the settings in browser

I think I saw Firefox supporting them [events] too.