it sends the request fine in firefox but it never gets sent in ie7 (im using iewatch). here''s my code: var headers = [''Man'', ''POST http://'' + location.host + ''/something HTTP/1.1'',''MessageType'',''CALL'' ]; var myAjax = new Ajax.Request( url, { requestHeaders: headers ,contentType: ''text/xml'', method: ''post'', postBody: myString, onComplete: parseResponse }); --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
I''m unclear why you''re trying to force an HTTP header when that''s already abstracted for you by the variable ''url'', and option method: ''post''. Let the browser handle it. My knowledge of HTTP headers is a bit rusty, but don''t think ''Man'' and ''CALL'' are valid headers. ;) ''could be that IE is throwing an exception. Try it w/o your custom headers; make sure url, postBody, and parseResponse are defined. If it still doesn''t work, test it without overriding the contentType. In other words, reduce your problem to a minimal set until you discover your bug. And one more thing.... IE7 is a bit pickier about where you can AJAX to. localhost won''t work, as I understand (I''ve never tried it). TAG On Feb 15, 2007, at 4:37 PM, Joe A wrote:> it sends the request fine in firefox but it never gets sent in ie7 > (im using iewatch). here''s my code: > > var headers = [''Man'', ''POST http://'' + location.host + ''/something > HTTP/1.1'',''MessageType'',''CALL'' ]; > var myAjax = new Ajax.Request( url, { requestHeaders: > headers ,contentType: ''text/xml'', method: ''post'', postBody: > myString, onComplete: parseResponse }); > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
i resolved the issue, basically i was building the url using location.host + location.port, when in fact i just need location.host. so the url ended up being http://hostname:8080:8080, which im guessing IE7 didn''t like, but firefox had no problem with it. thanks for the response tom On 2/15/07, Tom Gregory <tomg-PGZyUNKar/Q@public.gmane.org> wrote:> > > I''m unclear why you''re trying to force an HTTP header when that''s > already abstracted for you by the variable ''url'', and option method: > ''post''. Let the browser handle it. > > My knowledge of HTTP headers is a bit rusty, but don''t think ''Man'' > and ''CALL'' are valid headers. ;) > > ''could be that IE is throwing an exception. Try it w/o your custom > headers; make sure url, postBody, and parseResponse are defined. If > it still doesn''t work, test it without overriding the contentType. > > In other words, reduce your problem to a minimal set until you > discover your bug. > > And one more thing.... IE7 is a bit pickier about where you can AJAX > to. localhost won''t work, as I understand (I''ve never tried it). > > > TAG > > > On Feb 15, 2007, at 4:37 PM, Joe A wrote: > > > it sends the request fine in firefox but it never gets sent in ie7 > > (im using iewatch). here''s my code: > > > > var headers = [''Man'', ''POST http://'' + location.host + ''/something > > HTTP/1.1'',''MessageType'',''CALL'' ]; > > var myAjax = new Ajax.Request( url, { requestHeaders: > > headers ,contentType: ''text/xml'', method: ''post'', postBody: > > myString, onComplete: parseResponse }); > > > > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---