dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: AFD Postcode Validation?

  1. #1
    Member
    Join Date
    Jan 2009
    Posts
    43

    AFD Postcode Validation?

    Hi,

    My colleague and i are building a flash website in as3 and our client has requested the functionality of ADF Postcode validation whereby the user types in their postcode which is then sent to a database to query and then sends back to the customer the 1st line of their address in a drop down menu (datagrid style i imagine) so they can choose the house number, and then the rest of the fields populate.

    We have details of the database to query but have no experience in this area. Has anyone else any experience of this?

    Apparently it can be written in any web-programming language with an XML parser, though no one seems to have ever done this in flash!?

    Thanks for reading...

    G
    Last edited by G-man; 03-31-2009 at 08:36 PM.

  2. #2
    Dignitary rynoe's Avatar
    Join Date
    Jan 2003
    Location
    Earth
    Posts
    761
    actionscript parses xml very well

    PHP Code:
    var zip:XML = new XML();
    var 
    myXML:XML = new XML();
    myXML.ignoreWhite true;
    var 
    myArray:Array = new Array();
    myXML.onload = function(){
        
    myArray myXML.firstChild.childNodes;
        
    //your code
    }
    loadAddress= function(){
        
    zip "<nameOfTag>"+zipcode_txt.text+"</nameOfTag>";
        
    zip.sendAndLoad("whatever.php"myXML);

    after that myArray will behave just like XML, but gets rid of the root in xml.

    Example:
    PHP Code:
    myAddress.text myArray[2].childNodes[3].firstChild.firstChild 
    Last edited by rynoe; 04-10-2009 at 03:21 PM. Reason: typos
    [SIGPIC][/SIGPIC]

  3. #3
    Member
    Join Date
    Jan 2009
    Posts
    43

    Hi

    Many thanks for your help on this.

    I'm sure that will come in very handy!

    G

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center