R
Richard Trahan
I am using the following method to call a Perl script from js:
<script type="text/javascript" src="http://myserver.com/cgi-bin/x.pl?x=abc"
</script>
The Perl writes an application/x-javascript header followed by some js
code (like document.write).
This works fine (thank you, Martin Honnen). I can't use the hidden frame
method suggested by Erwin Moller because the client page is an eBay ad,
and they will not allow any frame code.
Now I want to pass to my Perl script an argument value which cannot be
known until the page is loading (specifically, the page title, which is
created by eBay and contains a unique id). I know how to get the page
title with js, but there's no way (that I can figure out) to dynamically
create the src argument of the <script> tag. Can anyone help me with
this?
<script type="text/javascript" src="http://myserver.com/cgi-bin/x.pl?x=abc"
</script>
The Perl writes an application/x-javascript header followed by some js
code (like document.write).
This works fine (thank you, Martin Honnen). I can't use the hidden frame
method suggested by Erwin Moller because the client page is an eBay ad,
and they will not allow any frame code.
Now I want to pass to my Perl script an argument value which cannot be
known until the page is loading (specifically, the page title, which is
created by eBay and contains a unique id). I know how to get the page
title with js, but there's no way (that I can figure out) to dynamically
create the src argument of the <script> tag. Can anyone help me with
this?