<item name="page_picker" pathid="#page_picker"><label>Page Picker</label><text size="10"><callout url="/iw-bin/page_picker.ipl" label="Picker" window-features="width=650,height=350,resizable=no,toolbar=no,scrollbars=yes" /></text></item> <item name="page_title" pathid="#page_title"><label>Page Title</label><text size="50" required="t"></text></item> <item name="page_name" pathid="#page_name"><label>Page Name</label><select required="t"><option value="0" label="Select One" /><option value="1" label="Home Page" /><option value="2" label="Level 1 Page" /><option value="3" label="Level 2 Page" /><option value="4" label="Level 3 Page" /><option value="5" label="Level 4 Page" /></select></item>
OK, I am not certain about how this is supposed to work.Someone changes the page_picker and from the change some JS changes the page_title and page_name ?
read page 17 of the 6.7 FormAPI manual
This is the function which returns the value to select item from a CALL OUT window to DCR.function set_datacapture_item_value( selectedValue ){ var calloutForm = eval($form_name); for ( i = 0 ; i < calloutForm.elements.length ; i++ ) { if (calloutForm.elements.name == '$element_name') { optionsObject = calloutForm.elements.options; optionsLength = optionsObject.length; for (var z=0; z { if (page_name == optionsObject.value) { optionsObject.selected = true; optionsObject.value = page_name_id; calloutForm.elements.value = page_name; } } break; } } return true;}Possible values for page_name_id = 1 or 2 or 3 or 4 or 5.Possible values for page_name = Home Page, Level 1 Page, Level 2 Page, Level 3 Page, Level 4 PageBut its not storing the value into the drop down.
IWDatacapture.getItem("/page_name") - Returns Error So i can't use IWDatacapture.getItem("/page_name").setOptions() on the callout script to set values.
Thanks for all your responses.Got the solution for the old method code itself. Finally it worked once refreshing the item after storing the value. Code: opener.top.datacapture.refreshItem(calloutForm.elements);[ The manual mentions getScriptFrame returns value when we use callServer.Frame (top level of data capture form/parent).getScriptFrame ()This function is defined at the top level of a data capture form. If this is being called from JavaScript returned by callServer(), you will probably need to invoke it from the parent object. Returns the frame containing the API and user scripts. It is designed to be used in the JavaScript returned by the callServer() method to access functions and variables in the user script frame.I don't know how to integreate the callServer for a callout function. Thanks Ghoti for your response. ]