Javascript: Change text colour dynamically

November 24th, 2008 by admin

In the wake of my previous post “Javascript: Changing background colour dynamically“, I am going to put together a similarly styled post with the same method of control. Our aim is to allow users to be able to change the colour of the text on the page by clicking an image or a link. Just the same way we allowed them to change the background colour, An example of which can be found here or in the previous post itself.

As we are doing this in Javascript, the first thing we have to do is import our Javascript file again in the header, so we can add our functionality. As we already covered this in the previous post I will just give you the code here to copy and paste or to download as a text file.

1
2
3
4
5
6
7
<head>
 
    <title>Changing Text Colour</title>
 
    <script style="text/javascript" type="text/javascript" src="javascript.js">
 
</script></head>

In the example above, our page is called “Changing Colour”, our Javascript file is called “javascript.js and is stored in the same folder as our page. Also, we don’t have a css file but that’s not important for this example.

Ok once again we will work on our Javascript file first. Create a new file called “javascript.js” and Read the rest of this entry »

, , , , , , , , , , , , , , , , , , , , , , ,

Micro-Blogging: Time-saving tip.

September 28th, 2008 by Ian O'Donnell

I have no idea how many of you do or do-not use Micro-Blogging or Social Networking tools such as Twitter, Jaiku and Facebook to begin with but that is another story for another day. This tip is something I have been trying to do for a long time (Read: Thinking about doing) and this evening I finally put finger to key and got it sorted and was pleasantly surprised at how simple it was.

Ok back to my main point, anyone who is a big micro-blogger and many others besides I am sure, have used tinyURL or a similar service to shorten an ugly URL into a publicly presentable one e.g. the search results for “just an example please”:

http://www.google.ie/search?q=just+an+example+please&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-GB:official&client=firefox-a

and after being Read the rest of this entry »

, , , , , , , , , , , , , , , , , , , , , , , ,