Antw: Re: XMLHttpRequest - call direct action using relative URL
Antw: Re: XMLHttpRequest - call direct action using relative URL
- Subject: Antw: Re: XMLHttpRequest - call direct action using relative URL
- From: "Andri vonAllmen" <email@hidden>
- Date: Thu, 23 Sep 2010 08:45:34 +0200
>>> Chuck Hill <email@hidden> schrieb am Donnerstag, 23. September 2010
um 08:25 in Nachricht
<email@hidden>:
>
> On Sep 22, 2010, at 11:18 PM, Andri vonAllmen wrote:
>
> > Hi List,
> >
> > I'd like to call a direct action method using XMLHttpReqest in a
> JavaScript. The snippet below shows how the request is made:
> >
> > var xmlHttp;
> > xmlHttp=new XMLHttpRequest();
> > xmlHttp.open("GET",
> "/cgi-bin/WebObjects/[APP_NAME].woa/wa/[CLASS_NAME]/[METHOD_NAME]?wosid=[SID]
> ", true);
> > xmlHttp.send();
> >
> > If using a relative URL (as shown above) the request is processed only once
> per session (if doing it repeatedly), but not if using an absolute URL
> instead
> ("http://[HOST]:[PORT]/cgi-bin/WebObjects/[APP].woa/wa/[CLASS]/[METHOD]?wosid
> =[SID]"). Since it is not possible to use the servers IP address instead of
> its host name, and, in my case, the servers are not accessible through a host
> name in every case, I have to use the relative URL. The relative URL is
> generated using the WOContexts directActionURLForActionNamed method.
> >
> > Any hints, how I can get this working using relative URLs, are kindly
> appreciated.
>
>
> Try appending a random number parameter to the URL:
>
> ... ?wosid=[SID]&_r=[RANDOM NUMBER]...
>
Thanks for responding. Appending a random number doesn't help.
But, in the meantime I tried different browsers and ([PLACEHOLDER_FOR_SWEARING]) just the Internet Explorer (v8) behaves that weird, all others I've tested (Opera, FireFox, Safari, Chrome) are doing it right -.-
So this might be some IE bug.
> Chuck
>
>
> --
> Chuck Hill Senior Consultant / VP Development
>
> Practical WebObjects - for developers who want to increase their overall
> knowledge of WebObjects or who are trying to solve specific problems.
> http://www.global-village.net/products/practical_webobjects
>
--- Disclaimer: --------------------------------------------------------- This email and contents is for use only by the intended recipient. If you are not the individual or entity to whom it is addressed, you are hereby formally notified that any use, copying or distribution of this email and attachments, in whole or in part, is strictly prohibited. If you have received this email in error, please notify the sender and delete the message and attachment(s) from your system. Any views, opinions or information, expressed or contained in this email, are those of the sender and not necessarily reflect those of CEDES. To help protect our environment, please avoid printing out this information unnecessarily.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden