I'm working on an html page in my 8206 environment. I have an html page where a value comes into the page using !IBI.AMP. to fill in the value. There are times that this value is missing so I have a default value of '' if the value is missing (I have also tried actually making it MISSING). When the value is missing or '', as I'm tabbing/clicking through the fields, it sets the cursor to the right of the edit/text boxes instead of all the way to the left. I know it's !IBI.AMP because if I don't have this value populating a field, the cursor goes to the left as expected. Does anyone know what property I need to set to put the cursor to the left? I'm an html GUI guy, so somehow to do this via GUI would be preferable. Thanks!This message has been edited. Last edited by: FP Mod Chuck,
WF 8.0.08 (Prod); WF 8.2.06 (Dev)
November 24, 2020, 01:37 PM
FP Mod Chuck
Evan
If this is still an issue then please open a case with techsupport.
Thank you for using Focal Point!
Chuck Wolff - Focal Point Moderator WebFOCUS 7x and 8x, Windows, Linux All output Formats
November 26, 2020, 10:19 AM
Fernando
Evan, What I would do is take a look at the HTML that is being generated with !IBI.AMP versus without. Then look into javascript/jquery to see if you can add/remove the difference.
Fernando
Prod WF 8.1.04, QA WF 8.2.03, Dev WF 8.2.03
December 01, 2020, 10:34 AM
vaayu
I ran a quick test and this seems to work you can set the caret position to whatever (0 is the beginning)
function onInitialUpdate(){
setCaretPosition('edit1',3);
}
function setCaretPosition(elemId, caretPos) {
var elem = document.getElementById(elemId);
//var elem = document.getElementById(elemId);
elem.setSelectionRange(caretPos, caretPos);
}