0 Replies Latest reply on Sep 15, 2010 10:27 AM by laxmidi

    HTTPService and Relative Path

    laxmidi Level 1

      Hi,

       

      I've got an easy question about HTTPService.

       

       

      I've got an HTTPService as follows:

       

       

      <!--Production version-->

      <mx:HTTPService id="neighborhoodMapService"

      url="http://www.mysite.com/data/coordinates.xml"

      result="resultHandler(event)"

      resultFormat="e4x"/>

       

       

      On my localhost, I use:

       

      <!--Localhost version-->

       

      <mx:HTTPService id="neighborhoodMapService"

      url="/data/coordinates.xml"

      result="resultHandler(event)"

      resultFormat="e4x"/>

       

      When I compile to put my project on the server, I have to comment out the localhost version. And vice versa when I'm working on my localhost. It's kind of a pain.

       

      Is there a way to use a relative path so, that it will work on both my localhost and my production server? What would the relative path be for this example?

       

      Thank you.

       

      -Laxmidi