Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Set Replicant Values from CallOut Button
ozzie
Has anyone ever had a callout button in a replicant on a DCT, that opened a window for the user to select a value, then have that value returned to the replicant field on the DCT?
For Example, I have a callout button on a replicant field that opens a new window for the users to select a value from a drop down box. The Callout button is within a replicant. I need to have the selected value returned to the DCT.
In the DCT, the name for the replicant is defined as "Product/0/Product_Code". My Javascript in the CGI program is set to
$form.$item_name.value = 99.
Where $item_name is "Product/0/Product_Code". This works for fields not in a replicant, but I get a javascript error when trying to set the value of the field, Product/0/Product_Code.
Find more posts tagged with
Comments
Migrateduser
I think you may be using the old style of JavaScript in your callout. I think you would be better off with standard FormAPI syntax. I think it looks something like:
parent.getScriptFrame().IWDatacapture.getItem( '/whatever' ).setValue( 'something' );
The '/whatever' is passed to the CGI somehow (use show_env.cgi temporarily to see what parameter to check).
ozzie
I do that in other places, which works fine on replicants. Can FormAPI open a new viewable window for the user to select values?
Migrateduser
Sure, FormAPI can do window.open to any URL, but what I'm saying is you can still use a callout, but have it return results to the form using FormAPI instead of the old Perl techniques. I may just be confused/confusing, sorry.
ozzie
So, FormAPI commands like, IWDatacapture.getItem("/field1").setReadOnly(false);
can be used on CGIs that are called from CallOut buttons on the DCT?
Migrateduser
I am pretty sure I've done this. For this specific thing (readonly) I think you would want to call IWDatacapture.redraw() afterwards.
ozzie
Thanks, I will give it a try.
ozzie
You can use FormAPI commands from callout buttons, as long as you use, "opener.parent.getScriptFrame();". I was just using parent.getScriptFrame();
thanks