Tracy is right, but there is an easier way.
Change your HTTPService tag to look like this:
<mx:HTTPService id="srv" url="installation.jsp">
<mx:request>
<ID>{nameOf}</ID>
</mx:request>
</mx:HTTPService>
You can still reference the srv ID from AS and call it elsewhere in your
app. But now - when you call srv it will append ID to the querystring and
add nameOf as the value to that variable.
Give that a go.
Jeff
http://www.flexauthority.com
----- Original Message -----
From: "Tracy Spratt" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, February 24, 2005 5:50 PM
Subject: RE: [flexcoders] Dynamic URL for HTTPService
>
> I don't think you can bind in the query string like that. Instead you
> will want to manipulate the request object:
> var oRequest:Object = new Object({id:nameOf});
> srv.send(oRequest);
>
> There is a full example on www.cflex.net at the end of the beginner tips
> section.
> Tracy
>
> -----Original Message-----
> From: digital_eyezed [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 24, 2005 7:07 PM
> To: [email protected]
> Subject: [flexcoders] Dynamic URL for HTTPService
>
>
>
> I have a drop down, populated and want to use the change event to
> populate the httpservice url parameter which will also fire off
> another httpservice.
>
> I have this:
>
> <mx:Script>
> <![CDATA[
> var nameOf = "";
> function custChange(event)
> {
> nameOf = cusBox.data;
> srv.send();
> }
> ]]>
> </mx:Script>
> <mx:HTTPService id="srv" url="installation.jsp?id='{nameOf}'"/>
> <mx:HTTPService id="cust" url="cus.jsp"/>
> <mx:HBox>
> <mx:VBox>
> <mx:ComboBox id="cusBox"
> dataProvider="{cust.result.list.customer}" change="custChange
> (event)"></mx:ComboBox>
> </mx:VBox>
> <mx:Panel title="'{nameOf}' Installation List" width="515"
> height="350">
> <mx:DataGrid id="dg" dataProvider="{srv.result.list.installation}"
> width="500" height="255">
> <mx:columns>
> <mx:Array>
> <mx:DataGridColumn columnName="postcode"
> headerText="Post Code" width="100"/>
> <mx:DataGridColumn columnName="manufacturer"
> headerText="Manufacturer" width="100"/>
> <mx:DataGridColumn columnName="model"
> headerText="Model" width="100"/>
> <mx:DataGridColumn columnName="location"
> headerText="Location" width="200"/>
> </mx:Array>
> </mx:columns>
> </mx:DataGrid>
>
> How can I use the data element of the combobox to properly populate
> the httpservice parameter and fire off the request and also use it
> to populate the Title of the Panel??
>
> Thanks in Advance.
>
> PS: Stupid Question, but if my data returned in the httpService has
> some silly characters in the nodes such as '&' it also fails. Why?
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>