Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
How to Populate Visual formatter
deveshhassani
Hi,
My requirement is to create a form containing a drop down and a visual fomatter. on selecting a value from drop down, visual formatter should be populated with predefine content kept in some file.
Is this achieivable?
I am working on Teamsite 6.5 and os ia windows.
Find more posts tagged with
Comments
shahina
Hi
As far as I have understood your requirement,this can be acheived by making use of FormAPI. You can have a javascript which has event registered for any event on the dropdown. Depending on what value user selects from Dropdown, you can use simple javascript to read file. These contents can then be set for the text area.
deveshhassani
thanks for your reply!
But as far i know javascript does not provide file handling mechanism.
shahina
yes i agree there is not a direct way to read/write files through javascript. see if this can be used in your scenario
http://www.c-point.com/JavaScript/articles/file_access_with_JavaScript.htm
Also you can try using callserver to call an ipl/cgi from your JS. this ipl can do the task of reading file and returning values to JS
Migrateduser
The problem with this approach is that you cannot modify the visual format field through FormAPI. You might have to do a feature request for this with Interwoven support. But if you keep it as a non Visualformat field, then you can modify it.
ISCBorisB
The problem with this approach is that you cannot modify the visual format field through FormAPI...
That's incorrect, it is certainly possible. All you have to do is to get desired eWebEditPro Object Instance
(from top.eWebEditPro.instances) and then use eWebEditPro Methods like getSelectedText, pasteHTML, etc
See Ektron® eWebEditPro Developer’s Reference Guide for some details.
deveshhassani
Loads of thanks to all!