Submit button, (Ctrl+S)

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
phice
Moderator
Posts: 1416
Joined: Sat Apr 20, 2002 3:14 pm
Location: Dallas, TX
Contact:

Submit button, (Ctrl+S)

Post by phice »

I'm looking for a small command inside the <input tag that will allow the user to do a simple Ctrl+S to save the contents of a textarea. I've seen it done numorous times, so I'm pretty sure it's able to be done.
Image Image
User avatar
phice
Moderator
Posts: 1416
Joined: Sat Apr 20, 2002 3:14 pm
Location: Dallas, TX
Contact:

Post by phice »

Figured it out on php.net's website. :D

Code: Select all

<input type="submit" accesskey="s">
Image Image
User avatar
m3mn0n
PHP Evangelist
Posts: 3548
Joined: Tue Aug 13, 2002 3:35 pm
Location: Calgary, Canada

Post by m3mn0n »

wow that's sweet, never heard of that one before. 8)
User avatar
phice
Moderator
Posts: 1416
Joined: Sat Apr 20, 2002 3:14 pm
Location: Dallas, TX
Contact:

Post by phice »

Forgot to mention that it uses Alt+S, not Ctrl+S.
Image Image
Post Reply