<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Web Site Design Tutorials</title>
    <link rel="alternate" type="text/html" href="http://www.websitedesigntutorials.net/" />
    <link rel="self" type="application/atom+xml" href="http://www.websitedesigntutorials.net/atom.xml" />
    <id>tag:www.websitedesigntutorials.net,2009-08-03://42</id>
    <updated>2010-02-15T12:41:07Z</updated>
    <subtitle>Tuorials for CSS, HTML, Facebook Applications, JavaScript, PHP, Ruby on Rails and more!</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.25</generator>

<entry>
    <title>Flash coming to Android </title>
    <link rel="alternate" type="text/html" href="http://www.websitedesigntutorials.net/2010/02/flash-coming-to-android.html" />
    <id>tag:www.websitedesigntutorials.net,2010://42.878</id>

    <published>2010-02-15T12:38:14Z</published>
    <updated>2010-02-15T12:41:07Z</updated>

    <summary>Looking to design an application that will work cross platforms? Adobe&apos;s AIR is a great choice and is coming to Android phones! Adobe AIR is described as &quot;feature-rich environment for delivering rich applications outside the mobile browser and across multiple...</summary>
    <author>
        <name>Tom Fitzgerald</name>
        <uri>http://www.optilaw.com</uri>
    </author>
    
        <category term="Adobe Flash" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="adobe" label="adobe" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="air" label="air" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="flash" label="flash" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-us" xml:base="http://www.websitedesigntutorials.net/">
        <![CDATA[<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><div><form mt:asset-id="53" class="mt-enclosure mt-enclosure-image" style="display: inline;">Looking to design an application that will work cross platforms? Adobe's AIR is a great choice and is coming to Android phones! Adobe AIR is described as "feature-rich environment for delivering rich applications outside the mobile browser and across multiple operating systems." Also recently we have been talking a lot about Flash and why has it been blacklisted on mobile devices? Well its coming to Android in the first half of 2010!</span></div><img alt="android-flash.jpg" src="http://www.websitedesigntutorials.net/images/android-flash.jpg" width="230" height="326" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></form> <div><br /></div>]]>
        
    </content>
</entry>

<entry>
    <title>No Flash for Windows 7 Mobile Initially</title>
    <link rel="alternate" type="text/html" href="http://www.websitedesigntutorials.net/2010/02/no-flash-for-windows-7-mobile-intially.html" />
    <id>tag:www.websitedesigntutorials.net,2010://42.877</id>

    <published>2010-02-15T12:24:50Z</published>
    <updated>2010-02-15T12:33:53Z</updated>

    <summary><![CDATA[What's up with all the Adobe Flash hate? First Steve Job says Flash is buggy and refuses to have it run on his iPad &amp; iPods. Now is Microsoft doing the same thing? Well its true that there is no...]]></summary>
    <author>
        <name>Tom Fitzgerald</name>
        <uri>http://www.optilaw.com</uri>
    </author>
    
        <category term="Adobe Flash" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://www.websitedesigntutorials.net/">
        <![CDATA[What's up with all the Adobe Flash hate? First Steve Job says Flash is buggy and refuses to have it run on his iPad &amp; iPods. Now is Microsoft doing the same thing? Well its true that there is no Flash support for Windows 7 mobile. However in this case its only not ready for the initial launch. I suppose thats better news then hearing it won't be supported at all.<div><br /></div><div><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="windows-7-mobile.jpg" src="http://www.websitedesigntutorials.net/images/windows-7-mobile.jpg" width="497" height="211" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></span><div><br /></div><div>It's pretty harsh to hear Steve Jobs just basically say 'Sorry but you're screwed' to everyone that has a Flash web site. Most people use Flash for a small animation, maybe a an advertisement. Missing those will be noticeable but we'll still be able to view the page. What about sites that are 100% in Flash? I know I still have a few out there. All Flash web sites are pretty common in certain industries. Flash web sites are cool, I'm not knocking them. Yes HTML5 is coming and its gonna be awesome but for the love of god include and support Flash! It's not dead, I'd argue to say its not dying so include it on your devices. Microsoft seems to get this but it just makes me mad that Flash web sites will be basically unviewable on the new iPad and never have been on the iTouch.</div></div><div><br /></div>]]>
        
    </content>
</entry>

<entry>
    <title>Web browser usage chart</title>
    <link rel="alternate" type="text/html" href="http://www.websitedesigntutorials.net/2009/12/web-browser-usage-chart.html" />
    <id>tag:www.websitedesigntutorials.net,2009://42.651</id>

    <published>2009-12-16T01:41:29Z</published>
    <updated>2009-12-16T02:14:04Z</updated>

    <summary>Check out this awesome &apos;chart&apos; of web browser usage over the years. Interesting to see how things change over the years. Who knows how much Google&apos;s Chrome will have over the next 5 years, or 10?...</summary>
    <author>
        <name>Tom Fitzgerald</name>
        <uri>http://www.optilaw.com</uri>
    </author>
    
    
    <content type="html" xml:lang="en-us" xml:base="http://www.websitedesigntutorials.net/">
        <![CDATA[Check out this awesome 'chart' of <a href="http://www.axiis.org/examples/BrowserMarketShare.html">web browser usage</a> over the years. Interesting to see how things change over the years. Who knows how much Google's Chrome will have over the next 5 years, or 10?]]>
        
    </content>
</entry>

<entry>
    <title>Shorten URL&apos;s with Google</title>
    <link rel="alternate" type="text/html" href="http://www.websitedesigntutorials.net/2009/12/shorten-urls-with-google.html" />
    <id>tag:www.websitedesigntutorials.net,2009://42.649</id>

    <published>2009-12-15T05:09:46Z</published>
    <updated>2009-12-15T05:12:47Z</updated>

    <summary>Google has sure been on a roll lately. Tonight they announced their own URL shortener, much like bit.ly or whatever the other ones are called. What&apos;s the big news? Well its not really super amazing but its nice to have...</summary>
    <author>
        <name>Tom Fitzgerald</name>
        <uri>http://www.optilaw.com</uri>
    </author>
    
        <category term="General Web Design" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="google" label="Google" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="shortener" label="shortener" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="url" label="url" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-us" xml:base="http://www.websitedesigntutorials.net/">
        <![CDATA[Google has sure been on a roll lately. Tonight they announced their own URL shortener, much like bit.ly or whatever the other ones are called. What's the big news? Well its not really super amazing but its nice to have another useful service offered by one of the best companies out there.&nbsp;<div><br /></div><div>The catch</div><div><br /></div><div>Right now the URL shortener is just for the Google toolbar and FeedBurner. If you aren't using FeedBurner, I highly suggest you link it with your blog and then link it to Twitter. It's a huge time saver and I spent the time in writing a <a href="http://www.lawfirmwebsiteoptimization.com/2009/12/linking-your-blog-to-twitter.html">quick guide on how to do it</a>.&nbsp;</div>]]>
        
    </content>
</entry>

<entry>
    <title>Bye Geocities! </title>
    <link rel="alternate" type="text/html" href="http://www.websitedesigntutorials.net/2009/10/bye-geocities.html" />
    <id>tag:www.websitedesigntutorials.net,2009://42.471</id>

    <published>2009-10-26T16:29:27Z</published>
    <updated>2009-10-26T16:42:15Z</updated>

    <summary>Wow, so Geocities is closing. For those of you that didn&apos;t grow up with the Internet and spending every minute on it - Geocities was the bomb back in the day. Before domains and hosting became dirt cheap, it was...</summary>
    <author>
        <name>Tom Fitzgerald</name>
        <uri>http://www.optilaw.com</uri>
    </author>
    
    <category term="geocities" label="geocities" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-us" xml:base="http://www.websitedesigntutorials.net/">
        <![CDATA[<p>Wow, so Geocities is closing. For those of you that didn't grow up with the Internet and spending every minute on it - Geocities was the bomb back in the day. Before domains and hosting became dirt cheap, it was hard to have your own web site. I remeber in 1995 a friend gave me some web space on his server and I had my own domain. It was amazing. However before I had that I really had to use whatever space I could get my hands on. </p>
<h2>Internet Service Providers</h2>
<p>My ISP gave me some space however it was their domain and an alias to my home directory. So my web site would look something like this <a href="http://www.erols.com/~mortalkombatrulz">http://www.erols.com/~mortalkombatrulz</a> - Don't click the link, it's gone :(</p>
<h2>Enter geocities</h2>
<p>So geocities hits and gives you free space with a slightly cooler domain name. They also had interesting sub directories that would categorize your content like a neighborhood. For example <a href="http://www.geocities.com/SiliconValley/yourpagehere/">http://www.geocities.com/SiliconValley/yourpagehere/</a> Silicon Valley of course indicating that it was a tech related site. This neighborhood setup was really cool. With all of these sites popping up entered a ton of annoying sites that still haunt me today.</p>
<h2>Browser shout outs</h2>
<p>Remember those small browser buttons that told the world 'I like Internet Explorer' or Netscape? They were everywhere. Not sure the point but I know I had them on my site. </p>
<h2>Telling the user what resolution the site was made in </h2>
<p>Remember 'This site is best viewed in 1024x768 resolution'? Ok so should I re-adjust my screen? </p>
<h2>Countless others</h2>
<p>Where should I stop? Horrible backgrounds, tables everywhere, all text aligned center? It was a different world back then. It's sad to know of the sites that I spent so much time on as a kid is now going away forever. Yahoo purchased Geocities a wile ago, things changed. Now with hosting and domains so cheap people are just getting their own domain. Yahoo also provides hosting and domains so I guess they figure close Geocities. Yahoo isn't evil, I'm sure the site wasn't doing much of anything anymore. Geocities thanks for the free hosting!</p>]]>
        
    </content>
</entry>

<entry>
    <title>I published cool stuff on my other blogs</title>
    <link rel="alternate" type="text/html" href="http://www.websitedesigntutorials.net/2009/10/i-published-cool-stuff-on-my-other-blogs.html" />
    <id>tag:www.websitedesigntutorials.net,2009://42.469</id>

    <published>2009-10-22T12:08:00Z</published>
    <updated>2009-10-22T12:09:31Z</updated>

    <summary>So give them some love too :)Tweets to be included in Google&apos;s search resultsWindows 7 releasedPrediction : Google Music APIThanks :)-Tom...</summary>
    <author>
        <name>Tom Fitzgerald</name>
        <uri>http://www.optilaw.com</uri>
    </author>
    
        <category term="Links" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://www.websitedesigntutorials.net/">
        <![CDATA[So give them some love too :)<div><br /></div><div><ul><li><a href="http://www.thesearchengineoptimizationexperts.com/2009/10/tweets-to-be-included-in-google-search-results.html">Tweets to be included in Google's search results</a></li><li><a href="http://www.freecomputeradvice.net/2009/10/windows-7-is-here.html">Windows 7 released</a></li><li><a href="http://www.googleapihelp.com/2009/10/prediction-google-music-api.html">Prediction : Google Music API</a></li></ul><div>Thanks :)</div><div><br /></div><div>-Tom</div></div>]]>
        
    </content>
</entry>

<entry>
    <title>Moving a site to a new domain name</title>
    <link rel="alternate" type="text/html" href="http://www.websitedesigntutorials.net/2009/09/moving-a-site-to-a-new-domain-name.html" />
    <id>tag:www.websitedesigntutorials.net,2009://42.417</id>

    <published>2009-09-22T02:23:16Z</published>
    <updated>2009-09-22T02:32:03Z</updated>

    <summary>For whatever reason you may one day want to change your domain name. Of course the biggest issue with this is you are going to loose all your search engine ranking! Thankfully that is no longer the case. Google&apos;s Webmaster...</summary>
    <author>
        <name>Tom Fitzgerald</name>
        <uri>http://www.optilaw.com</uri>
    </author>
    
        <category term="General Web Design" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="301" label="301" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="google" label="google" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="isapirewrite" label="isapi rewrite" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="moving" label="moving" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="redirect" label="redirect" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="site" label="site" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="tools" label="tools" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="webmaster" label="webmaster" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-us" xml:base="http://www.websitedesigntutorials.net/">
        <![CDATA[For whatever reason you may one day want to change your domain name. Of course the biggest issue with this is you are going to loose all your search engine ranking! Thankfully that is no longer the case. Google's Webmaster Tools now gives you a helping hand in this feat. However in this part of the lesson I want to go over how to redirect your old site to the new site. This is because many sites (hopefully) link to your current site. If you move sites you are going to want all those links to still work.<div><br /><div>Google recommends you have a permantent 301 redirect for every page in your site. Fortunately this is an easy process. On my client's server they are using Windows 2003 server and IIS. They are also using ISAPI Rewrite software by Helicon.&nbsp;</div><div><br /></div><div><b>In the old domain</b></div><div><br /></div>
<div class="code">
<div>RewriteBase /&nbsp;</div><div>RewriteRule (.*) http://www.belsky-weinberg-horowitz.com/$1 [R=301,NC]&nbsp;</div></div></div><div><br /></div><div>This was put in the ISAPI config for their old domain (legalteam.net). What this says is 'Any page that is being accessed, find it on our new domain and its a 301 redirect. So if I try to go to http://www.legalteam.net/contact it will permanetly redirect the viewer to&nbsp;http://www.belsky-weinberg-horowitz.com/contact</div>]]>
        
    </content>
</entry>

<entry>
    <title>Loading a file with AJAX</title>
    <link rel="alternate" type="text/html" href="http://www.websitedesigntutorials.net/2009/08/loading-a-file-with-ajax.html" />
    <id>tag:www.websitedesigntutorials.net,2009://42.328</id>

    <published>2009-08-16T03:23:46Z</published>
    <updated>2009-08-09T03:27:53Z</updated>

    <summary><![CDATA[ This is a really neat tutorial that I enjoy using because it uses AJAX.&nbsp;Basically I want to call data into a web site, but I hate having to reload a new page every time for that. What we are...]]></summary>
    <author>
        <name>Tom Fitzgerald</name>
        <uri>http://www.optilaw.com</uri>
    </author>
    
        <category term="JavaScript / jQuery" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="ajax" label="ajax" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="file" label="file" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="load" label="load" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-us" xml:base="http://www.websitedesigntutorials.net/">
        <![CDATA[ <p class="tom">     This is a really neat
                    tutorial that I enjoy using because it uses
                    AJAX.&nbsp;Basically I want
                    to call data into a web site, but I hate having
                    to reload a new page every time for that. What
                    we are going to do is store some data in a
                    separate text file then call that data from our
                    HTML page using AJAX (really just JavaScript in
                    this case).</p>

                    <p class="tom"><strong>Line by
                    Line</strong></p>

                    <p class="tom">Let's first dive right into and
                    view the code of test.html. I'll put comments
                    below to explain as we go along.</p><div class="code">
                      <p class="tom">Ok this part is easy enough
                      just some standard HTML code to get the page
                      going, so far so good.</p>

                      <p class="code1">&lt;html&gt;<br />
                      &lt;head&gt;<br />
                      &lt;meta http-equiv="Content-Type"
                      content="text/html;
                      charset=iso-8859-1"&gt;<br />
                      &lt;/head&gt;<br />
                      &lt;body&gt;<br />
                      &lt;title&gt;CCE's AJAX Simple Tutorial
                      &lt;/title&gt;<br /></p></div>
                    <p class="tom">Ok so here we have our
                        JavaScript code. This starts creates a
                        function called createRequestObject. This
                        will be the object that will go get our
                        data for us, very simple. There is some
                        quick version detection to satisfy both
                        Internet Explorer and other web
                        browsers.</p><div class="code">
                      <p class="code1">&lt;script type="text/javascript"
                        language="javascript"&gt;<br />
                        <br />
                        function createRequestObject() {<br />
                        <br />
                        var ro;<br />
                        var browser = navigator.appName;<br />
                        <br />
                        if(browser == "Microsoft Internet
                          Explorer"){<br />
                        <br />
                        ro = new
                        ActiveXObject("Microsoft.XMLHTTP");<br />
                        <br />
                        }else{<br />
                        <br />
                        ro = new XMLHttpRequest();<br />
                        }<br />
                        <br />
                        return ro;<br />
                        }<br />
                        <br />
                        var http =
                      createRequestObject();</p></div>
                    <p class="tom">Ok so now we have the object http with our
                      request function built in. Now we have to
                      tell it to do something, this happens
                      next.</p><div class="code">
                      <p class="code1"><span class="style40">function sendRequest() {<br />
                      <br />
                        http.open('get', 'tom.txt');<br />
                        http.onreadystatechange =
                        handleResponse;<br />
                        http.send(null);<br />
                      <br />
                      }</span></p></div>
                    <p class="tom">We made a new function
                        called <em>sendRequest</em>. You can see it
                        uses our previous object http. The first line in the
                        function uses the get command to get a file,
                        in this case it is statically assigned the
                        text file tom.txt.</p><div class="code">
                          <p class="style40 tom"><em>NOTE: Dynamic
                            data can be used as well very easily, see
                            our other tutorials for both PHP and
                            Coldfusion on this subject.</em></p></div>
                    <p class=" tom">Ok so now the object
                        is told to watch for the response ( to find
                        out the status ) and then told to actually
                        get the file.</p><div class="code">
                      <p class="code1"><span class="style40">function handleResponse() {<br />
                      <br />
                        if(http.readyState == 4){<br />
                      <br />
                        var response =
                        http.responseText;<br />
                        var update = new Array();</span></p></div>
                    <p class="tom">Ok now this function handles
                        the response of our last function. So let's
                        see; it checks our http object for the
                        readyState variable (the status) and checks
                        to see if it is a 4 ( 4 means it worked).
                        If it is a 4 then we assume the variable
                        http.responseText holds the contents of the
                        file, storing it to our new variable
                        response.</p>
      <h1>Putting it all together - AJAX text into specfic tags</h1>
                    <p class="tom">So now we have the contents
                        of the file. We could stop here but I
                        wanted just a little more than reading one
                        file and then outputting it to the screen.
                        I wanted this tutorial to grow with you. So
                        what I did is made it so the text file can
                        contain multiple lines of text and we
                        access a specific line easily to put our
                        site where we want it. To explain further
                        let's look at the text file itself.</p><div class="code">
                          <p class="code1">title|hi this is a
                          message from tom</p></div>
                    <p class="tom">You will notice I have the
                        word title followed by a | (shift + \ ) then the text I want to
                        display. Title refers to the &lt;div&gt; where I want the
                        text. I could have several of these if I
                        chose, for example I could have.</p><div class="code">
                          <p class="code1">header|this text goes into a div named header<br />
                          footer|this text goes into a div named footer</p></div>
                    <p class="tom">So I can define several
                        different places using &lt;div&gt; and
                        access them. Now let's explain that a
                        little bit more by looking at the next few
                        lines of code. First I check to make sure
                        the | symbol is
                        there so I can tell what &lt;div&gt; I want
                        it in and what is the text I want to
                        display.</p>
                    <p class="tom">I then use the split
                        function to split the variable at the |
                        symbol, then storing it into a variable. I
                        know have the div name in update[0]
                        and the text itself in update[1].</p><div class="code">
                      <p class="code1">if(response.indexOf('|' != -1))
                        {<br />
                        <br />
                        update = response.split('|');<br />
                        document.getElementById(update[0]).innerHTML
                        = update[1];<br />
                        }<br />
                        }<br />
                        }<br />
                        <br />
                      &lt;/script&gt;</p></div>
                    <p class="tom">Ok now this should all come
                        together. I have a &lt;div
                        id="title"&gt;&lt;/div&gt; which is
                        empty. You'll remember the title from above
                        in our text file. Now look at the function
                        called in our JavaScript link, sendRequest(title). That
                        means to put the data from the text file we
                        defined but ONLY the line that starts with title| and then
                        put it between the &lt;DIV&gt; tags labeled title. See how
                        cool that is? Now we can use that text file
                        to put as much text as we want. And then
                        call that text and put it exactly where
                        we want it.</p><div class="code">
                      <p class="code1">&lt;a
                        href="javascript:<span class="style40">sendRequest</span>(title)"
                        mce_href="javascript:<span class="style40">sendRequest</span>(title)"&gt;Load
                        data into Title DIV below &lt;/a&gt;<br />
                        <br />
                        &lt;div id="title"&gt;<br />
                        &lt;/div&gt;<br />
                        <br />
                        &lt;/body&gt;<br />
                      &lt;/html&gt;</p></div>
                    <h2>Best uses for AJAX</h2>
                    <p class="tom">Some cool things you can do with AJAX include, perhaps pulling a Coldfusion Blog Feed from a HTML page? That's something I'll work on in an upcoming tutorial. </p>
                    <p class="tom"><strong><a href="http://www.ccexperts.com/developers/javascript/ajax-test.html">See this in
                      action</a></strong></p>
      <p class="tom"><strong><a href="http://www.ccexperts.com/developers/javascript/ajax-test.zip">Download the source
                    code</a></strong></p>]]>
        
    </content>
</entry>

<entry>
    <title>PHP Basic Questions</title>
    <link rel="alternate" type="text/html" href="http://www.websitedesigntutorials.net/2009/08/php-basic-questions.html" />
    <id>tag:www.websitedesigntutorials.net,2009://42.327</id>

    <published>2009-08-15T03:13:35Z</published>
    <updated>2009-08-09T03:14:38Z</updated>

    <summary> One great thing about PHP is it is great for people that are new to web programming, it&apos;s very easy to start with and also can get really technical for the veterans. PHP started as Personal Home Page tools,...</summary>
    <author>
        <name>Tom Fitzgerald</name>
        <uri>http://www.optilaw.com</uri>
    </author>
    
        <category term="PHP " scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="frequently" label="frequently" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="php" label="php" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="question" label="question" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-us" xml:base="http://www.websitedesigntutorials.net/">
        <![CDATA[  <p class="tom" style="text-indent:25px">One great thing about PHP is it
                    is great for people that are new to web
                    programming, it's very easy to start with and
                    also can get really technical for the veterans.
                    PHP started as Personal Home Page tools, it was
                    started to assist new users with programming.
                    The syntax is very easy to use and is very
                    inituitive. PHP is a good language to start on
                    and learn the basics of programming. With the
                    tutorials on this site you should be able to
                    get started using PHP to create dynamic web
                    sites.</p>

                    <p class="tom"><strong>How does PHP
                    work?</strong></p>

                    <blockquote>
                      <p class="tom">PHP is a server side scripting
                      language. So PHP does the work on the
                      'back-end', preprocessing web sites and
                      inserting dynamic data before they are
                      displayed. Unlike JavaScript which is a
                      programming language that works while the
                      page is being viewed by the browser on the
                      users computer. PHP is very similar to
                      Macromedia's Coldfusion and Microsoft's
                      ASP.NET.</p>

                      <p class="tom">All you do is just embed the
                      code into an HTML page and give it a .php
                      file name extension and you are good to
                      go.</p>
                    </blockquote>

                    <p class="tom"><strong>What do I need to get
                    started?</strong></p>

                    <blockquote>
                      <p class="tom">Two things; a web server
                      running PHP on it and a HTML editor. Most web
                      hosting companies (including ours 'shamless
                      self advertisement') offer PHP for no
                      additional cost. This is a major advantage
                      over Macromedia's Coldfusion which is an
                      extra charge for most hosting companies
                      (except ours, we offer free Coldfusion
                      hosting - 'sorry I couldn't resisit).</p>
                    </blockquote>

                    <p class="tom"><strong>What are some uses for
                    PHP?</strong></p>

                    <blockquote>
                      <p class="tom">PHP can handle the output from
                      HTML forms, collect the data, then email it
                      to someone or enter it into a database. You
                      can even write your own online store, message
                      forums, pretty much anything you can think of
                      that uses data and writes to a database. In
                      short to give the basics you can :</p>

                      <ul>
                        <li class="tom"><strong>Access
                        databases</strong></li>

                        <li class="tom"><strong>Access files on
                        your server</strong></li>

                        <li>
                          <span class="tom"><strong>Access system
                          commands</strong></span>

                          <ul>
                            <li class="tom">This is especially
                            interesting - many system
                            administrators could use this to run
                            common applications on their server.
                            For example I had an old Perl script
                            that ran and cleaned up a lot of
                            un-needed files on our server. That
                            Perl script can still be used and call
                            upon from PHP, very powerful
                            stuff.</li>
                          </ul>
                        </li>
                      </ul>
                    </blockquote>

                    <p class="tom"><strong>How much does PHP
                    cost?</strong></p>

                    <blockquote>
                      <p class="tom">As state above PHP is free.
                      How is that? Three words; open source
                      software. Open source software is very
                      different from non-open source software
                      companies. The term means that the source
                      code is available for all to see, anyone has
                      the ability to view the code to see how PHP
                      operates, the same can not be said about
                      Microsoft's Windows code which is guarded
                      heavily away. PHP and open source software as
                      whole operates on a very large (and very
                      wonderful) community, there is no giant
                      corporate office that runs it. There are many
                      resources out there to learn this stuff as
                      you can see by reading this site :)</p>
                    </blockquote>]]>
        
    </content>
</entry>

<entry>
    <title>PHP Variables</title>
    <link rel="alternate" type="text/html" href="http://www.websitedesigntutorials.net/2009/08/php-variables.html" />
    <id>tag:www.websitedesigntutorials.net,2009://42.326</id>

    <published>2009-08-14T03:12:48Z</published>
    <updated>2009-08-09T03:13:29Z</updated>

    <summary><![CDATA[ Taking our first lesson; Hello World Example, we are going to spice it up a bit and use variables with our PHP file. Let's start right away by looking at an example then explaining what we did. &lt;html&gt; &lt;head&gt;...]]></summary>
    <author>
        <name>Tom Fitzgerald</name>
        <uri>http://www.optilaw.com</uri>
    </author>
    
    <category term="php" label="php" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="variables" label="variables" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-us" xml:base="http://www.websitedesigntutorials.net/">
        <![CDATA[  <p class="tom">Taking our first lesson; Hello
                    World Example, we are going to spice it up a
                    bit and use variables with our PHP file. Let's
                    start right away by looking at an example then
                    explaining what we did.</p><div class="code">
                      <p class="code1">&lt;html&gt;<br />
                      &lt;head&gt;<br />
                      &lt;title&gt;CCE's PHP
                      Tutorial&lt;/title&gt;<br />
                      &lt;/head&gt;<br />
                      &lt;body&gt;<br />
                      <br />
                      &lt;?php<br />
                      <br />
                      $var = "PHP is cool";<br />
                      echo "&lt;p&gt;$var&lt;/p&gt;";<br />
                      <br />
                      ?&gt;<br />
                      <br />
                      &lt;/body&gt;<br />
                      &lt;/html&gt;</p></div>

                    <p class="tom">As you can see the line we
                    really care about is</p><div class="code">
                      <p class="code1">$var = "PHP is cool";<br />
                      echo "&lt;p&gt;$var&lt;/p&gt;";</p></div>

                    <p class="tom">This says define a variable
                    called <span class="codeSmall">$var</span> and give
                    it the data of <span class="codeSmall">"PHP is
                    cool";</span> , then we simply display the data
                    using the <span class="codeSmall">echo</span>
                    command.</p>

                    <p class="h1"><strong>Using
                    Constants</strong></p>

                    <p class="tom">You saw above how to create
                    variables and display the data, now we are
                    going to take a look at creating 'constant '
                    variables. Constant variables typically do not
                    change. They work well at the top of document
                    if you know that you need to define something
                    that will not change, let's take a look at a
                    sample:</p><div class="code">
                      <p class="code1">define("SALES_TAX",.05);</p></div>

                    <p class="tom">This creates a constant with the
                    name <span class="codeSmall">name</span> and the
                    value is <span class="codeSmall">Tom
                    Fitzgerald</span>. You'll notice that constants
                    do not require the $ before the variable name,
                    and variables are traditionally defined in all
                    upper case. This is not required but it can be
                    easier when reading your code so you know what
                    is a constant and what is not easily. You can
                    now view the value by doing...</p><div class="code">
                      <p class="code1">echo SALES_TAX</p></div>

                    <p class="h1"><strong>Simple
                    Calculations</strong></p>

                    <p class="tom">Now let's do some simple
                    calculations using our variables and
                    constant.</p><div class="code">
                      <p class="code1">
                      define("SALES_TAX",.05);<br />
                      <br />
                      $Amount_Purchased = 5.45;<br />
                      $Tax_Amount = $Amount_Purchased *
                      SALES_TAX;</p></div>

                    <p class="tom">This takes our constant
                    <span class="code1">SALES_TAX</span> and our
                    variable <span class="code1">Amount_Purchased</span> and multiplies
                    the two to get the tax amount.</p><div class="code">
                      <p class="tom"><em><strong>Note: Make sure if
                      you are doing a calculation you are defining
                      the variable correctly, for
                      example:</strong></em></p>

                      <p class="tom">This is the correct way
                      <span class="codeSmall">$Amount = 3<br /></span>
                      This is incorrect <span class="codeSmall">$Amount
                      = "3" ;<br /></span> Quotes are used only
                      when defining a text variable or something
                      you <em>don't</em> want to ever run a
                      calculation on.</p></div>

                    <p class="tom">This is pretty simple so far so
                    lets just view some more simple
                    calculations:</p><div class="code">
                      <p class="code1">$var1 = 3;<br />
                      $var2 = 5;<br />
                      <br />
                      $total = $var1 + $var2;<br />
                      $total = $var1 * $var2;<br />
                      $total = $var1 / $var2</p></div>

                    <p class="tom">This shows how we can do easy
                    addition, multiplication and division using our
                    new variables, good job.</p>
]]>
        
    </content>
</entry>

<entry>
    <title>Format data with PHP</title>
    <link rel="alternate" type="text/html" href="http://www.websitedesigntutorials.net/2009/08/format-data-with-php.html" />
    <id>tag:www.websitedesigntutorials.net,2009://42.325</id>

    <published>2009-08-13T02:56:20Z</published>
    <updated>2009-08-09T03:11:18Z</updated>

    <summary> Now we can learn how to change the output of certain variables. For example if you have variable containing the number 3, what if you want to output it as $3.00, or $0.03 ? How can we do that...</summary>
    <author>
        <name>Tom Fitzgerald</name>
        <uri>http://www.optilaw.com</uri>
    </author>
    
        <category term="PHP " scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="format" label="format" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="php" label="php" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-us" xml:base="http://www.websitedesigntutorials.net/">
        <![CDATA[  <p>Now we
                    can learn how to change the output of certain
                    variables. For example if you have variable
                    containing the number 3, what if you want to
                    output it as $3.00, or $0.03 ? How can we do
                    that easily? There are some other cool things
                    we can do but as usual; lets actually view the
                    code and then explain how to do it. There are
                    two commands we start to use here, printf() and
                    sprintf().</p><div class="code">
                      <p class="code1">
                      printf("format",$firstvariable,
                      $secondvariable);<br />
                      $variable = sprintf("format", $variable1,
                      variable2);</p></div>

                    <p class="tom">printf() outputs formatted
                    strings and the sprintf() does the same thing
                    but instead outputs into a variable to be
                    stored and used for later.</p><div class="code">
                      <p class="code1">$variable1 = 'Tom';<br />
                      printf("% says hello",$variable1);</p></div>

                    <p class="tom">Here we have the printf()
                    function you will notice the % tells PHP to
                    output the variable supplied as the second
                    argument to the function. We could stop there
                    but printf() has so many more neat functions,
                    let see. What other things we can add to that
                    lonely %. The syntax is as follows:</p><div class="code">
                      <p class="code1">%<span class="style31">padding</span>-<span class="style33">width</span>.<span class="style35">decimal</span><span class="style36">type</span></p></div>

                    <ul>
                      <li class="tom">The padding is a padding
                      character that we can use to fill in the
                      blanks so to speak with the value we use is
                      smaller than the formatting width specified.
                      (We haven't done that yet). If you don't
                      specify a padding character, no big deal; a
                      space is used.</li>

                      <li class="tom">The - symbol makes the text left
                      justified, if this is not present it will be
                      right justified.</li>

                      <li><span class="tom">The width is the number
                      of characters to pad using the padding
                      character.</span></li>

                      <li><span class="tom">The <span class="code1">decimal</span> is the decimal places
                      to use.</span></li>

                      <li><span class="tom">The <span class="code1">type</span> is the type of value, the
                      command values are <span class="code1">s</span> for string or <span class="code1">f</span> for float (or numbers with
                      decimal places)</span></li>
                    </ul>

                    <p class="tom">For example if the padding
                    character is 0 and the with is 3 and the value
                    is 5 then output would be.</p><div class="code">
                      <p class="code1">001</p></div>

                    <p class="tom">Ok enough of all that, let's see
                    it in action!</p><div class="code">
                      <p class="code1">$paycheck = 250;<br />
                      $newvariable = sprintf("My paycheck is
                      $%03.2f");<br />
                      printf($newvariable);</p></div>

                    <p class="tom">The output would be :</p><div class="code">
                      <p class="code1">$250.00</p></div>

                    <p class="tom">The <span class="codeSmall">$%03.2f</span> is interpreted as
                    follows; the <span class="codeSmall">%</span> says
                    to start outputting the variable. The
                    <span class="codeSmall">0</span> says to pad using
                    variables. The <span class="codeSmall">3</span>
                    says to put <span class="codeSmall">3</span> places
                    <em>to the left of the decimal point</em> and
                    the 2 says to go 2 places <em>to the right of
                    the decimal point</em>.</p>

      <p class="tom"><strong>Other Output
                    Functions</strong></p>

                    <p class="tom">Let's take a look at some other
                    output functions, these are really quick simple
                    examples, starting with Strtoupper().</p><div class="code">
                      <p class="tom"><strong>strtoupper() -
                      Converting to upper case</strong></p>

                      <p class="code1">$newvariable =
                      strtoupper($variable);<br />
                      printf($newvariable);</p>

                      <p class="tom">Takes the $variable and
                      outputs in all uppercase. You can use
                      unfirst() to capitalize only the first letter
                      in the string to uppercase, likewise
                      ucwords() will upper case each word in the
                      string to uppercase.</p>
</div>
<div class="code">

                      <p class="tom"><strong>strtr() - Replacing
                      values</strong></p>

                      <p class="code1">$variable1 = "1 6 3";<br />
                      $newvariable = strtr($variable1,
                      "6","2");<br />
                      printf($newvariable);</p>

                      <p class="tom">This takes <span class="code1">$variable1</span> and reads the
                      string, replacing 6 with 2, then outputs
                      <span class="code1">1 2 3</span></p>
</div>
<div class="code">
                      <p class="tom"><strong>substr() - Returns
                      value inside of string at a specific
                      point</strong></p>

                      <p class="code1">$newvariable =
                      substr("tommy", 2,4);</p>

                      <p class="tom">Reads "hello" and returns
                      everything from the 2nd character to the 4th
                      character. Outputting:</p>

                      <p class="code1">mmy</p>
</div>
<div class="code">
                      <p class="tom"><strong>substr_count() -
                      Counts number of times a given item is in a
                      variable</strong></p>

                      <p class="code1">$variable1 = "tom 123 tom
                      123 tom 123";<br />
                      $find = "tom";<br />
                      $numberoftimesfound =
                      substr_count($variable1, $find);</p>

                      <p class="tom">In this case the variable
                      <span class="codeSmall">$numberoftimesfound</span> would have
                      a value of 3 because it found <span class="codeSmall">tom</span> 3 times in <span class="codeSmall">$variable1</span>.</p></div>

                    <h2">Using Date Format

                    <p class="tom" style="text-indent:25px">Ok now
                    we did some cool stuff, let's see how simple it
                    is to use the date since that is used very
                    heavily in most PHP applications. Like almost
                    everything else in PHP, accessing the current
                    date is very easy, let's take a look.</p><div class="code">
                      <p class="code1">$today = date("d/m/y");</p></div>

                    <p class="tom">Would give the $today variable a
                    value of 04/01/2006. Very easy! :)</p></h2">]]>
        
    </content>
</entry>

<entry>
    <title>PHP Hello World</title>
    <link rel="alternate" type="text/html" href="http://www.websitedesigntutorials.net/2009/08/php-hello-world.html" />
    <id>tag:www.websitedesigntutorials.net,2009://42.324</id>

    <published>2009-08-11T02:35:12Z</published>
    <updated>2009-08-09T02:56:05Z</updated>

    <summary> This will be a really easy starter tutorial and will go over how to create a Hello World PHP application. I&apos;ll be doing a few of these easy starter tutorials then grow from there. We&apos;ll be doing PHP, Python...</summary>
    <author>
        <name>Tom Fitzgerald</name>
        <uri>http://www.optilaw.com</uri>
    </author>
    
        <category term="PHP " scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="helloworld" label="hello world" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="php" label="php" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-us" xml:base="http://www.websitedesigntutorials.net/">
        <![CDATA[ <p>This will be a really easy starter tutorial and will go over how to create a Hello World PHP application. I'll be doing a few of these easy starter tutorials then grow from there. We'll be doing PHP, Python &amp; Ruby on Rails. So let's get started with PHP. I'm assuming you already have PHP installed.</p>

                    <p class="tom">Whatever text editor you use; type
                    this data into the file.</p>

                    <div class="code">
                      <p class="code1">&lt;html&gt;<br />
                      &lt;head&gt;<br />
                      &lt;title&gt; PHP
                      Tutorial&lt;/title&gt;<br />
                      &lt;/head&gt;<br />
                      &lt;body&gt;<br />
                      &lt;p&gt;This is only a test&lt;/p&gt;<br />
                      &lt;?php<br />
                      echo "&lt;p&gt;...from PHP&lt;/p&gt;";<br />
                      ?&gt;<br />
                      &lt;/body&gt;<br />
                      &lt;/html&gt;</p>
                    </div>

                    <p class="tom">Save it as test.php, then upload
                    it to your web server.</p>

                    <p class="tom">Access the web site in your web
                    browser and you should see the following
                    output:</p>

                    <blockquote>
                      <p class="code1">This is only a test<br />
                      <br />
                      ...from PHP</p>
                    </blockquote>

                    <p class="style4">And there you have it! Easy
                    wasn't it?</p>

                    <p class="h1"><strong>Line by Line
                    Explanation</strong></p>

                    <p class="style4">Basically the only line that
                    has to do with PHP is the one that says :</p>

                    <div class="code">
                     &lt;?php<br />
                      echo "&lt;p&gt;...from PHP&lt;/p&gt;";<br />
                      ?&gt;<p></p>
                    </div>

                    <p class="tom">The <span class="codeSmall">&lt;?php</span> part means to start
                    interpreting the following as PHP not HTML. The
                    <span class="codeSmall">echo "&lt;P&gt;...from
                    PHP&lt;/p&gt;";</span> means to echo (display)
                    the code <span class="codeSmall">&lt;p&gt;...from
                    PHP&lt;/a&gt;</span> which of course is
                    standard HTML. The quotes are necessary as the
                    trailing ; to show the end of the line.</p> ]]>
        
    </content>
</entry>

<entry>
    <title>Flash backwards compatible</title>
    <link rel="alternate" type="text/html" href="http://www.websitedesigntutorials.net/2009/08/flash-backwards-compatible.html" />
    <id>tag:www.websitedesigntutorials.net,2009://42.330</id>

    <published>2009-08-10T03:41:19Z</published>
    <updated>2009-08-09T03:43:13Z</updated>

    <summary> Writing Flash programs can be challenging because not all web browsers and computers are the same. Flash provides a quality presentation most of the time everything works fine on different platforms as long the Flash plug-in is installed. But...</summary>
    <author>
        <name>Tom Fitzgerald</name>
        <uri>http://www.optilaw.com</uri>
    </author>
    
        <category term="Adobe Flash" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="adobe" label="adobe" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="backwards" label="backwards" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="compatible" label="compatible" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="flash" label="flash" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-us" xml:base="http://www.websitedesigntutorials.net/">
        <![CDATA[  <p class="tom">Writing Flash programs can
                    be challenging because not all web browsers and
                    computers are the same.  Flash provides a
                    quality presentation most of the time
                    everything works fine on different platforms as
                    long the Flash plug-in is installed. But what
                    if you write an application for Version 8 and
                    the viewer has Version 7?  The short answer: it
                    is a debacle.  The Flash quality we have lauded
                    here disappears in a flash (no pun
                    intended).</p> ]]>
        <![CDATA[<p class="tom" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.75em; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-weight: normal; ">What is the solution? With a little ingenuity, the Flash player version can be readily identified and then the content for the user can be tailored based on the version that the end user has. This technique of designing Flash has been a real difference maker for our clients. Our designers have seen too many web sites where this Flash has not been used, leading to disastrous consequences for often unwitting client that does not realize the problem because the web site looks just fine on the client's browser who has Version 8. Our web designers have also seen too many web sites where a older version is recognized by the web site which directs the user to Macromedia's site to get the latest version. How many end users are going to go through the process of loading new software just to view the web site? Certainly, some will but some will not, and this means lost customers for the client. Admittedly, this approach is sometimes required for some full Flash web sites for technical reasons that need not be addressed here but but if you are using Flash as a single weapon in a larger arsenal as our web site designers typically do, then this technique will suit provide a far better outcome for the client.</p><p class="tom" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.75em; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-weight: normal; ">Now, on to the technical explanation of how this technique is developed. In the example illustrated below, we have created two frames, in the first frame has the static image for an older player that cannot handle Version 8's animation, and anti-aliased for text features. So then in frame number 2, we put in the movie clip with the sophisticated animation imagery that Version 8 can receive.</p><h2>Step by Step</h2><p class="tom" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.75em; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-weight: normal; ">From there, in the first frame, we put the following into the Action Frame (Hit F9 if it's not visible).</p><div class="code"><p class="code1" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.75em; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-weight: normal; ">playerVersion = System.capabilities.version;<br />temp = substring(playerVersion, 5, 1);<br /><br />if(temp &gt;= 8) {<br />play();<br />} else {<br />stop();<br />}</p></div><p class="tom" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.75em; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-weight: normal; ">To explain what this does; line by line.</p><div class="code"><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.75em; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-weight: normal; "><span class="code1">playerVersion =&nbsp;<span class="style42">System.capabilities.version;</span></span></p></div><p class="tom" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.75em; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-weight: normal; ">This references the System.capabilities.version variable and stores it into a variable we created called playerVersion. The value of player version is now ...</p><div class="code"><p class="code1" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.75em; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-weight: normal; ">WIN 8,0,22,0</p></div><p class="tom" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.75em; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-weight: normal; ">Easy enough, but we are not home yet. We need to get the major version number (Version 8 in this case) so we can do an 'if..then' statement. So now onto the next line.</p><div class="code"><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.75em; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-weight: normal; "><span class="code1">temp =&nbsp;<span class="style42">substring</span>(playerVersion, 5, 1);</span></p></div><p class="tom" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.75em; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-weight: normal; ">This uses the substring function and references the playerVersion variable. It then takes the fifth letter and stores it in the variable temp. The "...5,1)" means to take the fifth character and the 1 means to only take 1 character. So now we have the major version number in a variable.</p><div class="code"><p class="code1" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.75em; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-weight: normal; ">if(temp &gt;= 8) {<br /><span class="style42">play</span>();<br />}&nbsp;<span class="style42">else</span>&nbsp;{<br /><span class="style42">stop</span>();<br />}</p></div><p class="tom" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.75em; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-weight: normal; ">Now we say essentially iIf the version is 8 or higher, move to frame two, if it is less than Version 8, stay on the first frame. This will enable us to have the basic image on the first frame and the high tech stuff on the second frame.</p>]]>
    </content>
</entry>

<entry>
    <title>Change DIV with JavaScript</title>
    <link rel="alternate" type="text/html" href="http://www.websitedesigntutorials.net/2009/08/change-div-with-javascript.html" />
    <id>tag:www.websitedesigntutorials.net,2009://42.329</id>

    <published>2009-08-09T03:28:41Z</published>
    <updated>2009-08-09T03:35:47Z</updated>

    <summary><![CDATA[ This is a really basic example on how to change the contents of a &lt;DIV&gt; tag using JavaScript. I've used this in other examples but really wanted to spell it out here so everyone knows how easy it is....]]></summary>
    <author>
        <name>Tom Fitzgerald</name>
        <uri>http://www.optilaw.com</uri>
    </author>
    
        <category term="JavaScript / jQuery" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="change" label="change" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="div" label="div" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="javascript" label="javascript" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-us" xml:base="http://www.websitedesigntutorials.net/">
        <![CDATA[   <p class="tom" style="text-indent:25px"> This is a really basic example on how to change the contents of a &lt;DIV&gt; tag using JavaScript. I've used this in other examples but really wanted to spell it out here so everyone knows how easy it is. Let's begin with some simple code.</p>]]>
        <![CDATA[<div><br /></div><div><p class="tom" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.75em; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-weight: normal; "><strong>Line by Line</strong></p><div class="code"><p class="code1" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.75em; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-weight: normal; ">&lt;html&gt;<br />&lt;head&gt;<br />&lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"&gt;<br />&lt;/head&gt;<br />&lt;body&gt;<br />&lt;title&gt;CCE's Simple Tutorial &lt;/title&gt;<br /><br /><span class="style42">&lt;a href="#" onclick="ChangeText();"&gt;</span><strong>Click here to change the below text<span class="style46">&lt;/a&gt;</span></strong><br /><span class="style42">&lt;div id="changeme"&gt;<span class="style30">This is the text we want to change</span>&lt;/div&gt;</span><br /><br />&lt;/body&gt;<br />&lt;/html&gt;&nbsp;<br /></p></div><p class="tom" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.75em; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-weight: normal; ">Ok so that is the code so far, the &lt;DIV&gt; tag has some text in there, now let's learn how to change it. The above link says that when the user clicks on the test to activate the ChangeText function. The below code defines that and needs to go anywhere above our &lt;DIV&gt; tag.</p><div class="code"><p class="code1" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.75em; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-weight: normal; "><span class="style43">&lt;script language="javascript"&gt;</span><br /><br />function ChangeText() {<br /><br />document.getElementById("changeme").innerHTML = "This is what we replaced it with.";<br />}<br /><span class="style43"><br />&lt;/script&gt;</span></p></div><p class="tom" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.75em; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-weight: normal; ">The ChangeText function, uses&nbsp;<span class="code1">document.getElementById("changeme")</span>&nbsp;creates a object so we can modify it, we just give it our id name of 'changeme'. Then we change the properties of the element innerHTML and change it to whatever text we want. Very easy.</p><p class="tom" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.75em; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 1em; font-weight: normal; "><a href="http://www.ccexperts.com/developers/javascript/change-div-using-javascript-test.html" style="text-decoration: underline; "><strong>See it in action</strong></a></p></div>]]>
    </content>
</entry>

<entry>
    <title>Installing Python &amp; Hello World</title>
    <link rel="alternate" type="text/html" href="http://www.websitedesigntutorials.net/2009/08/installing-python-hello-world.html" />
    <id>tag:www.websitedesigntutorials.net,2009://42.323</id>

    <published>2009-08-08T22:39:03Z</published>
    <updated>2009-08-09T03:38:11Z</updated>

    <summary> In this tutorial we&apos;ll go over how to install Python on your Windows PC and a quick &apos;Hello World&apos; application. First download Python and run the setup - agree to all prompts. Easy. That&apos;s it! Python is now installed....</summary>
    <author>
        <name>Tom Fitzgerald</name>
        <uri>http://www.optilaw.com</uri>
    </author>
    
        <category term="Python" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="install" label="install" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="python" label="python" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en-us" xml:base="http://www.websitedesigntutorials.net/">
        <![CDATA[ <p>In this tutorial we'll go over how to install Python on your Windows PC and a quick 'Hello World' application. </p>
<ol>
<li>First <a href="http://www.python.org/ftp/python/2.6.2/python-2.6.2.msi" target="_blank">download Python</a> and run the setup - agree to all prompts. Easy.</li>
<li>That's it! Python is now installed. Open up notepad and paste in the following code</li>
</ol>
<div class="code">
print 'Hello world'<br />
</div>
<p>Save it as hello.py, and just open a command prompt and run the script like this</p>
<div class="code">C:\&gt; hello.py
</div>
<p>Then you will see Hello World! It's great and simple. Next time we'll do some more advanced stuff, had to start somewhere.</p>]]>
        
    </content>
</entry>

</feed>
