Welcome! Log In Create A New Profile

Advanced

[WebDev] - Problem with getting back the focus

Posted by Prolay Sarkar 
Prolay Sarkar
[WebDev] - Problem with getting back the focus
February 21, 2009 06:53AM
Hi,

I am trying to display a Picklist to a user where he can select a value out of that. So I am using a PageDispalyDialog() to open the New window with the table control and as the user clicks on the table link he gets the values on the previous window. But I am not able to set the focus in the window based on the results.

///////////////////////////////////////////////Server Code of a Button/////////////////////////////////////////////

getArr is array of 0 by 3 strings
getStr is string = Pick_Product_Picklist(BrCd,PrdCd)
StringToArray(getStr,getArr)
sd is int = ArrayCount(getArr)-1
SWITCH sd
CASE 1:
EDT_PrdCd =getArr[1,1]
EDT_PrdCdDesc=getArr[1,3]
gstr is string = getArr[1,1] + "|"+getArr[1,3]

CASE 0:
Info("Product Not Found")
OTHER CASE
tab_get is string = PageDisplayDialog(PAGE_Product_Picklist,getArr)
ArrayDeleteAll(getArr)
IF tab_get <> "" THEN
StringToArray(tab_get,getArr)
gstr= getArr[1,1] + "|"+getArr[1,3]
EDT_PrdCd =getArr[1,1]
EDT_PrdCdDesc=getArr[1,3]
END
END
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Now If the Product is selected i.e CASE 1 and OTHER CASE the tab should go to the next field and if CASE 0 then the focus should remain in the same field. Am I doing something wrong ? Is there any way to achieve this? If not than how this type of situation
can be handled

Plz help!!

Regards,
Prolay
Fabrice Harari
Re: [WebDev] - Problem with getting back the focus
February 21, 2009 01:00PM
Hi Prolay..

to change the active TAB, use : TABName=NumberOfTheTabToActivate
to change the active field use: returnToCapture(FieldName)

As I haven't seen how you are displaying anything in the main window, I cannot tell you exactly WHERE to put those instructions (in some cases, it's necessary to do that in browser code, in others you can do it in server code)

Best regards

Prolay Sarkar
Re: [WebDev] - Problem with getting back the focus
February 21, 2009 01:20PM
Hi Fabrice,

I want to display a "Pick-List" (table) to the user when the user tabs out of a field and when the user will select on it the cursor should go to the next tab which is not going meaning the focus is getting lost.
What is the efficient way to do this

Regards,
Prolay

Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: