Adobe Dreamweaver Forums



Last 10 THreads :         CSH Calls for Merged CHM's (Last Post : Colum McAndrew - Replies : 2 - Views : 3 )           »          Sessions and subdomains (Last Post : Mack - Replies : 2 - Views : 3 )           »          button event with transparency (Last Post : Kruc3fix - Replies : 1 - Views : 2 )           »          My video seems to be stuck on streaming (Last Post : dazzclub - Replies : 0 - Views : 1 )           »          Problem initialising quicktime (Last Post : eoinie - Replies : 4 - Views : 5 )           »          Creating images to look like original oil paintings? (Last Post : chris_farrell@adobeforums.com - Replies : 2 - Views : 3 )           »          Uncatchable Error 2101 (Last Post : M4G1C14N - Replies : 8 - Views : 9 )           »          Log email text (Last Post : Mack - Replies : 4 - Views : 5 )           »          Can I make a 4 state CSS Sprite nav bar. (Last Post : Dooza - Replies : 10 - Views : 11 )           »          Adobe Flash 10 kills Wimpy (Last Post : artmanjam - Replies : 107 - Views : 108 )           »         


Mission Statement
DreamWeaverForum.infois an online Community of web developers joining together to better their field, share problems and solutions as well as promoting their cause.
We strive to bring you the best information, tools, downloads and news to support your work and companys efforts working in web development.
With our favorite tool "Dreamweaver" and the tools and information we bring you, You should be in a great postion to better your skills and show the world your work.
Come back often, Stay late we have many new things coming your way. Wish you all the best in 2009 information..



 



User Info Statistics
Go Back   Adobe Dreamweaver Forums > Macromedia Software > Cold Fusion > Rich Forms
 
Tags:



Reply
  #1 (permalink)  
Old 11-14-2008, 04:05 PM
John Gillett
 
Posts: n/a
Diggs:
Default Bind checkboxes in Flash form

I have a 2-part form, grid and edit pane. The grid is populated from a query
and shows only enough of the record to make it recognizable. The user
selects a record, which then populates the edit pane. Everything works fine
except the binds to checkboxes and a select dropdown.

I use the following for my text binds... <cfinput type="checkbox"
name="ConnASU2" value="ConnASU2" label="Connections to ASU"
bind="{buildingList.selectedItem.ConnASU}" /> Pretty standard stuff. However
getting the checkboxes and select to show the proper selections has eluded
me.

The form can be seen at
http://www.west.asu.edu/dpc/commbldgrpt/editdel2.cfm. All checkboxes are
'true' in the DB. 'Month' should be the dropdown.

Assistance appreciated.

Thanks.

John




Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-15-2008, 07:03 AM
BKBK
 
Posts: n/a
Diggs:
Default Re: Bind checkboxes in Flash form

Could you show that piece of code. I have some suggestions, but they'll be specific to your particular case.


Reply With Quote
  #3 (permalink)  
Old 11-25-2008, 05:24 PM
John Gillett
 
Posts: n/a
Diggs:
Default Re: Bind checkboxes in Flash form

I set everything back to the 'standard' text-type bind, since I couldn't
figure it out...

<cfinput type="checkbox" name="ConnRes2" value="ConnRes2" label="Connect
With Your Residents" bind="{buildingList.selectedItem.ConnRes}" />

Obviously that bind won't cut it for a checkbox. The values for the
checkboxes are all pulled in via the query, but are not displayed in the
grid because of space constraints.I suspect I have to add them to the grid
with a display="no", but I'm still stuck on the bind.

Thanks.

"BKBK" <webforumsuser@macromedia.com> wrote in message
news:gfls0r$ai3$1@forums.macromedia.com...
> Could you show that piece of code. I have some suggestions, but they'll be
> specific to your particular case.
>
>



Reply With Quote


  #4 (permalink)  
Old 11-26-2008, 07:46 AM
BKBK
 
Posts: n/a
Diggs:
Default Re: Bind checkboxes in Flash form

Here then:

<cfset dates = "2/21/2005,3/4/2006,4/14/2007,5/23/2007,11/25/2008 ">
<!--- NB: Avoid the usual space after comma. Otherwise cannot cast string
list-element to boolean.
Actionscript doesn't have trim function to help you here --->
<cfset choices = "true,false,true,true,false">
<cfform name="myDatePicker" format="flash">
<cfgrid name="dateChoice" height = "120" onchange="setMonthAndChoice();">
<cfgridcolumn name="dt" header="Date">
<cfgridcolumn name="ch" header="Choice">

<cfloop index="i" from="1" to="#ListLen(dates)#">
<cfgridrow data ="#ListGetAt(dates, i)#,#ListGetAt(choices, i)#">
</cfloop>
</cfgrid><br /><br />
<cfformitem type="script">
function setMonthAndChoice(){
var isTicked = true;
// equivalent to a cast from string to boolean
if(dateChoice.selectedItem.ch != 'true')isTicked=false;

// check or uncheck checkbox
choice.selected = isTicked;
// get month number out of date
mnth.setSelectedIndex(parseInt(dateChoice.selected Item.dt.split('/')[0])-1);
}
</cfformitem>
<cfinput name="date" type="text" label="Date"
bind="{dateChoice.selectedItem.dt}" />
<cfinput name="choice" type="checkbox" label="Yes or no?"/>
<cfselect name="mnth" label="Month">
<option value="1">January</option>
<option value="2">February</option>
<option value="3">March</option>
<option value="4">April</option>
<option value="5">May</option>
<option value="6">June</option>
<option value="7">July</option>
<option value="8">August</option>
<option value="9">September</option>
<option value="10">October</option>
<option value="11">November</option>
<option value="12">December</option>
</cfselect>
</cfform>



Reply With Quote
  #5 (permalink)  
Old 12-04-2008, 09:14 PM
John Gillett
 
Posts: n/a
Diggs:
Default Re: Bind checkboxes in Flash form

Thank you. Will give it a try.

"BKBK" <webforumsuser@macromedia.com> wrote in message
news:ggiudg$ntl$1@forums.macromedia.com...
> Here then:
>
> <cfset dates = "2/21/2005,3/4/2006,4/14/2007,5/23/2007,11/25/2008 ">
> <!--- NB: Avoid the usual space after comma. Otherwise cannot cast string
> list-element to boolean.
> Actionscript doesn't have trim function to help you here --->
> <cfset choices = "true,false,true,true,false">
> <cfform name="myDatePicker" format="flash">
> <cfgrid name="dateChoice" height = "120" onchange="setMonthAndChoice();">
> <cfgridcolumn name="dt" header="Date">
> <cfgridcolumn name="ch" header="Choice">
>
> <cfloop index="i" from="1" to="#ListLen(dates)#">
> <cfgridrow data ="#ListGetAt(dates, i)#,#ListGetAt(choices, i)#">
> </cfloop>
> </cfgrid><br /><br />
> <cfformitem type="script">
> function setMonthAndChoice(){
> var isTicked = true;
> // equivalent to a cast from string to boolean
> if(dateChoice.selectedItem.ch != 'true')isTicked=false;
>
> // check or uncheck checkbox
> choice.selected = isTicked;
> // get month number out of date
>
> mnth.setSelectedIndex(parseInt(dateChoice.selected Item.dt.split('/')[0])-1);
> }
> </cfformitem>
> <cfinput name="date" type="text" label="Date"
> bind="{dateChoice.selectedItem.dt}" />
> <cfinput name="choice" type="checkbox" label="Yes or no?"/>
> <cfselect name="mnth" label="Month">
> <option value="1">January</option>
> <option value="2">February</option>
> <option value="3">March</option>
> <option value="4">April</option>
> <option value="5">May</option>
> <option value="6">June</option>
> <option value="7">July</option>
> <option value="8">August</option>
> <option value="9">September</option>
> <option value="10">October</option>
> <option value="11">November</option>
> <option value="12">December</option>
> </cfselect>
> </cfform>
>
>
>



Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 10:03 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk