Archive for January, 2008

Anonymous Love Is All Around..

Posted by Andy Bailey at 15 January, 2008, 11:29 pm
2

I got in the good books today after posting an anonymous message on a new website called 1 million love messages. My missus got all warm and fluffy when she saw my message.

It’s a great idea, that being to have one place to do one thing, spread the love and make a difference to peoples lives with 3 simple words.

I saw the reaction to my message and I can confirm that love does mean a lot even if it’s as an anonymous message that only the recipient would realize is about them.

Give it a go yourself and tell someone what everyone needs to hear now and then..

1 mil love

Popularity: 10% [?]

Category : Blog News

Better than affiliate links

Posted by Andy Bailey at 12 January, 2008, 5:36 pm
21

gift wrap+Shopping cart=£££?

I tried out some affiliate links and reviews on this blog before and even just a couple of reviews had click thru’s that ended in purchases. My review of my Three Skype Phone has generated 30 quid in commission so far (60 USD) and my Tefal Quick Cup Review had 7 purchases. Google adsense isn’t very prevalent, I put a block on some of the popular posts and a small banner below the related links on a single post. That’s not brought in very much at all so I think I’ll chuck that out eventually.

Instead of affiliate links, I’ve decided to start selling some items on this blog, it’s getting a fair bit of UK traffic and I have a good source of stock from an auction and a ‘job-lot’ selection of electronic things. Some were a bit useless but there are some good portable speakers and headphones in there that should sell. My missus wants to try selling some items too, she does some wonderful Chinese characters for good luck sayings and traditional charms which look wicked good in a wooden frame.

I’m going to use the Wordpress shopping cart plugin from Instinct because it allows you to start small. You don’t have to go to great lengths to setup an entire themed site like you would with ZenCart or oScommerce scripts. I can set up the plugin and add just one product within a couple of hours. Probably even quicker but I’m such a tweaker that I can’t help try every combination of option!

I think it’s worth a go, I’ve got a company that I could use the stock for but I think seeing as I bought this myself and not through my company, I can have an experiment to see if any of it can move through here, I’d be interested to hear about any of your experiences if you have sold items direct from your own blog or site. (a chance to plug your site in the comments if you do!)

My blog name kind of works nicely into this idea it’s a nice memorable name just on it’s own but to add a memory hook to it I am pretty sure I’ll be doing UK postage at FiddyP (50p) for any item regardless of size, this makes it much easier for a buyer to know how much they’ll pay at the checkout as well as being the theme of the site. oh how convenient! 8-)

Of course, all the regular stuff will be going on as well like the AJAX tutorials, other hand step throughs and whatever else happens in my head which I think is worth sharing..

I’m working all weekend so I’ll get on with it and see if I can’t have my first product on sale by Tuesday.. yey!

Popularity: 11% [?]

Category : Blog News | Making / Made Money | ecommerce

by golly I feel awful

Posted by Andy Bailey at 9 January, 2008, 2:00 pm
19

Sneeze
Source

I caught a cold last week and it’s just moved on to the coughy coughy stage which is killing me! I’ve got to work all through this phlegm (great word!) and try and portray a happy go lucky person who just so happens to sound like a stoned Darth Vader :-)

No matter though because I notice I have gone sub 90k on my Alexa rank, Technorati authority is up near 300 and there have been quite a few click-thru’s on my uVme ads so, not too bad considering…

Because of my extended man-cold (an extreme version of flu that only the male of the species gets), I haven’t been up to making any decent posts, even my drafts that I usually keep for such occasions have dried up (plenty of titles, no content though). It’s a shame because I have some super ideas for posts and for the life of me I cannae be bovvered at all, luckily I don’t charge an entrance fee for this blog because I’d have to start issuing refunds!

I’ll get some quality stuff up soon like how to make a countdown button with php (see the 125×125 button at the top), create some AJAX Stumblebait, update CommentLuv to use AJAX and generally lark about with words and stuff….

now where’s the Lemsip?….

Popularity: 9% [?]

Category : Blog News

The Binary Cake

Posted by Andy Bailey at 8 January, 2008, 12:02 pm
35

Here’s a crappy geek cartoon I made on a napkin while I waited for a meeting…

Binary Cake

If you don’t get it then out of the 10 types of people there are, you are the type that doesn’t understand binary. (double geek groan pun!)

Popularity: 48% [?]

Category : Funnies

Beginners AJAX Tutorial Series Part 5

Posted by Andy Bailey at 4 January, 2008, 12:17 pm
19

AJAX Avenue

This is part 5 of the AJAX Tutorial Series.
You can see the other Beginners AJAX Tutorials here.

Hurrah! this tutorial will actually download some data (yey!) We will use everything we have learned so far and add just a little bit that will allow us to download data from the server and put it somewhere on the page without a refresh. (I know, you must have goosebumps!) :-)

XMLHttpRequestObject.send(null);

We need this command to initiate the object send. We created an object, created a place for the data to go, we created a routine to wait patiently for the object to be ready and sent the object to the data source using the above command. The patient routine for the waiting will take the response to the data source and put it in the div we created in the HTML of the page.

We can replace the bit from the last bit of complete code (on part 4) with this command and instead of it saying it's ready to download, it will actually do the fetching for the obj.innerHTML=XMLHttpRequestObject.responseText; which is called when the readyState and Status are ok.

HTML:
  1.     <title>FiddyP AJAX Tutorial Series Part 5</title>
  2.     <script language = "javascript">
  3.       var XMLHttpRequestObject = false;
  4.       if (window.XMLHttpRequest) {
  5.         XMLHttpRequestObject = new XMLHttpRequest();
  6.       } else if (window.ActiveXObject) {
  7.         XMLHttpRequestObject = new ActiveXObject("Microsoft.XMLHTTP");
  8.       }
  9.       function getData(dataSource, divID)
  10.       {
  11.         if(XMLHttpRequestObject) {
  12.           var obj = document.getElementById(divID);
  13.           XMLHttpRequestObject.open("GET", dataSource);
  14.           XMLHttpRequestObject.onreadystatechange = function()
  15.           {
  16.             if (XMLHttpRequestObject.readyState == 4 &&
  17.               XMLHttpRequestObject.status == 200) {
  18.                 obj.innerHTML=XMLHttpRequestObject.responseText;
  19.             }
  20.           }
  21.        XMLHttpRequestObject.send(null);
  22.         }
  23.       }
  24.     </script>
  25.   </head>
  26.     <H1>Fetching data with Ajax</H1>
  27.     <form>
  28.       <input type = "button" value = "Display Message"
  29.         onclick = "getData('oranges.txt', 'targetDiv')">
  30.     </form>
  31.     <div id="targetDiv">
  32.       <p>The fetched data will go here.</p>
  33.     </div>
  34.   </body>
  35. </html>

I'll try and make this code easier to understand with a picture using pretty colours! :-)
Part 5 AJAX picture

The blue bit gets called when the user clicks the button, if the object was successfully created then create a routine that 'listens' to the objects readyState and status. Then the XMLHttpRequestObject.send(null); command does the action and when that goes ahead and activates XMLHttpRequestObject.open("GET", dataSource); which goes off and gets the data pointed to by dataSource which of course changes the objects status and readyState. When it is at what we want, we inject the responseText to the div pointed to by divID.

Simple! :-/

You can see it in action here

Exciting huh? LOL . It'll display anything that is in the oranges.txt file, not much use yet but at least we know we can fetch data!

What if, instead of displaying the contents of a text file, we used a php script to 'echo' out something?.. replace oranges.txt with this code..

PHP:
  1. echo "these are some oranges created by php!";
  2. echo "<br/>ooooooooooooooooooooooooooooooooo";
  3. ?>

(don't forget to enclose any php script with <?php and ?> or it wont work - I cant put them in here otherwise it will run the script instead of showing the code. Also, change the onclick event in the html to call oranges.php (if you saved the php with that name) instead of oranges.txt

You can see that in action here

There may be a pause between you clicking and the message being displayed. We can let the user know that something is happening by adding another if condition to look for a readyState of 1 (loading) and displaying the message "off to get oranges..." like this..

HTML:
  1. if (XMLHttpRequestObject.readyState == 1)
  2. {
  3.     obj.innerHTML="off to get oranges...";
  4. }

we just chuck that into the anonymous function that is called when the readyState changes...

HTML:
  1. XMLHttpRequestObject.onreadystatechange = function()
  2.           {
  3.             if (XMLHttpRequestObject.readyState == 4 &&
  4.               XMLHttpRequestObject.status == 200) {
  5.         obj.innerHTML=XMLHttpRequestObject.responseText;
  6.  
  7.             }
  8.         if (XMLHttpRequestObject.readyState == 1)
  9.         {
  10.         obj.innerHTML="off to get oranges...";
  11.         }
  12.           }

See that in action here

You can download all the files used in this tutorial here.

Now we're getting somewhere! But, what if we want to send data to the php file so it can do something more than print a hardcoded message?
Actually, it's quite easy! come back next week to see the final part where we'll send something to the php file and have it send back something it made with what we sent. (it could be a username or contents of a text field - think form validation!)

You can subscribe to my feed with the button at the top right of this blog or add your email to the box on the sidebar of the main page to subscribe by email. I hope you can come back and learn a bit more, enough at least to make your own php script and AJAX page....

Popularity: 10% [?]

Category : Code | PHP | ajax

3 day lazy period is due to finish. grr

Posted by Andy Bailey at 2 January, 2008, 8:15 pm
12

Lazy!

I've just had 3 entire days of complete vegetation and it was as grrrrreeeaat as a bowl of Frosties. I played games, smoked an awful lot, played the xbox! and even had a drink or three.

Lucky me! but, now I have to get ready to go back to work tomorrow morning :-(

I'm gearing myself up to normal hours, normal intakes of liquid and I'll have to go back in the car again, I've avoided that for a few days and it was nice and relaxing not having to drive through Londons' traffic.

At least there should be some more frequency to my blog posts and looks like the AJAX tutorial series part 5 will be done before the weekend is out. I'm getting a lot of traffic on those posts and some nice comments as feedback so I'm looking forward to getting part 5 done and introducing some cute scripts that can be useful for the beginner...

Happy new year and rock on! (dudes) :-)

Popularity: 4% [?]

Category : Blog News

Just 20 minutes to go until 2008 (uk)

Posted by Andy Bailey at 1 January, 2008, 12:43 am
11

winner champagne

Just wanted to say Happy New Year 2008 to everyone!

Popularity: 3% [?]

Category : Blog News
7 online now
the most online was 176
elottery magnetic Sponsoring
Sponsors
available ad space available ad space available ad space available ad space available ad space available ad space