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)
cgi - javascript
System
Hi,
I have a java script in cgi like below . In javascript i am calling formapi function which returns value. I want to use that returned variable in my cgi.Could pls. give idea how to use that variable.
print <<END;
<script language="JavaScript">
var value = opener.top.getScriptFrame().handle_onCallout(item);
alert(value);
</script>
END
my $parameters = "p1=value";
my $title = "Model Code/Name";
my $code_field = "code";
the value is showing up in alert but it is passing to $parameters.
Thanx in advance
Find more posts tagged with
Comments
JonathonG
The problem here is that your perl executes before the javascript. The process is something like:
Browser request cgi from server
Server executes perl, returns results (including JavaScript) to browser
Browser executes javascript, which retrieves the value from the DCT and pops up the alert.
Given this sequence, I think it obvious why the alert has the value but your Perl variable doesn't. I'm not sure what you are trying to accomplish here. Where is the CGI called from? If it is from within templating, I would suggest looking at the callServer functionality within FormAPI. Perhaps more details of what you want to do are in order.
Jonathon
Interwoven Architecture Consultant
Migrateduser
Thanx for your clarification.I am using it in templating.
I have a one question above callServer?
I have a callout like this
<cgi-callout label="Model Id..."/>
url="/iw-bin/Ex_GetModels.ipl"
window-features="width=480,height=380,resizable=no,toolbar=no,scrollbars=no"/>
It is working without any issues.
I am calling same with callServer like below
<cgi-callout label="Model Id..."/>
IWEventRegistry.addItemHandler("/ProductModels/SelectedModels", "onCallout", handle_onCallout);
handle_onCallout() {
IWDatacapture.callServer('/iw-bin/Ex_GetModels);
}
It is not working when i use callServer.I am wondering what is reason ??
Thanx in advance
Edited by krishna1288 on 06/12/03 09:08 AM (server time).
Migrateduser
you got it ..?
Migrateduser
Yes it is working .
I passed parameter to cgi-callout.
Thanx
2223.bmp
Migrateduser
cqn u send the code ..?