<?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/"
> <channel><title>Comments on: Next Version of Impromptu Suggestions</title> <atom:link href="http://trentrichardson.com/2009/06/03/next-version-of-impromptu-suggestions/feed/" rel="self" type="application/rss+xml" /><link>http://trentrichardson.com/2009/06/03/next-version-of-impromptu-suggestions/</link> <description>practical web design &#38; development</description> <lastBuildDate>Fri, 18 May 2012 18:53:09 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <item><title>By: steve</title><link>http://trentrichardson.com/2009/06/03/next-version-of-impromptu-suggestions/comment-page-1/#comment-13537</link> <dc:creator>steve</dc:creator> <pubDate>Tue, 24 Nov 2009 20:58:49 +0000</pubDate> <guid
isPermaLink="false">http://trentrichardson.com/?p=349#comment-13537</guid> <description>Thanks Trent, works like a charm! I wondered if it had something to do with the &#039;state&#039; but wasn&#039;t sure. really great plugin, thanks :)</description> <content:encoded><![CDATA[<p>Thanks Trent, works like a charm! I wondered if it had something to do with the &#8216;state&#8217; but wasn&#8217;t sure. really great plugin, thanks :)</p> ]]></content:encoded> </item> <item><title>By: trent</title><link>http://trentrichardson.com/2009/06/03/next-version-of-impromptu-suggestions/comment-page-1/#comment-13531</link> <dc:creator>trent</dc:creator> <pubDate>Tue, 24 Nov 2009 13:37:53 +0000</pubDate> <guid
isPermaLink="false">http://trentrichardson.com/?p=349#comment-13531</guid> <description>Hey steve,the callback function is sort of an overall option, not a &#039;per state&#039; option since it is called once the prompt is closed no matter what state it was on.  Try this:$.prompt(frame, { callback: mycallbackform });</description> <content:encoded><![CDATA[<p>Hey steve,</p><p>the callback function is sort of an overall option, not a &#8216;per state&#8217; option since it is called once the prompt is closed no matter what state it was on.  Try this:</p><p>$.prompt(frame, { callback: mycallbackform });</p> ]]></content:encoded> </item> <item><title>By: steve</title><link>http://trentrichardson.com/2009/06/03/next-version-of-impromptu-suggestions/comment-page-1/#comment-13526</link> <dc:creator>steve</dc:creator> <pubDate>Tue, 24 Nov 2009 05:05:44 +0000</pubDate> <guid
isPermaLink="false">http://trentrichardson.com/?p=349#comment-13526</guid> <description>Hi Trent, thanks for this great plugin. I&#039;m having a bit of difficulty implemting a callback tho and hoped you might be able to point me in the right direction. Here is a code snippet -var frame = {
state0: {
html: &#039;&#039;,
buttons: { Cancel: false, Save: true },
focus: 1,
submit: function(v, m, f) { return true; },
callback: mycallbackform
}
};function mycallbackform(v, m, f) {
$.prompt(&#039; i clicked &#039; + v);
}As you can see the callback code is from your example, I&#039;m just trying to get the callback to work for now but with no luck. I know I&#039;m missing something, any suggestion?TIA
Steve</description> <content:encoded><![CDATA[<p>Hi Trent, thanks for this great plugin. I&#8217;m having a bit of difficulty implemting a callback tho and hoped you might be able to point me in the right direction. Here is a code snippet -</p><p>var frame = {<br
/> state0: {<br
/> html: &#8221;,<br
/> buttons: { Cancel: false, Save: true },<br
/> focus: 1,<br
/> submit: function(v, m, f) { return true; },<br
/> callback: mycallbackform<br
/> }<br
/> };</p><p>function mycallbackform(v, m, f) {<br
/> $.prompt(&#8216; i clicked &#8216; + v);<br
/> }</p><p>As you can see the callback code is from your example, I&#8217;m just trying to get the callback to work for now but with no luck. I know I&#8217;m missing something, any suggestion?</p><p>TIA<br
/> Steve</p> ]]></content:encoded> </item> <item><title>By: Jason DiMeo</title><link>http://trentrichardson.com/2009/06/03/next-version-of-impromptu-suggestions/comment-page-1/#comment-12835</link> <dc:creator>Jason DiMeo</dc:creator> <pubDate>Tue, 06 Oct 2009 16:20:06 +0000</pubDate> <guid
isPermaLink="false">http://trentrichardson.com/?p=349#comment-12835</guid> <description>Thanks for the advice Trent!That&#039;s pretty much what I figured I would have to do to get around the issue. Not really an issue, just need to re-work my logic. Instead of using the $(document).submit() event, I simply have a custom function I use to handle the submit if the form validates.Thanks again for your time.
J</description> <content:encoded><![CDATA[<p>Thanks for the advice Trent!</p><p>That&#8217;s pretty much what I figured I would have to do to get around the issue. Not really an issue, just need to re-work my logic. Instead of using the $(document).submit() event, I simply have a custom function I use to handle the submit if the form validates.</p><p>Thanks again for your time.<br
/> J</p> ]]></content:encoded> </item> <item><title>By: trent</title><link>http://trentrichardson.com/2009/06/03/next-version-of-impromptu-suggestions/comment-page-1/#comment-12819</link> <dc:creator>trent</dc:creator> <pubDate>Mon, 05 Oct 2009 17:33:31 +0000</pubDate> <guid
isPermaLink="false">http://trentrichardson.com/?p=349#comment-12819</guid> <description>Hey Jason,Because there is no way to stop javascript execution other than a native alert or confirm, you will not be able to successfully return a value like this.  You will have to use the callbacks to complete your logic, or simply call a function passing it the value of the button clicked.Another way to accomplish your confirm before submitting the form is to return false on the click event for the submit button(no matter what..), but then open up the confirm box and if Ok is clicked do something like:$(&#039;#myForm&#039;).submit();</description> <content:encoded><![CDATA[<p>Hey Jason,</p><p>Because there is no way to stop javascript execution other than a native alert or confirm, you will not be able to successfully return a value like this.  You will have to use the callbacks to complete your logic, or simply call a function passing it the value of the button clicked.</p><p>Another way to accomplish your confirm before submitting the form is to return false on the click event for the submit button(no matter what..), but then open up the confirm box and if Ok is clicked do something like:</p><p>$(&#8216;#myForm&#8217;).submit();</p> ]]></content:encoded> </item> <item><title>By: Jason DiMeo</title><link>http://trentrichardson.com/2009/06/03/next-version-of-impromptu-suggestions/comment-page-1/#comment-12805</link> <dc:creator>Jason DiMeo</dc:creator> <pubDate>Sun, 04 Oct 2009 16:14:11 +0000</pubDate> <guid
isPermaLink="false">http://trentrichardson.com/?p=349#comment-12805</guid> <description>Hello,First off, I love the plug-in. Excellent work!I have 1 small problem I am trying to figure out.
I have a form that when submitted, I use impromptu to ask the user a question. At that point, the user has the opportunity to cancel their submit or click ok to continue. Since impromptu returns the object instead of the value of the button the user clicked, I have no way to pass the value back to the form.If the submit button has already been clicked, how can I return the value to the calling function ($(document).submit())? Any ideas?$(document).submit(function() {
var validForm = false;
var confirmMsg = &#039;some msg&#039;;
// validation codeif (validForm) {
$.prompt(confirmMsg, {
buttons: {Ok: true, Cancel: false},
callback: function(val) {
// want to return the value back to continue or cancel submit
return val;
}
});
}
});</description> <content:encoded><![CDATA[<p>Hello,</p><p>First off, I love the plug-in. Excellent work!</p><p>I have 1 small problem I am trying to figure out.<br
/> I have a form that when submitted, I use impromptu to ask the user a question. At that point, the user has the opportunity to cancel their submit or click ok to continue. Since impromptu returns the object instead of the value of the button the user clicked, I have no way to pass the value back to the form.</p><p>If the submit button has already been clicked, how can I return the value to the calling function ($(document).submit())? Any ideas?</p><p>$(document).submit(function() {<br
/> var validForm = false;<br
/> var confirmMsg = &#8216;some msg&#8217;;<br
/> // validation code</p><p> if (validForm) {<br
/> $.prompt(confirmMsg, {<br
/> buttons: {Ok: true, Cancel: false},<br
/> callback: function(val) {<br
/> // want to return the value back to continue or cancel submit<br
/> return val;<br
/> }<br
/> });<br
/> }<br
/> });</p> ]]></content:encoded> </item> <item><title>By: trent</title><link>http://trentrichardson.com/2009/06/03/next-version-of-impromptu-suggestions/comment-page-1/#comment-12114</link> <dc:creator>trent</dc:creator> <pubDate>Fri, 07 Aug 2009 18:34:24 +0000</pubDate> <guid
isPermaLink="false">http://trentrichardson.com/?p=349#comment-12114</guid> <description>Hey Richard,You can have spaces in the name.  You will need to do it like so:var mybtns = {};
mybtns[&#039;bla bla&#039;] = true;
mybtns[&#039;more text&#039;] = true;$.prompt(&#039;my text here, { buttons: mybtns });Hope that helps!</description> <content:encoded><![CDATA[<p>Hey Richard,</p><p>You can have spaces in the name.  You will need to do it like so:</p><p>var mybtns = {};<br
/> mybtns['bla bla'] = true;<br
/> mybtns['more text'] = true;</p><p>$.prompt(&#8216;my text here, { buttons: mybtns });</p><p>Hope that helps!</p> ]]></content:encoded> </item> <item><title>By: Richard Chamorro</title><link>http://trentrichardson.com/2009/06/03/next-version-of-impromptu-suggestions/comment-page-1/#comment-12112</link> <dc:creator>Richard Chamorro</dc:creator> <pubDate>Fri, 07 Aug 2009 18:15:18 +0000</pubDate> <guid
isPermaLink="false">http://trentrichardson.com/?p=349#comment-12112</guid> <description>Hello,How do can I have a button with spaces in it&#039;s name? That would be a great improvement for me.I would like to do something like this:var okText = &quot;Very good!&quot;;
var cancelText = &quot;Not bad&quot;;$.prompt(&quot;Your ranking?&quot;, { buttons: { okText: 1, cancelText: 0 }});That doesn&#039;t work...</description> <content:encoded><![CDATA[<p>Hello,</p><p>How do can I have a button with spaces in it&#8217;s name? That would be a great improvement for me.</p><p>I would like to do something like this:</p><p>var okText = &#8220;Very good!&#8221;;<br
/> var cancelText = &#8220;Not bad&#8221;;</p><p>$.prompt(&#8220;Your ranking?&#8221;, { buttons: { okText: 1, cancelText: 0 }});</p><p>That doesn&#8217;t work&#8230;</p> ]]></content:encoded> </item> <item><title>By: Sercan Virlan</title><link>http://trentrichardson.com/2009/06/03/next-version-of-impromptu-suggestions/comment-page-1/#comment-11347</link> <dc:creator>Sercan Virlan</dc:creator> <pubDate>Fri, 19 Jun 2009 08:29:24 +0000</pubDate> <guid
isPermaLink="false">http://trentrichardson.com/?p=349#comment-11347</guid> <description>@trenti solved my problem thanksautomatically closing is very nice so</description> <content:encoded><![CDATA[<p>@trent</p><p>i solved my problem thanks</p><p>automatically closing is very nice so</p> ]]></content:encoded> </item> <item><title>By: Zsolt</title><link>http://trentrichardson.com/2009/06/03/next-version-of-impromptu-suggestions/comment-page-1/#comment-11293</link> <dc:creator>Zsolt</dc:creator> <pubDate>Tue, 16 Jun 2009 18:04:17 +0000</pubDate> <guid
isPermaLink="false">http://trentrichardson.com/?p=349#comment-11293</guid> <description>Hi. Foremost I have to say that this plugin is awesome. I was looking for ages for this. Thx.
I would add an option to draw shadow behind the div.</description> <content:encoded><![CDATA[<p>Hi. Foremost I have to say that this plugin is awesome. I was looking for ages for this. Thx.<br
/> I would add an option to draw shadow behind the div.</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
Database Caching 3/16 queries in 0.051 seconds using disk: basic
Object Caching 350/350 objects using disk: basic

Served from: trentrichardson.com @ 2012-05-21 04:12:28 -->
