XMLHttpRequest - call direct action using relative URL
XMLHttpRequest - call direct action using relative URL
- Subject: XMLHttpRequest - call direct action using relative URL
- From: "Andri vonAllmen" <email@hidden>
- Date: Thu, 23 Sep 2010 08:18:00 +0200
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.
Andri
--- 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