Kev,
I think I have sorted my problem
So in your example I remove the ChangeHandler 'getParksList' from your
cb_parkType combobox on stage
Then in the Actionscript I add a couple of lines at the end of your
getParkTypes_Result function
function getParkTypes_Result(result) {
trace("server responded: Records: " + result.getLength());
trace("setting the Drop Down");
// This function will be invoked by the server when it has finished
processing
cb_parkType.setDataProvider(result);
cb_parkType.addItemAt(0, "Select a Park Type", "NONE");
cb_parkType.setSelectedIndex(0);
cb_parkType.setChangeHandler("getParksList");
}
This ensures that the changehandler is not immediately rendered and that the
focus in the combo box goes to "Select a Park Type"
Now if and when a park type is chosen the remoting is actioned
I can thus make the lb_ParkList listbox visible only when required and it
will show the correct data (i.e there is no default)
Cheers
Andrew
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Andrew Clark
Sent: 28 May 2002 14:41
To: [EMAIL PROTECTED]
Subject: RE: [CFTALKTor] Flash Remoting KT Article
Kev
Yes I had tried this. It does work for components re hiding them
However as soon as it is visible again it shows the list of parks
for the default park-type (or equivalent in my setup)
I really want to stop the getParksList function working until I have
actively
selected an item from the parktype combo box. I've also tried
set/getSelectedIndex
without any joy
Andrew
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Kevin Towes
Sent: 28 May 2002 14:21
To: [EMAIL PROTECTED]
Subject: RE: [CFTALKTor] Flash Remoting KT Article
Here's a trick...
1) lets say the component you want to hide is called: "lb_ParkNames"
2) in Frame 1, use this script to "hide" the component:
lb_parkNames._visible = False;
3) in your Default Responder for the park-type list box, place this code:
lb_parkNames._visible = True;
note, I haven't tried it, but if it doesn't work, you could always put the
component within a movieClip, and use the _visible attribute. I am not sure
off the top of my head if you can control the visibility of components... ..
lemme know..
sorry for the vagueness... I will try an build a more contructive answer
latter...
kev.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: May 28, 2002 1:00 PM
To: [EMAIL PROTECTED]
Subject: [CFTALKTor] Flash Remoting KT Article
I've been using Kevin's article
http://www.macromedia.com/desdev/mx/coldfusion/articles/remoting.html
as a useful basis for learning this concept
His example downloads the park types but rather than set the focus of the
combo box to
the added item "Select Park Type" it goes to the first of the park types
Administrative office
which then calls the Parks List for that type
What I want is for the user to just have Select Park Type shown and then
have the option of choosing
which type. The reason is that for my purposes I would not want the Park
List list box even shown unless
the Park type was selected
I have played around without success but am sure there is an easy solution
out there I just
can't put my finger on
Andrew Clark
-
You are subscribed to the CFUGToronto CFTALK ListSRV.
This message has been posted by: "Andrew Clark" <[EMAIL PROTECTED]>
To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/
Manager: Kevin Towes ([EMAIL PROTECTED])
http://www.CFUGToronto.org/
This System has been donated by Infopreneur, Inc.
(http://www.infopreneur.net)
-
You are subscribed to the CFUGToronto CFTALK ListSRV.
This message has been posted by: "Kevin Towes" <[EMAIL PROTECTED]>
To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/
Manager: Kevin Towes ([EMAIL PROTECTED]) http://www.CFUGToronto.org/
This System has been donated by Infopreneur, Inc.
(http://www.infopreneur.net)
-
You are subscribed to the CFUGToronto CFTALK ListSRV.
This message has been posted by: "Andrew Clark" <[EMAIL PROTECTED]>
To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/
Manager: Kevin Towes ([EMAIL PROTECTED]) http://www.CFUGToronto.org/
This System has been donated by Infopreneur, Inc.
(http://www.infopreneur.net)
-
You are subscribed to the CFUGToronto CFTALK ListSRV.
This message has been posted by: "Andrew Clark" <[EMAIL PROTECTED]>
To Unsubscribe, Please Visit and Login to http://www.CFUGToronto.org/
Manager: Kevin Towes ([EMAIL PROTECTED]) http://www.CFUGToronto.org/
This System has been donated by Infopreneur, Inc.
(http://www.infopreneur.net)