...

View Full Version : Urgent Help Please: Numerical VirtualPad



matsuka
09-26-2012, 08:11 AM
I try to make a numerical virtual pad. The below code is working properly, but the only missing part is the "backspace delete" button. I really appreciate if you help me about this detail, because i have to complete this app. as soon as possible.




<html>

<head>
<style type="text/css">
.style11 {
color: #FFFFFF;
}
.style92 {
font-family: Calibri;
font-size: small;
}
</style>

</head>

<body>

<script language="javascript">
function klavye(veri)
{ document.getElementById('kutucuk').value=kutu=document.getElementById('kutucuk').value + veri

}
</script>

<center>
<input type="text" id="kutucuk" readonly="readonly" style="width: 131px; height: 35px">

<span class="style11">
<input name="1" type="button" value="1" onclick="klavye('1');" location.href="#" style="height: 37px; width: 43px; color: #000080; font-weight: bold; background-color: <%=COLOR%>" class="style92" />
<input name="2" type="button" value="2" onclick="klavye('2');" location.href="#" style="height: 37px; width: 43px; color: #000080; font-weight: bold; background-color: <%=COLOR%>" class="style92" />
<input name="3" type="button" value="3" onclick="klavye('3');" location.href="#" style="height: 37px; width: 43px; color: #000080; font-weight: bold; background-color: <%=COLOR%>" class="style92" />
<input name="4" type="button" value="4" onclick="klavye('4');" location.href="#" style="height: 37px; width: 43px; color: #000080; font-weight: bold; background-color: <%=COLOR%>" class="style92" />
<input name="5" type="button" value="5" onclick="klavye('5');" location.href="#" style="height: 37px; width: 43px; color: #000080; font-weight: bold; background-color: <%=COLOR%>" class="style92" />
<input name="6" type="button" value="6" onclick="klavye('6');" location.href="#" style="height: 37px; width: 43px; color: #000080; font-weight: bold; background-color: <%=COLOR%>" class="style92" />
<input name="7" type="button" value="7" onclick="klavye('7');" location.href="#" style="height: 37px; width: 43px; color: #000080; font-weight: bold; background-color: <%=COLOR%>" class="style92" />
<input name="8" type="button" value="8" onclick="klavye('8');" location.href="#" style="height: 37px; width: 43px; color: #000080; font-weight: bold; background-color: <%=COLOR%>" class="style92" />
<input name="9" type="button" value="9" onclick="klavye('9');" location.href="#" style="height: 37px; width: 43px; color: #000080; font-weight: bold; background-color: <%=COLOR%>" class="style92" />
<input name="0" type="button" value="0" onclick="klavye('0');" location.href="#" style="height: 37px; width: 43px; color: #000080; font-weight: bold; background-color: <%=COLOR%>" class="style92" />
<input name="," type="button" value="," onclick="klavye(',');" location.href="#" style="height: 37px; width: 43px; color: #000080; font-weight: bold; background-color: <%=COLOR%>" class="style92" />

</span>
</body>
</html>

Philip M
09-26-2012, 09:33 AM
Try this:=


<script type = "text/javascript">

function klavye(veri) {
if (veri !="BS") {
document.getElementById('kutucuk').value=kutu=document.getElementById('kutucuk').value + veri
}
else {
var len = document.getElementById('kutucuk').value.length;
document.getElementById('kutucuk').value=document.getElementById('kutucuk').value.substring(0,len-1);
}
}

</script>

<input name="BS" type="button" value="BS" onclick="klavye('BS');" location.href="#" style="height: 37px; width: 43px; color: #000080; font-weight: bold; background-color: <%=COLOR%>" class="style92" />



“If you only do what you know you can do - then you never do very much.” - Tom Krause

matsuka
09-26-2012, 12:27 PM
Philip M,

Thank you very much for your kind attention. I am at work right now, I'll try your suggestion as soon as I arrive home. I hope it will work.



Try this:=


<script type = "text/javascript">

function klavye(veri) {
if (veri !="BS") {
document.getElementById('kutucuk').value=kutu=document.getElementById('kutucuk').value + veri
}
else {
var len = document.getElementById('kutucuk').value.length;
document.getElementById('kutucuk').value=document.getElementById('kutucuk').value.substring(0,len-1);
}
}

</script>

<input name="BS" type="button" value="BS" onclick="klavye('BS');" location.href="#" style="height: 37px; width: 43px; color: #000080; font-weight: bold; background-color: <%=COLOR%>" class="style92" />



“If you only do what you know you can do - then you never do very much.” - Tom Krause

Philip M
09-26-2012, 01:10 PM
Philip M,

Thank you very much for your kind attention. I am at work right now, I'll try your suggestion as soon as I arrive home. I hope it will work.

Well, it works for me. :)

matsuka
09-26-2012, 07:42 PM
Philip M,
It works perfectly. Thanks a lot. You are great.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum