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)
DCR onChange
bender8it
Hi Everyone,
Bit of a newbie, would appreciate everyone's help on this
I am trying to set up a sample DCR that calls a cgi perl program.
I have set up an example which uses select/dropdown box.
The plan is to add an onChange() method to the select box which will call the cgi program.
I would like the cgi program to execute a few instructions on the server and set things up so the DCR redisplays.
Attached is the first stab at things ...
I ran into the following problems and here is where I could really find your suggestions helpful.
1. Eventhough I added a script tag and a javascript function
embedded in a CDATA tag, the javascript failed to appear
on the HTML version of the DCR.
What went wrong ? Does the script tag have to reside in
another tag? Does the script tag have to appear in a specific place in the XML?
2. Eventhough I defined an onChange() function for the select
box, callCGI(), the onChange function in the HTML version of
the DCR had a different name.
What went wrong? Is there a tag, for defining an onChange() function, that I should know about?
3. In the Perl cgi, can I redisplay the DCR by using a typical
web-server "Location" redirect, or does Interwoven provide developers a clean mechanism to do this? And if so, what?
4. Is there anything inparticular I should look for so nothing
gets busted? Might someone offer whether this approach is a good one?
5. Can perldoc be used to get documentation on Interwoven
particular perl libraries? If so, what should my PERLDOC
environmental variable?
Find more posts tagged with
Comments
Michael
Hi
I think I can see what you are trying to do, but there are a few problems.
Firstly the XML you put in your datacapture.cfg must comply with the DTD defined in the documentation.
- onChange is not a attribute of <select> in the DTD
Your datacapture.cfg is not just translated into a HTML form, but is processed via the templating engine. So even though parts of the DTD may look like the end result HTML, adding additional items outside of the DTD generally won't help you.
In the <script> tags you will generally use the formAPI interface provided by templating -- I'm presuming you are on at least TeamSite 5.5.x?
When you read the fromAPI documentation you will see handy events for handling value changes in your fields and also documentation on making calls to the server.
I hope this doesn't cause offence -- but it is probably worthwhile seeking out training (or spending some quality time with the documentation) before trying to progress with this. If you have a solid understanding of how it all fits together then it will probably save you a lot of frustration.
hth
Cheers
Michael