[Tutor] Starting a browser instance and passing a parameter toit.

Don Taylor nospamformeSVP at gmail.com
Thu Nov 29 20:16:37 CET 2007


Alan Gauld wrote:

> Have you considered writing a small Java applet (maybe using Jython to 
> do so?)
> that could communicate with the Javascript and send the XML-RPC stuff 
> to
> your server?
>

Well, I am on a Procrustean bed here - Java is not available on one of 
my target platforms.


> In fact, if JavaScript can send the 
> XML-RPC
> you wouldn't need the applet, just get the JavaScript code send the 
> message
> to fetch the parameter from the server once the page is loaded. Hmm,

I can do that in JavaScript as soon as I know the port used for the 
XML-RPC server...

> but you
> want to pass the port number... So until you get that you  are 
> stuck...Hmmm
> that probably isn't going to work! :-)
> 

No, I don't think so but I have a couple of ideas to try.

First is to construct the apps opening web-page on the fly in the 
XML-RPC server before the server instantiates the page.  I can generate 
some custom Javascript in this page that has the port number embedded 
within it.  Then the Javascript can store it in a cookie or pass it on 
to the next page as a parameter.



More information about the Tutor mailing list