Hi there,

On 6/5/07, Vernon Rengo <[EMAIL PROTECTED]> wrote:
> On 14 Mrz., 02:13, "Arnar Birgisson" <[EMAIL PROTECTED]> wrote:
> > But <scripts src="xxx"></script> tags do.
> >
> > I run similar web-services. I have the server where they are located
> > serve up a .js file which defines a JS api to my webservice. The api
> > has functions that abstracts the calls loadJSONDoc (in my case, can
> > use any XHR stuff), handles parameter conversions etc.
> >
> > I then include that .js file in whatever webapp I need and just call
> > the methods defined there. Since the XHR is done to the same domain as
> > the js file that's doing it - the browser is happy.
>
> Can anybody explain that a little more in detail, please?

Sounds like you got it right. However...

> My HTML is served from
>
>     https://secure.example.com/page.php
>
> and contains these lines:
>
> <script src="http://myotherserver.com:9080/script.js"; type="text/
> javascript" charset="utf-8"></script>
> <script type="text/javascript" charset="utf-8">
>     function onPageLoad() { function_from_script(arguments); };
>     MochiKit.Signal.connect(window, "onload", onPageLoad);
> </script>
>
> function_from_script calls doSimpleXMLHttpRequest with an URL like
> http://myotherserver.com:9080/some/thing.
>
> This does NOT work.

I tried it again (I'm not using those services anymore) and you are
right.. it doesn't work.

I don't know if something has changed or if I was just wrong back
then. IE allows the XHR to go a head, but only after confirming it
with the user. FF doesn't allow it to go through at all.

Sorry for the confusion..

I guess you solution would be to forward the XHR calls from
secure.example.com to myotherserver.com:9080 - which is easy to do
with mod_rewrite if you are running Apache.

Arnar

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to