<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-13974095</id><updated>2011-11-28T19:03:09.002-05:00</updated><title type='text'>PHP, XUL, CSS Tips, Tricks, and Hacks</title><subtitle type='html'>Contains my tidbits from my professional experiences in coding with PHP, XUL, and HTML/CSS.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://phppoints.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13974095/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://phppoints.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Eric</name><uri>http://www.blogger.com/profile/08878448037730990893</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-13974095.post-111981640063511128</id><published>2005-06-26T16:01:00.000-04:00</published><updated>2005-06-26T16:19:41.763-04:00</updated><title type='text'>Extending XULElement</title><content type='html'>In my XUL application, I often found myself setting things like:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;document.getElementById('uname').style.display = 'none';&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This seemed very tedius, so using the wonderful flexibility of JavaScript's prototyping, I added a few helpful functions to the XULElement, which all elements in XUL are derived from:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;XULElement.prototype.hide = function() {&lt;br /&gt;  this.style.display = 'none';&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;XULElement.prototype.show = function() {&lt;br /&gt;  this.style.display = 'block';&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;XULElement.prototype.conceal = function() {&lt;br /&gt;  this.style.visibility = 'hidden';&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;XULElement.prototype.reveal = function() {&lt;br /&gt;  this.style.visibility = 'visible';&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Now I can simply call&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;document.getElementById('uname').hide();&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And since I use document.getElementById() a lot, I wrapped it with a simple macro-style function:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;function ID( id ) {&lt;br /&gt;     return( document.getElementById( id ) );&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;ID('uname').hide();&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This reduced my code a lot and removed a lot of redundancy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13974095-111981640063511128?l=phppoints.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phppoints.blogspot.com/feeds/111981640063511128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13974095&amp;postID=111981640063511128' title='296 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13974095/posts/default/111981640063511128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13974095/posts/default/111981640063511128'/><link rel='alternate' type='text/html' href='http://phppoints.blogspot.com/2005/06/extending-xulelement.html' title='Extending XULElement'/><author><name>Eric</name><uri>http://www.blogger.com/profile/08878448037730990893</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>296</thr:total></entry><entry><id>tag:blogger.com,1999:blog-13974095.post-111981566342879154</id><published>2005-06-26T15:50:00.000-04:00</published><updated>2005-06-26T15:55:03.313-04:00</updated><title type='text'>Purpose &amp; Introduction</title><content type='html'>I am currently employed as a full-time PHP developer. I will be using this blog to publish my thoughts, ideas, code snippets, and solutions to tough problems I run into. I currently use PHP 5.1-dev, PostgreSQL 8.0.3 with PDO (&lt;a href="http://www.php.net/pdo"&gt;http://www.php.net/pdo&lt;/a&gt;) and Apache 2 running on FreeBSD. XUL is used for our administration panel and is based on a slim Javscript/PHP library.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/13974095-111981566342879154?l=phppoints.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://phppoints.blogspot.com/feeds/111981566342879154/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=13974095&amp;postID=111981566342879154' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/13974095/posts/default/111981566342879154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/13974095/posts/default/111981566342879154'/><link rel='alternate' type='text/html' href='http://phppoints.blogspot.com/2005/06/purpose-introduction.html' title='Purpose &amp; Introduction'/><author><name>Eric</name><uri>http://www.blogger.com/profile/08878448037730990893</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry></feed>
