E nter a number and this script will write it out in plain English. Your number can be up to 303 digits long.
W e have tested the code in IE6.0, Firefox1.0.7, Opera8.51, Netscape7.02, Netscape8.0.4 and AOL Explorer1.2. This script worked well in all platforms with one variation observed in Firefox1.0.7, Opera8.51, Netscape7.02 and Netscape8.0.4.
D epending on your knowledge of HTML and javascripts, this is an easy one part copy and paste code that goes in the <BODY> section of your document wherever you want it to appear. It has no visible reconfigurations* other than the size of the form itself.
* There are no reconfigurations to be made to the code itself but.........if you enter a large number to be pronounced, you will notice that the material below the effect moves to compensate for the added text. A workaround for this little annoyance and to boost the level of professionalism of your site, is to place this effect on a separate page and then place it inside an "I" frame* on the page you want the effect to appear. This will solve the problem of the material below your effect moving to compensate for the larger numbers inserted. If you would grab the below link, you will see what we are talking about having the material move below the effect to compensate for the added text.
A s we said earlier, the only basic reconfiguration is that of the size of the form itself. See below:
Default Configuration
<fieldset>
<legend> Number Pronunciator </legend>
<div style="padding: 10px;">
<input name="num" type="text" value="100" style="font-family:Tahoma;font-size:8pt;width:200px;" maxlength="315">
Definitions of different Reconfigurations
Little Extra Not Included In The Script:
If you notice in our example, the words when clicked disappears. This is not part of the script but is called "Automatic Form Field Clearing" effect. If you would like to add this little trick into the script, it is quite easy. It is a two part copy and paste code that goes in the <HEAD> section and the other part goes directly into the form box itself. See below:
<!------ Start <Head> Section Of Code ------>
<script language="Javascript">
<!--
function doClear(theText) {
if (theText.value == theText.defaultValue) {
theText.value = ""
}
}
//-->
</script>
<!------ End <Head> Section Of Code ------>
T he second or last part, as we said goes directly into the form box itself. See below example of howto:
Default Form Field Without Code
<input name="num" type="text" value="100" style="font-family:Tahoma;font-size:8pt;width:40%;" maxlength="315">
Reconfigured Form Field Code
<input name="num" type="text" value="100" style="font-family:Tahoma;font-size:8pt;width:40%;" maxlength="315" onFocus="doClear(this)">
I
n other words, insert the below section of code directly into the textarea form box
onFocus="doClear(this)"
The last thing we shall cover is the "Reset" button. Again this is not part of the script but by adding it into the script, it elevates the level of professionalism you and your site are projecting. See the below example of where and howto:
Default Configuration With "No Reset" Button
<legend> Number Pronunciator </legend>
<div style="padding: 10px;">
<input name="num" type="text" value="Enter Your Number Here" style="font-family:Tahoma;font-size:8pt;width:500px;" maxlength="315"onFocus="doClear(this)">
<input type="submit" value="Say" style="width:80px;font-family:Tahoma;font-size:8pt;">
Reconfigured Configuration With "Reset" Button
<legend> Number Pronunciator </legend>
<div style="padding: 10px;">
<input name="num" type="text" value="Enter Your Number Here" style="font-family:Tahoma;font-size:8pt;width:500px;" maxlength="315"onFocus="doClear(this)">
<input type="submit" value="Say" style="width:80px;font-family:Tahoma;font-size:8pt;">
<input type="reset" value="Reset"style="width:80px;font-family:Tahoma;font-size:8pt;">
I
n reality, all we actually did was to add the below line of code which denotes a reset button into the script to make it revert to the "Add Your Number Here" text inside the form.
<input type="reset" value="Reset"style="width:80px;font-family:Tahoma;font-size:8pt;">
G o ahead and type in some numbers in the above example and see how it works. We have deactivated the "Say" button for this tutorial for obvious reasons. Reason being since this little example is not connected to the rest of the script, if it would activate by clicking, it would take you off this page. So we deactivated the button.
* [ Return Whence You Came ]
Early on in this tutorial we said something about an "I" Frame and how to use it as a work around to stop the material below the effect to stop moving. Well......Basically all you need to do is build a new page (HTML document) with nothing on it but the code for this effect. Then on the page you want the effect to appear, just insert a defined Iframe and call the page that you just built with the effect on it. If it sound complicated, it really isn't. See the below and it should clear things up.
Below Is The Code For An IFrame
<p><IFRAME SRC="URL To Page*"height="100" width="410" scrolling="auto"align="left"marginheight="0"></IFRAME></div></p>
* This is the URL of the new page you have just built with nothing on it but the code for the Number Pronunciator.
B elow we have the effect sitting in an Iframe. What you are seeing is how the effect will look from the default code without any reconfigurations.
T he below code is that of the above Iframe, the configurations and the URL it is calling.
<p><IFRAME SRC="https://www.angelfire.com/ny5/consigliere/pronunciator3.html"height="160" width="325" scrolling="auto"align="center"marginheight="0"></IFRAME></div></p>
I
f you would like to learn more about Iframes, grab the below link and you are there.
[ More About IFrames ]
I f you noticed the Iframes all have a closing </div> tag. This is needed for positioning of material either alongside or below the Iframe. To learn more about positioning of material associated with an Iframe, grab the above link and you are there.
For your Information: If you are going to place this effect inside an IFrame, the configuration for size should be that of px as opposed to a %. Reason being is quite simple. The default configurations within the effect itself are defined as a px size. If you would to change the size settings to that of percentage(to make it appear the same in all monitors) Once you add it into an Iframe, the size will not appear correctly because there is a conflict between the % and the px size of the Iframe itself.
W
e hope our tutorial was easy to follow and we covered everything in detail. If you would like to add this effect into your pages, grab the respective below link and you are there. If you have any problems with this or anything else, feel free to consult our [ FAQ ] and if you can't find the answer there, [ contact us ].
[ Get Code Here ]
[ Rate This Page ]
Search Our Site By Individual letter
[ A ]
[ B ]
[ C ]
[ D ]
[ E ]
[ F ]
[ G ]
[ H ]
[ I ]
[ J-K ]
[ L ] |
Little Tips Directory [ Page 1 ] [ Page 2 ] [ Page 3 ] [ Page 4 ] [ Page 5 ] [ Page 6 ] [ Page 7 ] |
[ Index Page 1 ]
[ Index Page 2 ]
[ Index Page 3 ]
[ Index Page 4 ]
[ Index Page 5 ] [ Index Page 6 ] [ Index Page 7 ] [ Index Page 8 ] [ Index Page 9 ] [ Index Page 10 ] [ Index Page 11 ] [ Index Page 12 ] [ Index Page 13 ] [ Form Index ] [ 2001 ] [ 2002 ] [ 2003 ] [ 2004 ] [ 2005 ] [ 2006 ] [ 2007 ] [ Disclaimer ] [ News Letter Archives ]
[ Navigation Page ]
[ Archives Of Published Material ] |
If you are part of the ever growing number of webmasters who enjoy
sharing your knowledge with others on web design, join The
Consigliere Ltd. web ring to broaden your scope of exposure.
Join Today
This Site Was Built And Is Maintained Exclusively by
The Webmaster @ Consigliere Ltd.
Copyright © Consigliere Ltd., All Rights Reserved. 2001-