UPDATE 2: Still a lot of visitors come to my site, so I decided to update the code to a newer one which works as of November 2011. It’s worth to mention that executing Javascript directly in the URL field is not supported for all browsers. It should work in Google Chrome, there is now even an extension for this feature called Facebook Super Select All. Thanks for the contribution in the comments!

UPDATE 1: After this post was originally written, Facebook came up with a solution to create lists of friends. You can create several lists, based on your own personal criterias, and add your friends to different lists, which you then can send event or page invitations to. I would rather recommend using this solution provided by Facebook, so that you don’t send information which might not apply to all of your friends.
To create a list, go to your Account settings, choose Edit Friends and Create new list. After you’ve created new lists you have an option to filter friends based on list names when you’re inviting friends to events or pages.

The newly redesigned Facebook has led inviting members to an event/group/page to an even more complex process. Why can’t they just make a “select all” button? Initially I got tired of clicking several hundred times on all the pictures to invite people to my event, so I came up with this small piece of Javascript:

Go to your event/group/page, click invite people and then paste this snippet in the URL field of your browser.
Left-click the mouse in the URL field and hit Enter. Your invitations will not be sent yet, but all your friends will be selected. Click the “Invite” or “Send” button on the Facebook page to finally send the invites.

urljs

Soi! Done in one go :-)