Hi! Tnx for all the help...it was very usefull. But still I'm getting some strange errors when running the application for the first time.
When I for the first time try to submit blank text fields I get this error: Error #1088: The markup in the document following the root element must be well-formed. As soon as I type something in the text fields the application starts to work. Even if I again supply blank fields. What could be the problem? Below is my XML file and MXML: XML file <izhod> <spremenljivke> <sprem>login</sprem> <vrednost>1</vrednost> </spremenljivke> </izhod> If 1 then user can proceed otherwise wrong password/username. MXML <?xml version="1.0" encoding="utf-8"?> <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="300"> <mx:Script> <![CDATA[ import mx.rpc.events.ResultEvent; public function onResult(oEvent:ResultEvent):void { var xmlResult:XML = new XML(oEvent.result); tekst.text = xmlResult.spremenljivke[0].vrednost; } ]]> </mx:Script> <mx:HTTPService resultFormat="e4x" result="onResult(event)" url="http://localhost/~iztok/rokus_v2.com/vstop.php" method="POST" showBusyCursor="true" id="reqLogin" > <mx:request> <uporabnik>{txtUporabnik.text}</uporabnik> <geslo>{txtGeslo.text}</geslo> </mx:request> </mx:HTTPService> <mx:Canvas x="0" y="0" width="400" height="300"> <mx:VBox x="0" y="0" width="400" height="300" horizontalAlign="center" verticalAlign="top" verticalGap="0"> <mx:Text text="[EMAIL PROTECTED]" fontSize="30" width="283" textAlign="center" height="57"/> <mx:Form height="131"> <mx:FormItem label="Uporabnik:" required="true"> <mx:TextInput id="txtUporabnik"/> </mx:FormItem> <mx:FormItem label="Geslo:" required="true"> <mx:TextInput displayAsPassword="true" id="txtGeslo"/> </mx:FormItem> <mx:FormItem> <mx:Button label="Prijava" click="reqLogin.send();"/> </mx:FormItem> </mx:Form> <mx:TextArea id="tekst"/> </mx:VBox> </mx:Canvas> </mx:Canvas> --- In flexcoders@yahoogroups.com, "Tracy Spratt" <[EMAIL PROTECTED]> wrote: > > If you are currently binding to the dataGrid's dataProvider property, > you could intead use a result handler function. > > <mx:HTTPService result="onResult(event)"... resultFormat="e4x" /> > > import mx.rpc.events.ResultEvent; > Private function onResult(oEvent:ResultEvent):void > { > var xmlResult:XML = XML(oEvent.result); > //traverse the xml as needed to perform desired logic > myDataGrid.dataProvider = xmlResult; //same reference as you use in > the binding expression > } > > Tracy > > -----Original Message----- > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On > Behalf Of Tom Chiverton > Sent: Thursday, June 22, 2006 10:33 AM > To: flexcoders@yahoogroups.com > Subject: Re: [flexcoders] Re: working with XML data > > On Thursday 22 June 2006 12:29, arnold_charming wrote: > > 1. How to transfer XML I got from HTTPService to AS so I can check if > > he/she is allowed to enter the application? > > If you are displaying it in a datagrid, it must all ready be in AS. > You want to read up on E4X etc. from the manual. > > > 2. What is the best way/method to redirect a user to a different > > screen? Is it wise just to turn components from 'visible=true' to > > 'visible=false' or should I destroy the component with removeChild()? > > Look at changing the selectedIndex of a viewstack. > > > stupid > > We're all new to it :-) > -- > Tom Chiverton > > **************************************************** > > This email is sent for and on behalf of Halliwells LLP. > > Halliwells LLP is a limited liability partnership registered in England > and Wales under registered number OC307980 whose registered office > address is at St James's Court Brown Street Manchester M2 2JF. A list > of members is available for inspection at the registered office. Any > reference to a partner in relation to Halliwells LLP means a member of > Halliwells LLP. Regulated by the Law Society. > > CONFIDENTIALITY > > This email is intended only for the use of the addressee named above and > may be confidential or legally privileged. If you are not the addressee > you must not read it and must not use any information contained in nor > copy it nor inform any person other than Halliwells LLP or the addressee > of its existence or contents. If you have received this email in error > please delete it and notify Halliwells LLP IT Department on 0870 365 > 8008. > > For more information about Halliwells LLP visit www.halliwells.com. > > We are pleased to announce that Halliwells LLP has been voted AIM Lawyer > of the Year at the 2005 Growth Company Awards > > > > > -- > Flexcoders Mailing List > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > Search Archives: > http://www.mail-archive.com/flexcoders%40yahoogroups.com > Yahoo! Groups Links > ------------------------ Yahoo! Groups Sponsor --------------------~--> Check out the new improvements in Yahoo! Groups email. http://us.click.yahoo.com/6pRQfA/fOaOAA/yQLSAA/nhFolB/TM --------------------------------------------------------------------~-> -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/