Jun
20th

Create URL Redirection With HTML Redirect

Files under HTML & CSS | 4 Comments

Do you know how to use HTML redirect to send your visitors to another page automatically? If you need to redirect your visitors to a new page, then this HTML redirect code may help you to do so.

When doing web site, there’s possibility that you may change the url of a web page. If your web page is popular, then your visitors may have already linked to it. However, if your webpage still new then it is recommended to replace your page with a new page that will redirect your visitors to the new page. This is to prevent you from losing your traffic.

Place this code inside the head section of your HTML code:

<meta http-equiv =”refresh” content=”0; url=http://www.yourdomain.com/”>

The parameters:

The “http-equiv” parameter set to “refresh”. This parameter tells the browser the content must be refreshed.

The “content” parameter defines when to refresh the content. The content=”0; is a delay before the redirection is performed. This time interval is in seconds.

Besides that, you can define your alternative url here. If the content has no url then your page will be simply refreshed. However, if you define an url, then the url will be displayed after the delay has over.

Example:

<html>
<head>

<meta http-equiv=”refreshcontent=”3;url=http://www.imDavidLee.com“>

</head>
<body>
This page will be redirected in 3 seconds!
</body>
</html>

The redirecting page will be displayed during 3 seconds. After 3 seconds delay, it will be replaced by “http://www.imDavidLee.com“.

(more…)

Jun
13th

How To Create Calculator Using Actionscript

In this Tutorial, I will teach you how to create a basic flash calculator with simple Actionscript. This tutorial is very simple and easy to understand, this is to ensure that newbie can follow.

Steps On Creating Flash Calculator Using Actionscript

Step 1: Create 2 Input Text
On frame 1, create this 2 input text, which is for user to key in their value, and then set the var to val1 and val2 respectively.
Flash calculator

Step 2: Create 1 Dynamic Text
Same as 1st step, on the first frame, create 1 dynamic text, which is for displaying result. Set the var to output.

Flash calculator

Step 3: Create An Empty Movie Clip
This is to make your calculator more sophisticated, you just add a empty movie clip which will show recently performed action by showing it symbol between the two values. Then, named it as “action“.

Then, click on the empty movie clip, leave the first frame as blank and then insert 5 keyframes, create basic arithmetic symbol on each frame and click on the each keyframe and label it accordingly. And, you need to give it a stop for each frame, just press F9 for each frame, insert the stop();

Photobucket

Step 4: Create 4 Operators (+ – x /) and Reset Button
(more…)

Jun
6th

Currency Converter In Javascript

Files under Javascript | 15 Comments

If you need help to create a currency converter by using JavaScript, then this is my basic sample for you to do:

currency_converter

Limitation:

- You need to edit the code and update the currency value from time to time as it does not subscribe to rates feed and use the server side solution to provide accurate and up to date currency conversion.

First, create HTML Code that contain the flag image which represent country currency and textbox for user to key in the value to convert

Create outer table that contains the instruction for user and inner table that display all the country flag, country name and textbox. Using table is more efficient since it can ensure proper alignment most of the time.

My Coding Part:

(more…)