<?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>Andrew Beaton :: FAQ &#187; a href</title>
	<atom:link href="http://andrewbeaton.net/faq/tag/a-href/feed/" rel="self" type="application/rss+xml" />
	<link>http://andrewbeaton.net/faq</link>
	<description>Tips from the world of a software developer</description>
	<lastBuildDate>Wed, 13 Jul 2011 17:03:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
		<item>
		<title>Use a button as an A Href link</title>
		<link>http://andrewbeaton.net/faq/2009/11/13/use-a-button-as-an-a-href-link/</link>
		<comments>http://andrewbeaton.net/faq/2009/11/13/use-a-button-as-an-a-href-link/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 23:06:42 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[a href]]></category>
		<category><![CDATA[Button]]></category>

		<guid isPermaLink="false">http://andrewbeaton.com/faq/?p=33</guid>
		<description><![CDATA[To create an A Href link that can be used as a button, we can use one of the two following methods: function SubmitFrom&#40;&#41;&#123; document.myform.target.value=&#34;somescript.php3&#34; document.myfrom.submit&#40;&#41; &#125; function ResetFrom&#40;&#41;&#123; document.myfrom.reset&#40;&#41; &#125; &#160; &#60;a href=&#34;javascript:SubmitForm()&#34;&#62;&#60;img src=....&#62;&#60;/a&#62; or &#60;FORM name=remove ACTION='removeItem.php3' METHOD='POST' ENCTYPE='application/x- www-form-urlencoded'&#62; &#60;a href=&#34;javascript:document.remove.submit()&#34;&#62;remove from cart&#60;/a&#62; &#60;/form&#62;]]></description>
			<content:encoded><![CDATA[<p>To create an A Href link that can be used as a button, we can use one of the two following methods:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">function</span> SubmitFrom<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    document.<span style="color: #660066;">myform</span>.<span style="color: #660066;">target</span>.<span style="color: #660066;">value</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;somescript.php3&quot;</span>
    document.<span style="color: #660066;">myfrom</span>.<span style="color: #660066;">submit</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #003366; font-weight: bold;">function</span> ResetFrom<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    document.<span style="color: #660066;">myfrom</span>.<span style="color: #660066;">reset</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #339933;">&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;javascript:SubmitForm()&quot;</span><span style="color: #339933;">&gt;&lt;</span>img src<span style="color: #339933;">=</span>....<span style="color: #339933;">&gt;&lt;/</span>a<span style="color: #339933;">&gt;</span></pre></div></div>

<p>or</p>

<div class="wp_syntax"><div class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">FORM</span> <span style="color: #000066;">name</span><span style="color: #66cc66;">=</span>remove <span style="color: #000066;">ACTION</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'removeItem.php3'</span> <span style="color: #000066;">METHOD</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'POST'</span> <span style="color: #000066;">ENCTYPE</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">'application/x-</span>
<span style="color: #009900;">www-form-urlencoded'</span>&gt;</span> 
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">a</span> <span style="color: #000066;">href</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;javascript:document.remove.submit()&quot;</span>&gt;</span>remove from cart<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">a</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">form</span>&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://andrewbeaton.net/faq/2009/11/13/use-a-button-as-an-a-href-link/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

