Tuesday, January 29, 2008

java script Bloggs

Use of Java Script for the text change event.

script type="text/javascript"
function findEmail() {
var areacode = document.getElementById("areacode").value;
var phone = document.getElementById("phone").value;
document.getElementById("tmo").innerHTML = areacode + phone + "@tmomail.net";
document.getElementById("cin").innerHTML = areacode + phone + "@mobile.mycingular.com";
document.getElementById("spr").innerHTML = areacode + phone + "@messaging.sprintpcs.com";
}
script
calling the Java Script function:-

<table class="content-table">
<tr><th>Carrierth><th>Maximum sizetr>
<tr><td>T-Mobilespan>td>td>
<td align=center><span id="cin">2402345678@mobile.mycingular.comtd><td>160 characterstr>
<tr><td>Sprint PCSspan>td>table><p>
Change the recipient's phone number : 1-
<input name="areacode" id="areacode" onkeyup="findEmail()" maxlength=3 size=4 value=240>
<input name="phone" id="phone" onkeyup="findEmail()" maxlength=7 size=10 value=2345678>
<input type="button" value="find email address" onclick="findEmail