<mx:Button label="Go"
  click="buildMyUrl(textinput.text);myService.send()" />

when i do that i get an error at runtime saying
TypeError: Error #1009: null has no properties.
    at index/__search_click()


Doug Lowder wrote:
> It's up to you where you put the call to buildMyUrl(), depending on
> when and how you want your http service to be invoked.  You could
> add a button and put it in the click handler:
>
> <mx:Button label="Go"
>   click="buildMyUrl(textinput.text);myService.send()" />
>
> Or you could even call it in the enter handler for your text imput;
> just type some text and hit enter to call your service:
>
> <mx:TextInput id="textinput"
>   enter="buildMyUrl(event.target.text);myService.send()" ... />
>
>
> --- In flexcoders@yahoogroups.com, Faisal Abid <[EMAIL PROTECTED]> wrote:
> >
> > Okay i see where your going at , so how would i call BuildMyUrl ,
> like
> > so i made teh function and then i made trhe service and then i
> made the
> > textinput , where do i put BuildMyURL(textinput.text) (and is it
> normail
> > brakets or curly) , im sorry if this is an easy question,  im sort
> of
> > really stressed out and stumped.
> >
> >
> > Doug Lowder wrote:
> > > Try binding the entire url property to a variable that you build
> in
> > > code:
> > >
> > >   var myUrl: String = "";
> > >   function buildMyUrl(s: String) {
> > >       myUrl = "http://something.com/api/someting/" +
> > >           s + "/somethingelse/something";
> > >   }
> > >
> > > <mx:HTTPService url="" ... />
> > >
> > >
> > > Then just call "buldMyUrl(textinput.text)" somewhere, such as the
> > > click handler for a button or just before you call your
> > > httpservice's send() method.
> > >
> > >
> > > --- In flexcoders@yahoogroups.com, Faisal Abid <Faisal@> wrote:
> > > >
> > > > Okay so for the past 4 hours + 3 hours at night ive been
> debugging
> > > my
> > > > application only to come to the conclusion that in a
> httpservice
> > > url i
> > > > cannot do this
> > > >
> > > > <mx:httpservice
> > > > url="" href="http://something.com/api/someting/">http://something.com/api/someting/
> > > {textinput.text}/somethingelse/something"
> > > >
> > > > The httpservice is fine , i test it in a broswer by replacijng
> > > > texinput.txt to something and it returns what its ment to ,
> but in
> > > flex
> > > > it gives me an error saying i must defind a url, I mean it is
> > > defined ,
> > > > i know there is a workaround to & by puttin &amp; But What the
> hec
> > > is
> > > > wrong with my url??
> > > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > Flexcoders Mailing List
> > > FAQ:
> http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > > Search Archives: http://www.mail-archive.com/flexcoders%
> 40yahoogroups.com
> > >
> > >
> > >
> > > SPONSORED LINKS
> > > Web site design development
> > > <http://groups.yahoo.com/gads?
> t=ms&k=Web+site+design+development&w1=Web+site+design+development&w2=
> Computer+software+development&w3=Software+design+and+development&w4=M
> acromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=L
> -4QTvxB_quFDtMyhrQaHQ>
> > >       Computer software development
> > > <http://groups.yahoo.com/gads?
> t=ms&k=Computer+software+development&w1=Web+site+design+development&w
> 2=Computer+software+development&w3=Software+design+and+development&w4
> =Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig
> =lvQjSRfQDfWudJSe1lLjHw>
> > >       Software design and development
> > > <http://groups.yahoo.com/gads?
> t=ms&k=Software+design+and+development&w1=Web+site+design+development
> &w2=Computer+software+development&w3=Software+design+and+development&
> w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.s
> ig=1pMBCdo3DsJbuU9AEmO1oQ>
> > >
> > > Macromedia flex
> > > <http://groups.yahoo.com/gads?
> t=ms&k=Macromedia+flex&w1=Web+site+design+development&w2=Computer+sof
> tware+development&w3=Software+design+and+development&w4=Macromedia+fl
> ex&w5=Software+development+best+practice&c=5&s=166&.sig=OO6nPIrz7_EpZ
> I36cYzBjw>
> > >       Software development best practice
> > > <http://groups.yahoo.com/gads?
> t=ms&k=Software+development+best+practice&w1=Web+site+design+developm
> ent&w2=Computer+software+development&w3=Software+design+and+developme
> nt&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166
> &.sig=f89quyyulIDsnABLD6IXIw>
> > >
> > >
> > >
> > > -----------------------------------------------------------------
> -------
> > > YAHOO! GROUPS LINKS
> > >
> > >     *  Visit your group "flexcoders
> > >       <http://groups.yahoo.com/group/flexcoders>" on the web.
> > >      
> > >     *  To unsubscribe from this group, send an email to:
> > >        [EMAIL PROTECTED]
> > >       <mailto:[EMAIL PROTECTED]
> subject=Unsubscribe>
> > >      
> > >     *  Your use of Yahoo! Groups is subject to the Yahoo! Terms
> of
> > >       Service <http://docs.yahoo.com/info/terms/>.
> > >
> > >
> > > -----------------------------------------------------------------
> -------
> > >
> >
>
>
>
>
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
>
>
>
> SPONSORED LINKS
> Web site design development
> <http://groups.yahoo.com/gads?t=ms&k=Web+site+design+development&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=L-4QTvxB_quFDtMyhrQaHQ>
>       Computer software development
> <http://groups.yahoo.com/gads?t=ms&k=Computer+software+development&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=lvQjSRfQDfWudJSe1lLjHw>
>       Software design and development
> <http://groups.yahoo.com/gads?t=ms&k=Software+design+and+development&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=1pMBCdo3DsJbuU9AEmO1oQ>
>
> Macromedia flex
> <http://groups.yahoo.com/gads?t=ms&k=Macromedia+flex&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=OO6nPIrz7_EpZI36cYzBjw>
>       Software development best practice
> <http://groups.yahoo.com/gads?t=ms&k=Software+development+best+practice&w1=Web+site+design+development&w2=Computer+software+development&w3=Software+design+and+development&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=f89quyyulIDsnABLD6IXIw>
>
>
>
> ------------------------------------------------------------------------
> YAHOO! GROUPS LINKS
>
>     *  Visit your group "flexcoders
>       <http://groups.yahoo.com/group/flexcoders>" on the web.
>       
>     *  To unsubscribe from this group, send an email to:
>        [EMAIL PROTECTED]
>       <mailto:[EMAIL PROTECTED]>
>       
>     *  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>       Service <http://docs.yahoo.com/info/terms/>.
>
>
> ------------------------------------------------------------------------
>



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to