my question is if i type in html textbox on key press event suppose i type 12345 values in textbox then i delete or edit any value of text box suppose i edit 3 and i insert the value 6 at 3 but i have face problem that is if i insert 6 at 3 this value is not insert at 3 it insert last positon i.e after last value .In given example the value is appned or insert after 5 then output is 12456 but i have want the output 12645 and i also give the maxlength to textbox. so plz help me.
9 2686 gits 5,390
Expert Mod 4TB
hi ...
could you please show the code you are using at the moment? that would help us a lot to understand the problem you have ...
kind regards
PS: please remember to use a meaningful thread-title ...
my question is if i type in html textbox on key press event suppose i type 12/03/2008 values in textbox then i delete or edit any value of text box suppose i edit 3 and i insert the value 6 at 3 but i have face problem that is if i insert 6 at 3 this value is not insert at 3 it insert last positon i.e after last value .In given example the value is appned or insert after 5 then output is 12/0/20006 but i have want the output 12/06/2008 and i also give the maxlength to textbox. so plz help me
my code is giveing below
[HTML]<html>
<head>
<script type="text/javascript">
var len1=0;
var len2=0;
var strSeparatorArray=new Array("-","/","","!","@","#","$","%","^","&","*","_","+","|"," :","\",","?",".",","," ","'","~");
function checkdate(objName,e,format)
{
var length;
var strDateArray;
var cutoffyear=50;
var first_token;
var second_token;
var third_token;
var tokArr= new Array();
length=parseInt(objName.value.length);
var string=document.getElementById("datetext").value;
//Get Separator from format string.
for (var i= 0; i < strSeparatorArray.length; i++)
{
if (format.indexOf(strSeparatorArray[i]) != -1)
{
sep_char=strSeparatorArray[i];
break;
}
}
tokArr=format.split(sep_char);
first_token=tokArr[0];
second_token=tokArr[1];
third_token=tokArr[2];
if(sep_char=="")
sep_char="/";
len1=first_token.length;
len2=second_token.length;
var currtemp = (window.Event) ? e.which : e.keyCode;
currkey=String.fromCharCode(currtemp);
//if(length<format.length)
{
if(!isNaN(currkey) && e.keyCode!=32 && e.keyCode!=13 && e.which!=32)
{
if(length<len1)
{
switch(first_token.toUpperCase())
{
case 'DD':
if(length==0)
{
if(currkey=='0' || currkey=='1' || currkey=='2' || currkey=='3')
objName.value+=currkey;
else
objName.value+="0"+currkey+sep_char;
}
if(length==1)
{
if(string=='0' && currkey!='0')
objName.value+=currkey+sep_char;
if(string=='1' || string=='2')
objName.value+=currkey+sep_char;
if(string=='3' && (currkey=='0' || currkey=='1'))
objName.value+=currkey+sep_char;
}
break;
case 'MM':
if(length==0)
{
if(currkey=='0'||currkey=='1')
objName.value+=currkey;
else
objName.value+="0"+currkey+sep_char;
t_flag1=false;
}
if(length==1)
{
if(string=='0' && currkey!='0')
objName.value+=currkey+sep_char;
else
if(string=='1' && (currkey=='0'||currkey=='1'||currkey=='2'))
objName.value+=currkey+sep_char;
}
break;
case 'YY':
if(length==0)
objName.value+=currkey;
if(length==1)
objName.value+=currkey+sep_char;
break;
case 'YYYY':
if(length==0 && currkey!=0)
objName.value+=currkey;
if(length==1 || length==2)
objName.value+=currkey;
if(length==3)
objName.value+=currkey+sep_char;
break;
}
}
else
{
if(length>len1 && length<=len1+len2)
{
switch(second_token.toUpperCase())
{
case 'DD':
if(length==3)
{
if(currkey=='0'||currkey=='1'||currkey=='2'||currk ey=='3')
objName.value+=currkey;
else
objName.value+="0"+currkey+sep_char;
}
if(length==4)
{
string=string.substring(string.length-1);
if(string=='0' && currkey!='0')
objName.value+=currkey+sep_char;
if(string=='1'||string=='2')
objName.value+=currkey+sep_char;
else
if(string=='3' && (currkey=='0'||currkey=='1'))
objName.value+=currkey+sep_char;
}
if(length==5)
{
if(currkey=='0'|| currkey=='1'|| currkey=='2'||currkey=='3')
objName.value+=currkey;
else
objName.value+="0"+currkey+sep_char;
}
if(length==6)
{
string=string.substring(string.length-1);
if(string=='0' && currkey!='0')
objName.value+=currkey+sep_char;
if(string=='1'||string=='2')
objName.value+=currkey+sep_char;
else
if(string=='3' && (currkey=='0'||currkey=='1'))
objName.value+=currkey+sep_char;
}
break;
case 'MM':
if(length==3)
{
if(currkey=='0'||currkey=='1')
objName.value+=currkey;
else
objName.value+="0"+currkey+sep_char;
}
if(length==4)
{
string=string.substring(string.length-1);
if(string=='0')
objName.value+=currkey+sep_char;
if(string=='1'&&(currkey=='0' || currkey=='1' || currkey=='2' ))
objName.value+=currkey+sep_char;
}
if(length==5)
{
if(currkey=='0'||currkey=='1')
objName.value+=currkey;
else
objName.value+="0"+currkey+sep_char;
}
if(length==6)
{
string=string.substring(string.length-1);
if(string=='0' && currkey!='0')
objName.value+=currkey+sep_char;
else
if(string=='1' &&(currkey=='0' || currkey=='1' || currkey=='2'))
objName.value+=currkey+sep_char;
}
break;
}
}
else
{
switch(third_token.toUpperCase())
{
case 'DD':
if(length==6)
{
if(currkey=='0'|| currkey=='1'|| currkey=='2'||currkey=='3')
objName.value+=currkey;
else
objName.value+="0"+currkey;
}
if(length==7)
{
string=string.substring(string.length-1);
if(string=='0' && currkey!='0')
objName.value+=currkey;
if(string=='1'||string=='2')
objName.value+=currkey;
else
if(string=='3' && (currkey=='0'||currkey=='1'))
objName.value+=currkey;
}
if(length==8)
{
if(currkey=='0'|| currkey=='1'|| currkey=='2'||currkey=='3')
objName.value+=currkey;
else
objName.value+="0"+currkey
}
if(length==9)
{
string=string.substring(string.length-1);
if(string=='0' && currkey!='0')
objName.value+=currkey;
if(string=='1'||string=='2')
objName.value+=currkey;
else
if(string=='3' && (currkey=='0'||currkey=='1'))
objName.value+=currkey;
}
break;
case 'MM':
if(length==6)
{
if(currkey=='0'||currkey=='1')
objName.value+=currkey;
else
objName.value+="0"+currkey;
t_flag3=false;
}
if(length==7)
{
string=string.substring(string.length-1);
if(string=='0' && currkey!='0')
objName.value+=currkey;
if(string=='1' &&(currkey=='1' || currkey=='2' || currkey=='0'))
objName.value+=currkey;
}
if(length==8)
{
if(currkey=='0'||currkey=='1')
objName.value+=currkey;
else
objName.value+="0"+currkey;
}
if(length==9)
{
string=string.substring(string.length-1);
if(string=='0' && currkey!='0')
objName.value+=currkey;
if(string=='1' &&(currkey=='1' || currkey=='2' || currkey=='0'))
objName.value+=currkey;
}
break;
case 'YY':
if(length==6 || length==7)
objName.value+=currkey;
break;
case 'YYYY':
if(length==6 &&currkey!='0')
objName.value+=currkey;
if(length==7 || length==8 || length==9)
objName.value+=currkey;
break;
}
}
}
}// end of currkey if
}//end of format length if
if(e.keyCode==8 || e.keyCode==37 || e.keyCode==39)
return true;
if(window.event)
window.event.keyCode=13;
else
return false;
}// end of function checkdate
</script>
</head>
<body>
Date :-<br>
<input type=text id=datetext name=datetext onkeypress="checkdate(this,event,'mm/dd/yy')"/>
</body>
</html>[/HTML]
my question is if i type in html textbox on key press event suppose i type 12/03/2008 values in textbox then i delete or edit any value of text box suppose i edit 3 and i insert the value 6 at 3 but i have face problem that is if i insert 6 at 3 this value is not insert at 3 it insert last positon i.e after last value .In given example the value is appned or insert after 5 then output is 12/0/20006 but i have want the output 12/06/2008 and i also give the maxlength to textbox. so plz help me
my code is giveing below
Code: [HTML]<html>
<head>
<script type="text/javascript">
var len1=0;
var len2=0;
var strSeparatorArray=new Array("-","/","","!","@","#","$","%","^","&","*","_","+","|"," :","\",","?",".",","," ","'","~");
function checkdate(objName,e,format)
{
var length;
var strDateArray;
var cutoffyear=50;
var first_token;
var second_token;
var third_token;
var tokArr= new Array();
length=parseInt(objName.value.length);
var string=document.getElementById("datetext").value;
//Get Separator from format string.
for (var i= 0; i < strSeparatorArray.length; i++)
{
if (format.indexOf(strSeparatorArray[i]) != -1)
{
sep_char=strSeparatorArray[i];
break;
}
}
tokArr=format.split(sep_char);
first_token=tokArr[0];
second_token=tokArr[1];
third_token=tokArr[2];
if(sep_char=="")
sep_char="/";
len1=first_token.length;
len2=second_token.length;
var currtemp = (window.Event) ? e.which : e.keyCode;
currkey=String.fromCharCode(currtemp);
//if(length<format.length)
{
if(!isNaN(currkey) && e.keyCode!=32 && e.keyCode!=13 && e.which!=32)
{
if(length<len1)
{
switch(first_token.toUpperCase())
{
case 'DD':
if(length==0)
{
if(currkey=='0' || currkey=='1' || currkey=='2' || currkey=='3')
objName.value+=currkey;
else
objName.value+="0"+currkey+sep_char;
}
if(length==1)
{
if(string=='0' && currkey!='0')
objName.value+=currkey+sep_char;
if(string=='1' || string=='2')
objName.value+=currkey+sep_char;
if(string=='3' && (currkey=='0' || currkey=='1'))
objName.value+=currkey+sep_char;
}
break;
case 'MM':
if(length==0)
{
if(currkey=='0'||currkey=='1')
objName.value+=currkey;
else
objName.value+="0"+currkey+sep_char;
t_flag1=false;
}
if(length==1)
{
if(string=='0' && currkey!='0')
objName.value+=currkey+sep_char;
else
if(string=='1' && (currkey=='0'||currkey=='1'||currkey=='2'))
objName.value+=currkey+sep_char;
}
break;
case 'YY':
if(length==0)
objName.value+=currkey;
if(length==1)
objName.value+=currkey+sep_char;
break;
case 'YYYY':
if(length==0 && currkey!=0)
objName.value+=currkey;
if(length==1 || length==2)
objName.value+=currkey;
if(length==3)
objName.value+=currkey+sep_char;
break;
}
}
else
{
if(length>len1 && length<=len1+len2)
{
switch(second_token.toUpperCase())
{
case 'DD':
if(length==3)
{
if(currkey=='0'||currkey=='1'||currkey=='2'||currk ey=='3')
objName.value+=currkey;
else
objName.value+="0"+currkey+sep_char;
}
if(length==4)
{
string=string.substring(string.length-1);
if(string=='0' && currkey!='0')
objName.value+=currkey+sep_char;
if(string=='1'||string=='2')
objName.value+=currkey+sep_char;
else
if(string=='3' && (currkey=='0'||currkey=='1'))
objName.value+=currkey+sep_char;
}
if(length==5)
{
if(currkey=='0'|| currkey=='1'|| currkey=='2'||currkey=='3')
objName.value+=currkey;
else
objName.value+="0"+currkey+sep_char;
}
if(length==6)
{
string=string.substring(string.length-1);
if(string=='0' && currkey!='0')
objName.value+=currkey+sep_char;
if(string=='1'||string=='2')
objName.value+=currkey+sep_char;
else
if(string=='3' && (currkey=='0'||currkey=='1'))
objName.value+=currkey+sep_char;
}
break;
case 'MM':
if(length==3)
{
if(currkey=='0'||currkey=='1')
objName.value+=currkey;
else
objName.value+="0"+currkey+sep_char;
}
if(length==4)
{
string=string.substring(string.length-1);
if(string=='0')
objName.value+=currkey+sep_char;
if(string=='1'&&(currkey=='0' || currkey=='1' || currkey=='2' ))
objName.value+=currkey+sep_char;
}
if(length==5)
{
if(currkey=='0'||currkey=='1')
objName.value+=currkey;
else
objName.value+="0"+currkey+sep_char;
}
if(length==6)
{
string=string.substring(string.length-1);
if(string=='0' && currkey!='0')
objName.value+=currkey+sep_char;
else
if(string=='1' &&(currkey=='0' || currkey=='1' || currkey=='2'))
objName.value+=currkey+sep_char;
}
break;
}
}
else
{
switch(third_token.toUpperCase())
{
case 'DD':
if(length==6)
{
if(currkey=='0'|| currkey=='1'|| currkey=='2'||currkey=='3')
objName.value+=currkey;
else
objName.value+="0"+currkey;
}
if(length==7)
{
string=string.substring(string.length-1);
if(string=='0' && currkey!='0')
objName.value+=currkey;
if(string=='1'||string=='2')
objName.value+=currkey;
else
if(string=='3' && (currkey=='0'||currkey=='1'))
objName.value+=currkey;
}
if(length==8)
{
if(currkey=='0'|| currkey=='1'|| currkey=='2'||currkey=='3')
objName.value+=currkey;
else
objName.value+="0"+currkey
}
if(length==9)
{
string=string.substring(string.length-1);
if(string=='0' && currkey!='0')
objName.value+=currkey;
if(string=='1'||string=='2')
objName.value+=currkey;
else
if(string=='3' && (currkey=='0'||currkey=='1'))
objName.value+=currkey;
}
break;
case 'MM':
if(length==6)
{
if(currkey=='0'||currkey=='1')
objName.value+=currkey;
else
objName.value+="0"+currkey;
t_flag3=false;
}
if(length==7)
{
string=string.substring(string.length-1);
if(string=='0' && currkey!='0')
objName.value+=currkey;
if(string=='1' &&(currkey=='1' || currkey=='2' || currkey=='0'))
objName.value+=currkey;
}
if(length==8)
{
if(currkey=='0'||currkey=='1')
objName.value+=currkey;
else
objName.value+="0"+currkey;
}
if(length==9)
{
string=string.substring(string.length-1);
if(string=='0' && currkey!='0')
objName.value+=currkey;
if(string=='1' &&(currkey=='1' || currkey=='2' || currkey=='0'))
objName.value+=currkey;
}
break;
case 'YY':
if(length==6 || length==7)
objName.value+=currkey;
break;
case 'YYYY':
if(length==6 &&currkey!='0')
objName.value+=currkey;
if(length==7 || length==8 || length==9)
objName.value+=currkey;
break;
}
}
}
}// end of currkey if
}//end of format length if
if(e.keyCode==8 || e.keyCode==37 || e.keyCode==39)
return true;
if(window.event)
window.event.keyCode=13;
else
return false;
}// end of function checkdate
</script>
</head>
<body>
Date :-<br>
<input type=text id=datetext name=datetext onkeypress="checkdate(this,event,'mm/dd/yyyy')"/>
</body>
</html>[/HTML]
my question is if i type in html textbox on key press event suppose i type 12/03/2008 values in textbox then i delete or edit any value of text box suppose i edit 3 and i insert the value 6 at 3 but i have face problem that is if i insert 6 at 3 this value is not insert at 3 it insert last positon i.e after last value .In given example the value is appned or insert after 5 then output is 12/0/20006 but i have want the output 12/06/2008 and i also give the maxlength to textbox. so plz help me
Hello Friend I can get your question but inorder to run the code, what you had given it needs the calendar. probably the error may be the with the event.In the input text field you are passing the date object, one event and dare format. please use the code without event.Instead of writing the validation code in onKeyPress write the function in onBlur event. That may be helpful for you.
I give you a code with which you can understand how the date value can be used:
[HTML]<Html>
<head>
<script language="javascript">
function changeVal(month)
{
if(month=="jan"||month=="Jan"||month=="JAN")
month=0;
if(month=="feb"||month=="Feb"||month=="FEB")
month=1;
if(month=="mar"||month=="Mar"||month=="MAR")
month=2;
if(month=="apr"||month=="Apr"||month=="APR")
month=3;
if(month=="may"||month=="May"||month=="MAY")
month=4;
if(month=="jun"||month=="Jun"||month=="JUN")
month=5;
if(month=="jul"||month=="Jul"||month=="JUL")
month=6;
if(month=="aug"||month=="Aug"||month=="AUG")
month=7;
if(month=="sep"||month=="Sep"||month=="SEP")
month=8;
if(month=="oct"||month=="Oct"||month=="OCT")
month=9;
if(month=="nov"||month=="Nov"||month=="NOV")
month=10;
if(month=="dec"||month=="Dec"||month=="DEC")
month=11;
return(month);
}
function findDiff()
{
var day1, day2;
var month1, month2;
var year1, year2;
value1 = document.getElementById('stDate').value;
value2 = document.getElementById('endDate').value;
day1 = value1.substring (0, value1.indexOf ("-"));
month1 = value1.substring (value1.indexOf ("-")+1, value1.lastIndexOf ("-"));
month1 = changeVal(month1);
year1 = value1.substring (value1.lastIndexOf ("-")+1, value1.length);
day2 = value2.substring (0, value2.indexOf ("-"));
month2 = value2.substring (value2.indexOf ("-")+1, value2.lastIndexOf ("-"));
month2 = changeVal(month2);
year2 = value2.substring (value2.lastIndexOf ("-")+1, value2.length);
var startDate = new Date(year1,month1,day1);
var endDate = new Date(year2,month2,day2);
var wrkdays=0;
while(startDate.getTime()<=endDate.getTime())
{
wrkdays++;
if(startDate.getDay()==0)
{
wrkdays--;
}
else if(startDate.getDay()==6)
{
wrkdays--;
}
else
{
}
var d = new Date(startDate.getTime() + 86400000);
startDate=d;
}
alert("Total Workdays = "+wrkdays);
}
</script>
</head>
<body>
<input type="text" id="stDate"><br/>
<input type="text" id="endDate"><br/>
<input type="button" value="calculate" onclick="findDiff()">
</body>
</html>[/HTML]
If more doubts please post it surely I can help you out
Regards
Ramanan kalirajan.
Hi sunita, this is the second or third time that you've double posted. This is the last time I'll tell you nicely - please do not double post your questions. If you have some more information, post in the same thread.
Also, remember to use [code] tags when posting code.
hellow frnd following is my code i have some problem in my code.The following code is about date formating in which i type the date in given format i.e mm/dd/yyyy then date is type in given format but if i delete or edit the any digit then after the editing then i can not insert the digit in deleted or edit position.consider example if i type the date 03/24/2008 then i want to edit or delete the digit 4 and that position i want to insert the 5 but 5 is inserted at last position i.e 03/2/20085 but i want a output like 03/25/2008.I think u understand my problem so plz help me & i want only on keypress event so plz help me.
<----------Code--------------->
[HTML]<html>
<head>
<script type="text/javascript">
[/HTML] - var len1=0;
-
var len2=0;
-
var strSeparatorArray=new Array("-","/","!","@","#","$","%","^","&","*","_","+","+","|",":","?",".",","," ","'","~","");
-
function checkdate(t_object,t_event,p_format)
-
{
-
var t_val;
-
var sep_char;
-
var t_temp;
-
var first_token;
-
var second_token;
-
var third_token;
-
var cuttofyear=50;
-
var length = parseInt(t_object.value.length);
-
var t_format=p_format;
-
var token=new Array();
-
-
//Get Separator from format string.
-
strDateformat = t_format;
-
for (var i= 0; i < strSeparatorArray.length; i++)
-
{
-
if (strDateformat.indexOf(strSeparatorArray[i]) != -1)
-
{
-
sep_char=strSeparatorArray[i];
-
break;
-
}
-
}
-
-
frm1="mm"+sep_char+"dd"+sep_char+"yyyy";
-
frm2="dd"+sep_char+"mm"+sep_char+"yyyy";
-
frm3="mm"+sep_char+"dd"+sep_char+"yy";
-
frm4="dd"+sep_char+"mm"+sep_char+"yy";
-
frm5="yyyy"+sep_char+"mm"+sep_char+"dd";
-
frm6="yyyy"+sep_char+"dd"+sep_char+"mm";
-
frm7="yy"+sep_char+"mm"+sep_char+"dd";
-
frm8="yy"+sep_char+"dd"+sep_char+"mm";
-
-
//Get Separator from format string.
-
str_format=t_format.toUpperCase();
-
token1=str_format.indexOf("MM");
-
token2=str_format.indexOf("DD");
-
token3=str_format.indexOf("YYYY");
-
tok3=str_format.indexOf("YY");
-
-
if(token2==0 ||token2==2 || token2==3 || token2==4 || token2==5 || token2==6 || token2==8)
-
token[0]=str_format.substring(token2,token2+2);
-
if(token1==0 || token1==2 ||token1==3 || token1==4 || token1==5 || token1==6 || token1==8)
-
token[1]=str_format.substring(token1,token1+2);
-
if(token3==0 || token3==4 ||token3==6 || tok3==0 || tok3==4 || tok3==6)
-
{
-
if(token3==0 || token3==6 || token3==4)
-
{
-
t_val=token3;
-
while(str_format.charAt(t_val)=="Y")
-
t_val++;
-
}
-
if(tok3==0 || tok3==6 || tok3==4)
-
{
-
t_val=tok3;
-
while(str_format.charAt(t_val)=="Y")
-
t_val++;
-
}
-
token[2]=str_format.substring(tok3,t_val);
-
}
-
-
if(t_format.toUpperCase() ==frm1.toUpperCase() || t_format.toUpperCase()==frm3.toUpperCase())
-
{
-
first_token=token[1];
-
second_token=token[0];
-
third_token=token[2];
-
}
-
if(t_format.toUpperCase() ==frm2.toUpperCase() || t_format.toUpperCase()==frm4.toUpperCase())
-
{
-
first_token=token[0];
-
second_token=token[1];
-
third_token=token[2];
-
}
-
if(t_format.toUpperCase() ==frm5.toUpperCase() || t_format.toUpperCase()==frm7.toUpperCase())
-
{
-
first_token=token[2];
-
second_token=token[1];
-
third_token=token[0];
-
}
-
if(t_format.toUpperCase() ==frm6.toUpperCase() || t_format.toUpperCase()==frm8.toUpperCase())
-
{
-
first_token=token[2];
-
second_token=token[0];
-
third_token=token[1];
-
}
-
-
if(sep_char=="")
-
sep_char="/";
-
-
if(first_token=='YY')
-
len1=4;
-
else
-
len1=first_token.length;
-
len2=second_token.length;
-
-
var currtemp =(t_event.keyCode)?t_event.keyCode:t_event.which;
-
var currkey=String.fromCharCode(currtemp);
-
[HTML]</script>
</head>
<body>
Date Format:<br>
<input type=text id=date_txt name=date_txt onkeypress="return checkdate(this,event,'mm/dd/yyyy')" maxlength=10/>
</body>
</html>[/HTML]
sunita, your continuous disregard for the posting guidelines will not be tolerated. You've been told many times to stop double posting your questions (posting the same question again in a new thread). You also never use [code] tags after being asked to do so more than once. Consider this as a last and final warning. The next time could result in a (temp.) ban.
Moderator.
hellow frnd i read ur reply & ur code but i want a dateformating using onkeypress event so plz help me .I give the example of my problem suppose i type the date in textbox as 03/26/2008 first is month then date then year if suppose i want to change the 6 and enter 7 at that position then i get the output like 03/2/20087 means 7 is enter at last position but i want to output like 03/27/2008 i was send my code three times so plz help me.It's urgent for me.
Thanking You.
I've understood your problem, but your code is far too complicated for such a simple problem. What I suggest is that you either use three fields, then you only need to check for integers, or use regular expressions to check the current input.
Is it possible that you can use three fields for this? If so, you can just use select drop-down elements instead, thus making validation even easier.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: T.E. |
last post by:
Hi all,
I'm a newbie in php.
I encounter a problem with php form that has only one textfield.
If I click on the submit button, the form works fine. However, when I
press 'enter', the form...
|
by: Ali Eghtebas |
last post by:
Hi,
Need fast help pls:
Format (1 "###,###.##") = "1" <<<<----- OK!
Format (0, "###,###.##") = "" <<<<----- WHY?
How can I make this work with Zero?
|
by: Stumped and Confused |
last post by:
Hello,
I really, really, need some help here - I've spent hours trying to find a
solution.
In a nutshell, I'm trying to have a user input a value in form's
textfield. The value should then be...
|
by: Suresh |
last post by:
How do I insert a char into the textfield on the keypress event of another textfield?
I have two textboxes, "text1" and "text2".
Important:
"text1" is outside the table.
"text2" is inside...
|
by: Cah Sableng |
last post by:
Hi all.
I am new member of this group.
I have a problem with currency formatter function I made. On onkeyup's
method of a textfield I add function below:
<snip>
function formatCurrency(elm)...
|
by: learning |
last post by:
Hi!
Here's my situation:
I have one textfield with one 'submit' button in PAGE1.PHP.
When I click on the 'submit' button I am sent to PAGE2.PHP where I have a "switch" routine that checks...
|
by: foss |
last post by:
Hi friends,
My form have a text field named "price" which should have only number and if it contains decimal number then it should not have more than two numbers after decimal. I tried this but it...
|
by: Scott McNair |
last post by:
I have an external RFID/keypad device that uses a serial port for
communication. Whenever I attempt to read input from the keypad, I run
into the following problem.
Press 1: Nothing appears...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |