<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>dom111.co.uk &#187; Ruby on Rails</title>
	<atom:link href="http://www.dom111.co.uk/blog/category/coding/ruby-on-rails/feed" rel="self" type="application/rss+xml" />
	<link>http://www.dom111.co.uk/blog</link>
	<description>Move along. Nothing to see here.</description>
	<lastBuildDate>Wed, 26 Oct 2011 16:37:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Ruby on Rails: image_submit_tag and :confirm</title>
		<link>http://www.dom111.co.uk/blog/coding/ruby-on-rails-image_submit_tag-and-confirm/26</link>
		<comments>http://www.dom111.co.uk/blog/coding/ruby-on-rails-image_submit_tag-and-confirm/26#comments</comments>
		<pubDate>Thu, 14 Aug 2008 17:10:00 +0000</pubDate>
		<dc:creator>dom111</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[snippet]]></category>

		<guid isPermaLink="false">http://www.dom111.co.uk/blog/?p=26</guid>
		<description><![CDATA[I was told about an issue today with the image_submit_tag not supporting the :confirm method on the element: 1 &#60;%= image_submit_tag&#40;'buttons/submit.gif', &#123; :confirm =&#62; 'Are you sure?' &#125;&#41; %&#62; so I thought I&#8217;d share a quick fix which would be the actual javascript returned by the function: 1 2 &#60;%= image_submit_tag&#40;'buttons/submit.gif', &#123; :onclick =&#62; 'return [...]]]></description>
			<content:encoded><![CDATA[<p>I was told about an issue today with the image_submit_tag not supporting the :confirm method on the element:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="rails" style="font-family:monospace;"><span style="color:#006600; font-weight:bold;">&lt;%</span>= image_submit_tag<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'buttons/submit.gif'</span>, <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#ff3333; font-weight:bold;">:confirm</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'Are you sure?'</span> <span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">%&gt;</span></pre></td></tr></table></div>

<p>so I thought I&#8217;d share a quick fix which would be the actual javascript returned by the function:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="rails" style="font-family:monospace;"><span style="color:#006600; font-weight:bold;">&lt;%</span>= image_submit_tag<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'buttons/submit.gif'</span>, <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#ff3333; font-weight:bold;">:onclick</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'return
confirm(<span style="color:#000099;">\'</span>Are you sure?<span style="color:#000099;">\'</span>);'</span> <span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">%&gt;</span></pre></td></tr></table></div>

<p>Hope this can save some people time&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dom111.co.uk/blog/coding/ruby-on-rails-image_submit_tag-and-confirm/26/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

