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 use Javascript in workflow file
cute_guy
I have two drop downs in my workflow(wft) file, i need to change one drop down based on the value selected on the other by the user.
I have a small piece of javascript to do that. How do i integrate this piece of javascript code to the workflow(.wft) file.
Any help would be greatly appreciated.
Regards,
Ganesh Kumar
Find more posts tagged with
Comments
Migrateduser
This is very easy to do and I did the same thing just last week. Without any details to work with, my response will also be more general, but insert an onChange="someFunction();" attribute in the tag of the drop down whose value you want to determine the array of the other drop down. You can insert your Javascript basically anywhere but some places are "cleaner" than others. I place that in quotes because, in a way, who cares what the outputted HTML looks like? What matters more is the readability of the WFT instead.
Dave
Current Environments:
(1) TS 6.5 on W2K3 (x2 - diff. imp.)
(3) Vignette V7 Portal on Solaris 9
cute_guy
Should the javascript code be only placed in between some tag that will be understandable by the workflow subsystem.
Migrateduser
No, doesn't need to be. For many browsers, as long as the JS appears before the onChange() call in the parsed HTML, it'll be fine. Your only concern with the JS is that it makes sense when parsed into HTML. As far as WF instantiation, your JS won't even impact it, as long as you have your form fields well-declared, etc.
The WFT is really just a nice tool from which to create the rather complex workflow instantiation form that TeamSite requires. The HTML generation is very straight-forward and you can see that by doing a "view source".
Dave
Current Environments:
(1) TS 6.5 on W2K3 (x2 - diff. imp.)
(3) Vignette V7 Portal on Solaris 9