>Dear Sir,
>
>I applied your codes the result is good
>but the cursor can not move in the textbox
>
>Please modify your codes to move cursor in textbox.
>
>Thanks
This.selstart determines where the cursor will stay, it may be possible that len(this.value) does not calculate the new value. Try to replace This.selstart=len(this.value) with This.selstart=4 ,5 and 8 respectively.