June 23, 2006, 01:43 PM
David BriarsNarrative Infomation - Fixed Fields to Web then back to Fixed Fields.
Greetings,
I am storing narrative-type information in a FOCUS database, within fields like this:
FIELDNAME=LINE1 ,ALIAS=LINE1 ,FORMAT=A250 ,$
FIELDNAME=LINE2 ,ALIAS=LINE2 ,FORMAT=A250 ,$
FIELDNAME=LINE3 ,ALIAS=LINE3 ,FORMAT=A250 ,$
I'd like my user to be able to view and then edit the information, and then I'll save it back to the database.
From my research, it looks like I'll want to use the TEXTAREA HTML control.
I've populated, and then used the contents to update my database, many different types of controls before, but never TEXTAREA.
Does anyone have any suggestions, comments, or code-outlines, of how I can pass narrative data, to/from my db via a web page?
Regards,
Dave
June 23, 2006, 03:26 PM
KevinGDavid,
This sounds like a perfect case for a simple MAINTAIN application. You could easily create a MAINTAIN web app to populate an "editable" table for your users.
June 23, 2006, 03:48 PM
susannahKev, David can do it with MODIFY. He doesn't need MAINTAIN.
David, you'll probably want to pass the &var for the textarea (say its called &MYANSWER)
back to your fex, making sure you've restricted the textarea to 250 chars
<textarea rows="5" name="MYANSWER" cols="250"></textarea>
and then look at the result field;
you'll probably have cr/lf in the response field and you may want to strip them out before you process the data. there are several ways to do that...holler back when you get that far.
Now for updating your source db, you can use a MODIFY
to change the data value in the database from whatever it was before the user changed it, to whatever it is now.
You've used MODIFY before??? or is it just the TEXTAREA fielddtype you had not used before?
If you already have a MAINTAIN license, just ignore me and go listen to KevinG.
June 23, 2006, 04:05 PM
David BriarsHi Kevin and Susannah,
We don't have access to MAINTAIN in our environment.
I am ok with the MODIFY commands to update the database.
My questions more have to do with controlling the TEXTAREA HTML control, and responding to my data entry person's actions:
- How to limit the data entry person to 250 characters?...
- How to strip out cr/lf...
Thanks, for your responses!
-Dave
June 23, 2006, 04:35 PM
susannahuse the html example i gave you go limit the size cols="250"
then do a test, read that field in via some text fex and see what the data looks like; see what the cr/lf looks like...what kind of character do you see? at my site, it looks like a little box..and i have a way to handle it..but you might be able to CTRAN it out or STRIP it out, but we have to identify it first.