I have tried almost every implementation of this I can think of and have got none to work.

If anyone has a working example I would be very grateful if someone could share so I can see if I'm doing anything wrong