Thats the one andrew, sorry i'm kinda new to the actionscritp brainspace.

I havnt gotten to the preselecting the combo boxes yet.. (getting there)
Where im at is trying to do something meaningful with the query results that
are handed back from the cfc..

Do i need to do any thing fancy with them, or do i just assign the values to
the text fields etc? Im having trouble working out how to get at the record
returned from the CFC.. i seem to be be getting undefied alot when tracing
out values....  :-S
Mark reccomended the code below but i cant tell if its working or not, or
waht to do next.. i output MyJob.Fieldname and get undfined..

Any pointers appreciated

jason

MyJob = new Object();
LookUpJob_Result = function (result) {
myResult = result.Items;
for (var i = 0; i < myResult.length; ++i) {
         for (col in myResult[i]){MyJob[col] = myResult[i][col];}
     }
}



"Andrew Muller" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
>
> Jason
>
> Just so that I'm clear on what you're trying to do...
>
> I presume that the form already has the ComboBox populated.
>
> You're then retrieving an individual record from the db via your cfc.
>
> With that information you're prefilling the form, including preselecting
> the ComboBox.
>
> And you're trying to work out how to preselect the already populated
> ComboBox.
>
> Is that right?
>
> Andrew
>
> Jason Bayly wrote:
> > i want to basically grab the results from a query and populate a heap of
> > form fields. Which i then want to update the record with after they have
> > made mods.. A basic edit form scenario.
> >
> > I seem to be stuck.. in getting the query which is returned from a cfc
into
> > flash in such a way to do soemthing usefull with it. I catch the result
set
> > from the cfc, which is query result set with a single row in it.. I need
to
> > set the values as local vars so i can then preselect the combo boxes
etc..
> > You still with me ??
> >
> > What would you do in this scenario ?
> > TIA
> >
> > JB
> >
> >
> > "Scott Barnes" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> >
> >>Not sure on what your trying to achieve?
> >>
> >>You could simply set the yourTextfield.text = items[0].field?
> >>
> >>Personally when possible, i'd advise leveraging the dataprovider in v1,
> >>as its basically a simplified way of accessing Arrays much like CFMX (ie
> >>arrayInsertAt etc).
> >>
> >>Scott
> >>
> >>
> >>Jason Bayly wrote:
> >>
> >>
> >>>Thanks Scott,
> >>>
> >>>Any ideas on the best way to handle a sinlge row result set from a
query
> >>>that i want to use to populate a form in flash so a user can update the
> >>>information etc.. I dont want to bind it to anything, but simply assign
> >
> > the
> >
> >>>values to text fields in my MC.
> >>>
> >>>Cheers
> >>>Jason
> >>>
> >>>
> >>>
> >>>"Scott Barnes" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> >>>
> >>>
> >>>>yourListbox.getSelectedIndex()
> >>>>
> >>>>If you want specifics or know where / how listbox handles its data,
take
> >>>>a look at the dataprovider class (v1, v2), it will show you the way.
> >>>>
> >>>>If you are after v2 components "how to",
> >>>>then its:
> >>>>
> >>>>yourItem = myComboBox.selectedItem;
> >>>>trace("You selected the item " + yourItem );
> >>>>
> >>>>Regards
> >>>>Scott Barnes
> >>>>http://macrofun.pvpers.com
> >>>>
> >>>>
> >>>>
> >>>>Jason Bayly wrote:
> >>>>
> >>>>
> >>>>
> >>>>>Ok i think im on the right track with
> >>>>>
> >>>>>menuMain.setSelectedIndex(3);
> >>>>>
> >>>>>:))
> >>>>>
> >>>>>"Jason Bayly" <[EMAIL PROTECTED]> wrote in message
> >>>
> >>>news:[EMAIL PROTECTED]
> >>>
> >>>
> >>>>>>Hi All
> >>>>>>
> >>>>>>Making headway on my flash forms using CFC's etc. One quick question
> >
> > is,
> >
> >>>>>>when doing an edit/update form how does one go about selecting (or
> >>>>>>defaulting to) an item in a dynamically populated combo box ? In
cfml
> >
> > we
> >
> >>>>>>evalauate the value when generating the select list and select the
> >
> > item
> >
> >>>>>with
> >>>>>
> >>>>>
> >>>>>
> >>>>>>the correct value etc..
> >>>>>>
> >>>>>>How is this achieved in actionscript ??
> >>>>>>
> >>>>>>Cheers
> >>>>>>Jason
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>-- 
> >>>>Scott Barnes
> >>>>http://macrofun.pvpers.com
> >>>>
> >>>>
> >>>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>
> >>-- 
> >>Scott Barnes
> >>http://macrofun.pvpers.com
> >>
> >>
> >>
> >
> >
> >
> >
> >
>
> -- 
> Andrew Muller
> Senior Macromedia Certified Instructor - ColdFusion, Flash
> Certified Advanced Macromedia ColdFusion Developer - CF5, CFMX
> Certified Macromedia Flash Developer - FL5, FMX
>
> Daemon Internet Consultants
> [EMAIL PROTECTED]
> Macromedia Certified Training
> http://www.daemon.com.au/go/training
> T: 61 2 9380 4162
> F: 61 2 9380 4204
> 17 Roslyn Gardens
> Elizabeth Bay NSW 2011 AUSTRALIA
>
> Daemon: Serious Web Development
>
> FarCry, the open source CMS for ColdFusion MX
> http://farcry.daemon.com.au/
>
>
>



---
You are currently subscribed to fugli as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

Reply via email to