Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
CSIDE and OScript
Running a script after the Item Reference pop up window has closed
Simon_Morris_(simonmorris_-_(deleted))
Hi all,I'm trying to find a way of getting a script to run after a user has selected a document via an item reference on a html form.The script I want to run picks up information stored in a category attached to the document and populates fields on the form with this info.I've managed to get it to work as an event script but ideally I'd like it to run as soon as the user selects the document so that the user can make any changes to these fields before sending the step on.Is there any way of doing this?
Find more posts tagged with
Comments
Jeff Lang
You can get the script to run by using javascript to open another window and having the request handler run the script and then pass the resultant data back to the calling page.In the javascript function xxxxx_DoSelection, this is the function that stores the id of the selected node on the calling page, open another window and call a custom request handler passing in the id of the selected node. That request handler would then take the nodeID and call your custom script that gathers the required data. This data is then passed to the HTML file for the newly opened window. The onload function for that new window would then take this passed in data and set the desired fields on the opener window. After setting the data on the opener, the onload function then closes this temporary window.The end user would get a flash of a window opening and closing, but the data would be set on the originating page.
Simon_Morris_(simonmorris_-_(deleted))
Hi Jeff, thanks for the quick reply, do you by any chance know of any examples of this, builder is still a bit of a mystery to me - as best I can work out it's powered by voodoo!
Nair_Krishnankutty_(nairkrishnankutty_-_(deleted))
I beleive what Jeff is talking about is probably the technique used by webforms data lookup.Anytime an external table needs to be called livelink code opens up a small javascript window and having collected data in that transcation updates the main page values.Technique is to make a submission to the livelink server using a small flashing window.I enclose one or two javascripts that I tweaked out of that example to get a value from the lldatabase.www.greggriffiths.org has a lot ofjavascript examples in context with livelink.I beleive there was even one that was able to take the workflow title.I believe you had to amend weblingo to get a javascript var populated though.