2

I want to trigger a javascript function (an Ajax Post save function) when someone presses ctrl + s.

But only when they editing a specific textarea (with a unique ID)

So if they aren't "focused" on the text area Ctrl+s should behave like default.

Talon
  • 4,937
  • 10
  • 43
  • 57

1 Answers1

1

A couple of similar questions:

I bet that first one will get you well on your way to coming up with a solution. Just replace $(window) in the sample code in the accept answer with $('#yourtextareaid').

Community
  • 1
  • 1
Cᴏʀʏ
  • 105,112
  • 20
  • 162
  • 194
  • Yeah you're right, I thought I saw similar code to that before and it didn't work the other time. But it works now. – Talon Sep 06 '11 at 22:02