<?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>ronald a. richardson &#187; html</title>
	<atom:link href="http://ronaldarichardson.com/tag/html/feed/" rel="self" type="application/rss+xml" />
	<link>http://ronaldarichardson.com</link>
	<description></description>
	<lastBuildDate>Tue, 27 Dec 2011 06:49:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to submit/ POST PHP Data to Facebox</title>
		<link>http://ronaldarichardson.com/2011/03/17/how-to-submit-post-php-data-to-facebox/</link>
		<comments>http://ronaldarichardson.com/2011/03/17/how-to-submit-post-php-data-to-facebox/#comments</comments>
		<pubDate>Thu, 17 Mar 2011 18:41:46 +0000</pubDate>
		<dc:creator>Ronald</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Hacking/ Dev]]></category>
		<category><![CDATA[Journal]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[decrypt]]></category>
		<category><![CDATA[facebox]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[form submission]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[modal]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php action]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[post data]]></category>
		<category><![CDATA[post method]]></category>

		<guid isPermaLink="false">http://ronaldarichardson.com/?p=1445</guid>
		<description><![CDATA[After browsing the web, I have seen that a lot of people have been having problems with sending php post data to a facebox. Well I have the how-to on just that! If you don&#8217;t know what Facebox is, it&#8217;s a jQuery modal plugin, that is very sleek and resembles the modal from facebook.com, simple [...]]]></description>
			<content:encoded><![CDATA[<p>After browsing the web, I have seen that a lot of people have been having problems with sending php post data to a facebox. Well I have the how-to on just that!</p>
<p>If you don&#8217;t know what Facebox is, it&#8217;s a jQuery modal plugin, that is very sleek and resembles the modal from facebook.com, simple enough.</p>
<p>The purpose of these instructions is to be able to create a simple form in html, that uses php to post data to another remote page. In otherwords pass a variable to another website. Which is simple, but how can this be accomplished with Facebox?</p>
<p>Here is my example code:</p>
<p><strong>manageForms.php</strong> &#8211; this is an excerpt of form manager script I wrote for a client, this is the code for the actions panel. There is a decrypt form submission option since the data submitted is encoded in the mysql database.</p>
<div class="codecolorer-container php blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;form method=&quot;post&quot; name=&quot;decrypt&quot; id=&quot;decrypt&quot; action=&quot;decryptAndShow.php?form='</span><span style="color: #339933;">.</span><span style="color: #000088;">$form</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;&gt;'</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;div style=&quot;padding:10px;border:1px solid #000;margin:5px;&quot;&gt;Actions: &lt;a href=&quot;'</span><span style="color: #339933;">.</span>GRID_SOURCE<span style="color: #339933;">.</span><span style="color: #0000ff;">'excel.php?grid_id=grid&quot;&gt;Export to Excel&lt;/a&gt; | &lt;a href=&quot;&quot;&gt;Generate PDF&lt;/a&gt; | &lt;a href=&quot;&quot;&gt;View HTML&lt;/a&gt; | Decrypt form: &lt;select name=&quot;x&quot; onclick=&quot;document.decrypt.id.value=this.value&quot;&gt;'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$row</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/mysql_fetch_array"><span style="color: #990000;">mysql_fetch_array</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$q</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #000088;">$company_name</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/base64_decode"><span style="color: #990000;">base64_decode</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span>company_name<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;option value=&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span>id<span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;&gt;'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'ID: '</span><span style="color: #339933;">.</span><span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span>id<span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' Company Name: '</span><span style="color: #339933;">.</span><span style="color: #000088;">$company_name</span><span style="color: #339933;">.</span><span style="color: #0000ff;">''</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;/option&gt;'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp;<span style="color: #009900;">&#125;</span> &nbsp;<br />
&nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;/select&gt;'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;input type=&quot;hidden&quot; name=&quot;id&quot; id=&quot;id&quot; value=&quot;no submission selected for decryption&quot;&gt;&lt;input type=&quot;button&quot; value=&quot;Go!&quot; onclick=&quot;decrypt_form()&quot;&gt;&lt;/form&gt;'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">' | &lt;a href=&quot;'</span><span style="color: #339933;">.</span>GRID_SOURCE<span style="color: #339933;">.</span><span style="color: #0000ff;">'/class/print.php?grid_id=grid&quot;&gt;Print&lt;/a&gt; | (Mode: &lt;a href=&quot;manageForms.php?type='</span><span style="color: #339933;">.</span><span style="color: #000088;">$type</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&amp;sales_rep='</span><span style="color: #339933;">.</span><span style="color: #000088;">$sales_rep</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&amp;form='</span><span style="color: #339933;">.</span><span style="color: #000088;">$form</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&amp;mode=edit&quot;&gt;Edit&lt;/a&gt; | &lt;a href=&quot;manageForms.php?type='</span><span style="color: #339933;">.</span><span style="color: #000088;">$type</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&amp;sales_rep='</span><span style="color: #339933;">.</span><span style="color: #000088;">$sales_rep</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&amp;form='</span><span style="color: #339933;">.</span><span style="color: #000088;">$form</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&amp;mode=view&quot;&gt;View&lt;/a&gt;)&lt;/div&gt;'</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>Now here is the simple little ajax code to include, to make the decrypt form above post it&#8217;s &#8216;id&#8217; variable to facebox.</p>
<div class="codecolorer-container javascript blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br /></div></td><td><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span><br />
&nbsp; &nbsp;<span style="color: #003366; font-weight: bold;">function</span> decrypt_form<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>&nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; $.<span style="color: #660066;">facebox</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$.<span style="color: #660066;">ajax</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; data<span style="color: #339933;">:</span> <span style="color: #009900;">&#123;</span> <span style="color: #3366CC;">&quot;id&quot;</span> <span style="color: #339933;">:</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#id&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">val</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; error<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$.<span style="color: #660066;">facebox</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;There was an error decrypting the form submission&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; success<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$.<span style="color: #660066;">facebox</span><span style="color: #009900;">&#40;</span>data<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; type<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;post&quot;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; url<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;decryptAndShow.php?form='.$form.'&quot;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>&nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> &nbsp;<br />
&nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></div></td></tr></tbody></table></div>
<p>Here is how the code works, I created a function called <strong>decrypt_form()</strong> all this does is execute the code when it is called, which I called it through the button on the form. Next is to use the facebox function, and within that do a simple ajax post method. in <strong>data:</strong> this is where you will put the variable you want to post from the form, in my case is is &#8216;id&#8217;. Skip error, well change the error message to whatever you like. Keep success the same, and of course your type is &#8216;post&#8217;, and change the URL to whatever php file you had in the forms action.</p>
<p>Simple enough <img src='http://ronaldarichardson.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Ok, now if you are having trouble just post a comment, but that should cover the how-to. If not here is the <strong>decryptAndShow.php</strong> a small excerpt of code:</p>
<div class="codecolorer-container php blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$form</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span>form<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$id</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$pagetitle</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Decryption of '</span><span style="color: #339933;">.</span><span style="color: #000088;">$form</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' identification # '</span><span style="color: #339933;">.</span><span style="color: #000088;">$id</span><span style="color: #339933;">.</span><span style="color: #0000ff;">''</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">include</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'../includes/connect.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000088;">$query</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'select * from '</span><span style="color: #339933;">.</span><span style="color: #000088;">$form</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' where id = '</span><span style="color: #339933;">.</span><span style="color: #000088;">$id</span><span style="color: #339933;">.</span><span style="color: #0000ff;">''</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/mysql_query"><span style="color: #990000;">mysql_query</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$query</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;strong&gt;data submission id:&lt;/strong&gt; &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$id</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&lt;br&gt;&quot;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
]]></content:encoded>
			<wfw:commentRss>http://ronaldarichardson.com/2011/03/17/how-to-submit-post-php-data-to-facebox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IE + Firefox modifications for the ZocialNET</title>
		<link>http://ronaldarichardson.com/2008/05/05/ie-firefox-modifications-for-the-zocialnet/</link>
		<comments>http://ronaldarichardson.com/2008/05/05/ie-firefox-modifications-for-the-zocialnet/#comments</comments>
		<pubDate>Tue, 06 May 2008 02:28:35 +0000</pubDate>
		<dc:creator>Ronald</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[vailidator]]></category>
		<category><![CDATA[ZocialNET]]></category>

		<guid isPermaLink="false">http://ronaldarichardson.com/core/?p=480</guid>
		<description><![CDATA[The ZocialNET was built in Firefox for Firefox, without the thought of W3C/WDG HTML Validation&#8230; or whatever they want to call it. So now I&#8217;m going back and fixing all the errors in the code and design, and Javascript etc&#8230; to work in Firefox, Safari, and IE. dammit there should only be one browser. Oh [...]]]></description>
			<content:encoded><![CDATA[<p>The ZocialNET was built in Firefox for Firefox, without the thought of W3C/WDG HTML Validation&#8230; or whatever they want to call it. So now I&#8217;m going back and fixing all the errors in the code and design, and Javascript etc&#8230; to work in Firefox, Safari, and IE. dammit there should only be one browser. Oh well, work on the design of the ZocialNET should be complete by next week.</p>
]]></content:encoded>
			<wfw:commentRss>http://ronaldarichardson.com/2008/05/05/ie-firefox-modifications-for-the-zocialnet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New layout complete</title>
		<link>http://ronaldarichardson.com/2008/04/22/new-layout-complete/</link>
		<comments>http://ronaldarichardson.com/2008/04/22/new-layout-complete/#comments</comments>
		<pubDate>Wed, 23 Apr 2008 01:56:55 +0000</pubDate>
		<dc:creator>Ronald</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://ronaldarichardson.com/core/?p=442</guid>
		<description><![CDATA[Tell me what you guys all think of the new website layout.]]></description>
			<content:encoded><![CDATA[<p>Tell me what you guys all think of the new website layout.</p>
]]></content:encoded>
			<wfw:commentRss>http://ronaldarichardson.com/2008/04/22/new-layout-complete/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

