For my current contract we have a CGI on server A that users can log into
directly.  It controls their experience.

We have a second CGI on server B, behind the firewall. In case anyone is
familiar with it, CGI B is a forum/discussion app called "Web Crossing".

I have been asked (if I can) to set things up so that CGI A controls CGI B
remotely.  The user will think they are interacting with CGI/server A at all
times.

I am using libWWW to pass requests back and forth, using LWP::UserAgent.
Everything works spiffily ... except if CGI B wants to do something with
Javascript.

Disclaimer: I know Perl and HTML pretty well but I am very much a beginnewr
with JavaScript (and my preference would be to remain that way but sadly that
is not to be...)

In any case, when I try to send/receive with JavaScript involved I have
problems.

E,g, There is a link that has the source:

<a onclick="prefsUrl( this )"
href="/cgi-bin/WebX?[EMAIL PROTECTED]^[email protected]"><img
alt=" Your Preferences " border=0 src="/webxImages/b8/prefs.gif"
WIDTH=68 HEIGHT=30></a>


When we modify that so it comes to CGI A, it looks like

<a onclick="prefsUrl( this )"
href="http://...user.cgi/wsforums.main/a_href/cgi-bin/WebX?[EMAIL PROTECTED]%[email protected]";><img
alt=" Your Preferences " border=0 src="/webxImages/b8/prefs.gif"
WIDTH=68 HEIGHT=30></a>

When I click on the link I get the main index.html page of the host, as if no
'doc' was sent.  However, if I clip the href from the source and submit it in
the  address line of the browser, it works perfectly.

Other links on this page only use an <a href=...</a> and do not include the
bit of JavaScript.  They all work as expected.

Another example is the "calendar" which seems to be done entirely in
JavaScript and comes up blank (but works if I access server B and CGI B
directly).

One more thing; the vendor of CGI B (which is not in Perl and not Open
Source) says they use "Server-side JavaScript". They are very proud of this.
As I read their definition, this should cause me _less_ trouble, not more!

    "Server-side" means that the control of the script is handled by the
     Web Crossing server rather than running a script on each user's personal
     computer. Web Crossing runs the scripts and sends standard HTML (web
     pages) to each user's browser. All the end user's browser has to worry
    about is displaying the results...

Unless somehow CGI B is trying to run the Javascript on Server A.

Any ideas appreciated.
-- 
- Vicki

Vicki Brown     ZZZ                  Journeyman Sourceror:                  
P.O. Box 1269      zz  |\     _,,,---,,_        Scripts & Philtres
San Bruno, CA       zz /,`.-'`'    -.  ;-;;,_     Perl, Unix, MacOS
94066     USA         |,4-  ) )-,_. ,\ ( `'-'    
mailto:[EMAIL PROTECTED]  '---''(_/--'  `-'\_)  http://www.cfcl.com/~vlb

Reply via email to