<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:series="http://unfoldingneurons.com/"
> <channel><title>Comments on: Save Web Form Content Using Control +&#160;S</title> <atom:link href="http://davidwalsh.name/control-save/feed" rel="self" type="application/rss+xml" /><link>http://davidwalsh.name/control-save</link> <description>Legendary scribbles about JavaScript, HTML5, AJAX, PHP, CSS, and ∞.</description> <lastBuildDate>Thu, 09 Feb 2012 02:40:12 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3</generator> <item><title>By: MrKenobi</title><link>http://davidwalsh.name/control-save/comment-page-1#comment-13041</link> <dc:creator>MrKenobi</dc:creator> <pubDate>Thu, 29 Oct 2009 01:28:44 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3856#comment-13041</guid> <description>Great Idea, David!
Fantastic Website, i like the Tutorials &amp; Demos.Great job!Best regards, MrKenobi</description> <content:encoded><![CDATA[<p>Great Idea, David!<br
/> Fantastic Website, i like the Tutorials &amp; Demos.</p><p>Great job!</p><p>Best regards, MrKenobi</p> ]]></content:encoded> </item> <item><title>By: David Walsh</title><link>http://davidwalsh.name/control-save/comment-page-1#comment-13036</link> <dc:creator>David Walsh</dc:creator> <pubDate>Wed, 28 Oct 2009 23:14:14 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3856#comment-13036</guid> <description>@Nikolaj:  Great catch!  I&#039;ve updated my demo.</description> <content:encoded><![CDATA[<p>@Nikolaj:  Great catch!  I&#8217;ve updated my demo.</p> ]]></content:encoded> </item> <item><title>By: Nikolaj</title><link>http://davidwalsh.name/control-save/comment-page-1#comment-13035</link> <dc:creator>Nikolaj</dc:creator> <pubDate>Wed, 28 Oct 2009 23:01:25 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3856#comment-13035</guid> <description>David, it looks like it&#039;s the alert-box that causes Firefox to fail.Either get rid of the alert(), or simply put the alert/saving part into a function with delay(1), and it will work as expected :-)Updated code:
[code]
(function($) {
window.addEvent(&#039;domready&#039;,function() {
$(&#039;content-box&#039;).focus();
$(&#039;content-box&#039;).addEvent(&#039;keydown&#039;,function(event) {
if((event.control &#124;&#124; event.meta) &amp;&amp; event.key == &#039;s&#039;) {
event.stop();
(function () {
alert(&#039;Saving Content!&#039;);
//$(&#039;save-button&#039;).fireEvent(&#039;click&#039;);
$(&#039;edit-form&#039;).submit();
}).delay(1);
}
});
});
})(document.id);
[/code]Important: The small delay IS needed in order to make it work as expected!</description> <content:encoded><![CDATA[<p>David, it looks like it&#8217;s the alert-box that causes Firefox to fail.</p><p>Either get rid of the alert(), or simply put the alert/saving part into a function with delay(1), and it will work as expected :-)</p><p>Updated code:<br
/> [code]<br
/> (function($) {<br
/> window.addEvent('domready',function() {<br
/> $('content-box').focus();<br
/> $('content-box').addEvent('keydown',function(event) {<br
/> if((event.control || event.meta) &amp;&amp; event.key == 's') {<br
/> event.stop();<br
/> (function () {<br
/> alert('Saving Content!');<br
/> //$('save-button').fireEvent('click');<br
/> $('edit-form').submit();<br
/> }).delay(1);<br
/> }<br
/> });<br
/> });<br
/> })(document.id);<br
/> [/code]</p><p>Important: The small delay IS needed in order to make it work as expected!</p> ]]></content:encoded> </item> <item><title>By: Ipan Apasia</title><link>http://davidwalsh.name/control-save/comment-page-1#comment-12712</link> <dc:creator>Ipan Apasia</dc:creator> <pubDate>Sat, 17 Oct 2009 09:38:45 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3856#comment-12712</guid> <description>hei david can you write for JQuery...?</description> <content:encoded><![CDATA[<p>hei david can you write for JQuery&#8230;?</p> ]]></content:encoded> </item> <item><title>By: Alexander</title><link>http://davidwalsh.name/control-save/comment-page-1#comment-12691</link> <dc:creator>Alexander</dc:creator> <pubDate>Fri, 16 Oct 2009 04:26:02 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3856#comment-12691</guid> <description>I&#039;ve got about 50 to 100 textareas on my page and a lot of input fields. Is there a way to attach the key down event to the page and not as suggested to every single input element?</description> <content:encoded><![CDATA[<p>I&#8217;ve got about 50 to 100 textareas on my page and a lot of input fields. Is there a way to attach the key down event to the page and not as suggested to every single input element?</p> ]]></content:encoded> </item> <item><title>By: Savageman</title><link>http://davidwalsh.name/control-save/comment-page-1#comment-12689</link> <dc:creator>Savageman</dc:creator> <pubDate>Thu, 15 Oct 2009 22:24:45 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3856#comment-12689</guid> <description>Why not use the brand new Keyboard functionnality from Mootools More?</description> <content:encoded><![CDATA[<p>Why not use the brand new Keyboard functionnality from Mootools More?</p> ]]></content:encoded> </item> <item><title>By: Ben</title><link>http://davidwalsh.name/control-save/comment-page-1#comment-12688</link> <dc:creator>Ben</dc:creator> <pubDate>Thu, 15 Oct 2009 21:21:00 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3856#comment-12688</guid> <description>Alt+S Perhaps, that&#039;s teh way I see it done usually.</description> <content:encoded><![CDATA[<p>Alt+S Perhaps, that&#8217;s teh way I see it done usually.</p> ]]></content:encoded> </item> <item><title>By: Mohammad Rashidi</title><link>http://davidwalsh.name/control-save/comment-page-1#comment-12656</link> <dc:creator>Mohammad Rashidi</dc:creator> <pubDate>Wed, 14 Oct 2009 17:51:22 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3856#comment-12656</guid> <description>@kolin:  Yes, i cameto mention it ;)Good work!
recently i just saw in Hotmail.</description> <content:encoded><![CDATA[<p>@kolin:  Yes, i cameto mention it ;)</p><p>Good work!<br
/> recently i just saw in Hotmail.</p> ]]></content:encoded> </item> <item><title>By: derschreckliche</title><link>http://davidwalsh.name/control-save/comment-page-1#comment-12654</link> <dc:creator>derschreckliche</dc:creator> <pubDate>Wed, 14 Oct 2009 17:29:54 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3856#comment-12654</guid> <description>Thank you very much for this post.
I always wanted to know how to handle keyboard events in mootools and this is an excellent example!</description> <content:encoded><![CDATA[<p>Thank you very much for this post.<br
/> I always wanted to know how to handle keyboard events in mootools and this is an excellent example!</p> ]]></content:encoded> </item> <item><title>By: Adriaan</title><link>http://davidwalsh.name/control-save/comment-page-1#comment-12652</link> <dc:creator>Adriaan</dc:creator> <pubDate>Wed, 14 Oct 2009 15:39:56 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3856#comment-12652</guid> <description>This would be really awesome if you could override firefox&#039;s default behaviour!</description> <content:encoded><![CDATA[<p>This would be really awesome if you could override firefox&#8217;s default behaviour!</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced (User agent is rejected)
Database Caching 1/17 queries in 0.015 seconds using disk: basic
Object Caching 865/866 objects using disk: basic

Served from: davidwalsh.name @ 2012-02-09 00:20:02 -->
