keypress erases everything [message #401370] |
Mon, 04 May 2009 05:50 |
rzkhan
Messages: 370 Registered: March 2005
|
Senior Member |
|
|
I am facing one of the bad scenario:
I have four text items.
AddressLine1, AddressLine2, AddressLine3, AddressLine4
when a user enters text in the first field. It should automatically move the last incomplete word to next Field.
To achieve this functionality, I have used the following code with POST-TEXT-ITEM of all the first three text items.
Here is my code
declare
pos number := instr(:bsd.plas1,' ',-1,1);
ch1 varchar2(30);
ch2 varchar2(30);
begin
if pos > 23 then
begin
ch1 := substr(:bsd.plas1,pos);
ch2 := substr(:bsd.plas1,0,pos);
:bsd.plas1 := ch2;
:bsd.plas2 :=rtrim(ch1);
end;
end if;
end;
It works fine, but creating another problem.
As soon the input focus moves to next item, the entire text already available is selected and an accidental keypress erases everything (Yeh, I m not smart enough to control this situation)
Please help me..anyone
Riaz
|
|
|
|
|