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)
Pass Value
coltrane30
How would i pass a value from one IPL file to another IPLfile in javascript
thanks in advance
Find more posts tagged with
Comments
jbonifaci
So you have an ipl file that is outputing html/javascript and on submit it is calling another ipl file, correct? Basically you need to have the first ipl also output a hidden field to your form with the value you want the second ipl to have access to. The second ipl would then get that value from the post data. It is basic cgi stuff, you should be able to find many examples on the forum and on the web in general.
~Jeff
coltrane30
Jeff,
I'm writing this for DCT.
This is what my IPL does. I'm being struggling this problem forever now.
IPL File # 1
--------------------
This has a javascript function that calls CallServer.
var params = new Object();
var myOptions = item.getOptions();
params.category = myOptions[parseInt(item.getValue())].value;
top.hiddenFrameRunning = true;
var server = window.location.hostname;
IWDatacapture.callServer("http://" + server +"/iw-bin/test1.ipl", params, true);
---------------------------------------------------------------------------------------------
IPL File # 2 (i.e. test1.ipl)
This file goes and returns data using Perl script no HTML or Javascript
-------------------------------------------------------------------------------------
#!e:\iw-home\iw-perl\bin\iwperl -w
use TeamSite::CGI_lite;
my
@arr
= '';
my $ctr = 0;
my $cgi = TeamSite::CGI_lite->new();
$cgi->parse_data();
my $category = $cgi->{form}{category};
#print $category;
-----------------
This is all my IPL File # 2 does.
This value which is being return by IPL File # 2 I want to access this value in my IPL File # 1 Javascript.
Tell me if, it is possible. If, not advice me work around on this.
Thanks,
jbonifaci
This question has been brought up in a few posts lately. Check out
this post
and
this post
. There have been many other posts on this subject as well. If you read up on them and still can't figure it out, let us know.
~Jeff
coltrane30
Jeff,
I went and did some modifications on mine but with no success.
I looked at both posting it didn't help.
IPL FILE # 1
-------------------------------------
This file does callserver call.
This file has two functions.
Function # 1 does callserver (Onchange event of droplist)
Function # 2 has alert on parent.ScriptFrame().variable (onchange event of droplist # 2)
IPL FILE # 2
-------------------------------------
This file returns
print "Content-type: text/html\n\n";
print "<html><head><script>parent.getScriptFrame().PERL="From Perl";</script></head><body></body></html>";
--------------------------------------------------------------------------------------------------------------------------------------
this is what i just copied from one of the POST. I tried to check the value or PERL and it showed me same.
I know I have to wait for few seconds to get back the response from server and that's the reason i have alert on
second droplist.
thanks,
jbonifaci
Seems like the file you are calling your first ipl is really a js file. Either way, please attach all relative code and I might be able to tell you where you are going wrong.
~Jeff