RE: Two selects query
Thanks guys - as always answer is so obvious you don't see it :-) ++ Kevin Parker m: 0418 815 527 ++ http://au.linkedin.com/in/krparker -Original Message- From: Ketan Jetty [mailto:kje...@yahoo.com] Sent: Monday, 13 September 2010 23:54 To: cf-talk Subject: Re: Two selects query also try using the option tag as option value = selectedPlease select an option/option Ketan Jetty ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336993 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Two selects query
Appreciate a little guidance here please -I've created a two selects modelled on the example at... http://www.forta.com/blog/index.cfm/2007/5/31/ColdFusion-Ajax-Tutorial-2-Rel ated-Selects but I can't figure out how to make the first drop down appear with nothing selected rather than the first row in the table. Any tips please! ++ Kevin Parker m: 0418 815 527 ++ ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336969 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Two selects query
did you set the message attribute for the cfselect. cfselect ... message=Please Select... Ketan Jetty ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336974 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Two selects query
also try using the option tag as option value = selectedPlease select an option/option Ketan Jetty ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336976 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Javascript two selects....how to force the first select FIRST
Yeah, this is Will quetion day. heehee I'll try to make this short and to the point. I have two selects, available sizes and available colors. I'm submitting the form via onchange in the second select- colors. My question is: How can I FORCE them to select the first one before selecting the second that submits it? Thanks, Will InvalidTag language=JavaScript !-- function submitForm() { document.form1.submit(); } //-- /script form action=buy.cfm method=post name=form1 target=loadcontent pspan style=color: #FFSelect a size:/span select name=prodsize option value= selectedSELECT ONE/option cfoutput query=getavsizes group=sizename option value=#getavsizes.sizename##getavsizes.sizename#/option /cfoutput /select br / span style=color: #FFSelect a color:/span select name=prodcolor OnChange=submitForm() option value= selectedSELECT ONE/option cfoutput query=getavcolors option value=#getavcolors.colorname##getavcolors.colorname#/option /cfoutput /select input name=prodcategory type=hidden value=cfoutput#Left(getprodsbymodel.prodcategory, 3)#/cfoutput / input name=prodmodel type=hidden value=cfoutput#getprodsbymodel.prodmodelcode#/cfoutput / /p /form ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190361 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Javascript two selects....how to force the first select FIRST
Do a check on the selected index of the first select in your submitForm() function. function submitForm() { if ( document.form1.prodsize[document.form1.prodsize.selectedIndex].value != 0 ) document.form1.submit(); else alert(Would ya pick a size already!); } Or something like that :O) Ade -Original Message- From: Will Tomlinson [mailto:[EMAIL PROTECTED] Sent: 14 January 2005 01:07 To: CF-Talk Subject: Javascript two selectshow to force the first select FIRST Yeah, this is Will quetion day. heehee I'll try to make this short and to the point. I have two selects, available sizes and available colors. I'm submitting the form via onchange in the second select- colors. My question is: How can I FORCE them to select the first one before selecting the second that submits it? Thanks, Will InvalidTag language=JavaScript !-- function submitForm() { document.form1.submit(); } //-- /script form action=buy.cfm method=post name=form1 target=loadcontent pspan style=color: #FFSelect a size:/span select name=prodsize option value= selectedSELECT ONE/option cfoutput query=getavsizes group=sizename option value=#getavsizes.sizename##getavsizes.sizename#/option /cfoutput /select br / span style=color: #FFSelect a color:/span select name=prodcolor OnChange=submitForm() option value= selectedSELECT ONE/option cfoutput query=getavcolors option value=#getavcolors.colorname##getavcolors.colorname#/option /cfoutput /select input name=prodcategory type=hidden value=cfoutput#Left(getprodsbymodel.prodcategory, 3)#/cfoutput / input name=prodmodel type=hidden value=cfoutput#getprodsbymodel.prodmodelcode#/cfoutput / /p /form ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190364 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Javascript two selects....how to force the first select FIRST
Aghhh, more typos, check against not 0 :OS Bed time :O) Ade -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED] Sent: 14 January 2005 02:16 To: CF-Talk Subject: RE: Javascript two selectshow to force the first select FIRST Do a check on the selected index of the first select in your submitForm() function. function submitForm() { if ( document.form1.prodsize[document.form1.prodsize.selectedIndex].value != 0 ) document.form1.submit(); else alert(Would ya pick a size already!); } Or something like that :O) Ade -Original Message- From: Will Tomlinson [mailto:[EMAIL PROTECTED] Sent: 14 January 2005 01:07 To: CF-Talk Subject: Javascript two selectshow to force the first select FIRST Yeah, this is Will quetion day. heehee I'll try to make this short and to the point. I have two selects, available sizes and available colors. I'm submitting the form via onchange in the second select- colors. My question is: How can I FORCE them to select the first one before selecting the second that submits it? Thanks, Will InvalidTag language=JavaScript !-- function submitForm() { document.form1.submit(); } //-- /script form action=buy.cfm method=post name=form1 target=loadcontent pspan style=color: #FFSelect a size:/span select name=prodsize option value= selectedSELECT ONE/option cfoutput query=getavsizes group=sizename option value=#getavsizes.sizename##getavsizes.sizename#/option /cfoutput /select br / span style=color: #FFSelect a color:/span select name=prodcolor OnChange=submitForm() option value= selectedSELECT ONE/option cfoutput query=getavcolors option value=#getavcolors.colorname##getavcolors.colorname#/option /cfoutput /select input name=prodcategory type=hidden value=cfoutput#Left(getprodsbymodel.prodcategory, 3)#/cfoutput / input name=prodmodel type=hidden value=cfoutput#getprodsbymodel.prodmodelcode#/cfoutput / /p /form ~| Get help! RoboHelp http://www.houseoffusion.com/banners/view.cfm?bannerid=58 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190366 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Javascript two selects....how to force the first select FIRST
Adrian, This is REAL close, I appreciate the help. It works and improves what I have, but could be better. Here's what happens. Some goofball selects the second select first, ALERT - please select a size. Now you select the size - it doesn't submit because of course, there's no onchange on that one. So now you have to select the color again and change it to SUBMIT the form. Here's what I have so far. Thanks! Will InvalidTag language=JavaScript !-- function submitForm() { if ( document.form1.prodsize[document.form1.prodsize.selectedIndex].value != 0 ) document.form1.submit(); else alert(Please select a size); } //-- /script ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190369 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Javascript two selects....how to force the first select FIRST
A, good point. Hows about this... function submitForm() { var firstValue = document.form1.prodsize[document.form1.prodsize.selectedIndex].value; var secondValue = document.form1.prodcolor[document.form1.prodcolor.selectedIndex].value; if ( firstValue == secondValue != ) alert(Please select a size); else if ( firstValue != secondValue != ) document.form1.submit(); } Call submitForm() in both select's onchange(). Ade -Original Message- From: Will Tomlinson [mailto:[EMAIL PROTECTED] Sent: 14 January 2005 01:27 To: CF-Talk Subject: Re: Javascript two selectshow to force the first select FIRST Adrian, This is REAL close, I appreciate the help. It works and improves what I have, but could be better. Here's what happens. Some goofball selects the second select first, ALERT - please select a size. Now you select the size - it doesn't submit because of course, there's no onchange on that one. So now you have to select the color again and change it to SUBMIT the form. Here's what I have so far. Thanks! Will InvalidTag language=JavaScript !-- function submitForm() { if ( document.form1.prodsize[document.form1.prodsize.selectedIndex].value != 0 ) document.form1.submit(); else alert(Please select a size); } //-- /script ~| Now there’s a better way to fax. eFax makes it possible to use your existing email account to send and receive faxes. Try eFax free. http://www.houseoffusion.com/banners/view.cfm?bannerid=63 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190375 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Javascript two selects....how to force the first select FIRST
SWEET GEORGIA BROWN!!! Works like a friggin champ! I appreciate it Adrian, now you need to go to bed!! :) Will ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190377 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Two Selects
I will upload the 4 selects tag that I have used but I am really interested in looking into qForms, didn't realise that there are so many different approaches to this problem. Andy McShane Head of Development Scout7 Ltd, 324a Lichfield Road, Mere Green, Sutton Coldfield West Midlands United Kingdom B74 2UW Telephone: +44 (0)121 323 2640 Mobile : 07866 430783 Fax: +44 (0)121 323 2010 Email: mailto:[EMAIL PROTECTED] Website: www.scout7.com -Original Message- From: Aaron Rouse [mailto:[EMAIL PROTECTED] Sent: 23 December 2004 20:51 To: CF-Talk Subject: Re: Two Selects qForms is what I have used for this as well. I like being able to control the layout of my form more so than what could be done with the two or three selects tags. I put up some examples a long time ago doing n-selects with qForms, actually before pengoworks had any up. Maybe I should go through mine and make sure they are done correctly :) On Thu, 23 Dec 2004 12:59:16 -0500, Chris Stoner [EMAIL PROTECTED] wrote: You also might want to look at the qForms implementation of this concept. Its pretty easilly implemented. http://www.pengoworks.com/qforms/docs/examples/n-related_selectboxes.htm Tim Laureska wrote: Andy... I'd sure be interested Tim -Original Message- From: Andy Mcshane [mailto:[EMAIL PROTECTED] Sent: Thursday, December 23, 2004 12:24 PM To: CF-Talk Subject: RE: Two Selects Slightly OT but I managed to alter the 3 selects and create a 4 selects related tag if that is of any help to anyone? It was a nightmare to do and I can't actually remember how I did it but it works great, I had to alter it to enable a user to select a region, country, division club, I am sure it could be useful for other things with a few more changes? ~| Special thanks to the CF Community Suite Silver Sponsor - RUWebby http://www.ruwebby.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188748 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Two Selects
Does the two selects related tag not work in CFMX? Dropdown one has the correct info but when I select an item nothing happens in select two. form action=index.cfm?t=results method=post name=FormX cfquery datasource=#App_DataSource# name=QryGetCityStates username=#App_DataBaseUser# password=#App_DataBasePass# SELECT DISTINCT STATE, City FROM TblMain WHERE State '' ORDER BY State /cfquery CF_TwoSelectsRelated QUERY=QryGetCityStates NAME1=form.STATE NAME2=form.City DISPLAY1=STATE DISPLAY2=City VALUE1=STATE VALUE2=City FORCEWIDTH1=70 FORCEWIDTH2=70 AUTOSELECTFIRST=No HTMLBETWEEN=BR FORMNAME=FormX .. /form Nothing has been changed in the TwoSelectsRelated.cfm file. Rick Eidson Partner CTO ArcRiver Technology, LLC http://www.arcriver.com/ Local Kansas City Music http://www.kcjukebox.com/ -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.298 / Virus Database: 265.6.4 - Release Date: 12/22/2004 ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188668 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Two Selects
Correction to code below... CF_TwoSelectsRelated QUERY=QryGetCityStates NAME1=SearchSTATE NAME2=SearchCity DISPLAY1=STATE DISPLAY2=City VALUE1=STATE VALUE2=City FORCEWIDTH1=70 FORCEWIDTH2=70 AUTOSELECTFIRST=No HTMLBETWEEN=BR FORMNAME=FormX Thanks! Rick Eidson Partner CTO ArcRiver Technology, LLC http://www.arcriver.com/ Local Kansas City Music http://www.kcjukebox.com/ -Original Message- From: Rick [mailto:[EMAIL PROTECTED] Sent: Thursday, December 23, 2004 9:57 AM To: CF-Talk Subject: Two Selects Does the two selects related tag not work in CFMX? Dropdown one has the correct info but when I select an item nothing happens in select two. form action=index.cfm?t=results method=post name=FormX cfquery datasource=#App_DataSource# name=QryGetCityStates username=#App_DataBaseUser# password=#App_DataBasePass# SELECT DISTINCT STATE, City FROM TblMain WHERE State '' ORDER BY State /cfquery CF_TwoSelectsRelated QUERY=QryGetCityStates NAME1=form.STATE NAME2=form.City DISPLAY1=STATE DISPLAY2=City VALUE1=STATE VALUE2=City FORCEWIDTH1=70 FORCEWIDTH2=70 AUTOSELECTFIRST=No HTMLBETWEEN=BR FORMNAME=FormX .. /form Nothing has been changed in the TwoSelectsRelated.cfm file. Rick Eidson Partner CTO ArcRiver Technology, LLC http://www.arcriver.com/ Local Kansas City Music http://www.kcjukebox.com/ -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.298 / Virus Database: 265.6.4 - Release Date: 12/22/2004 ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188669 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Two Selects
Rick where did you get this tag? I am interested in using for a couple of projects...never knew it existed. Ray At 10:57 AM 12/23/2004, you wrote: Does the two selects related tag not work in CFMX? Dropdown one has the correct info but when I select an item nothing happens in select two. form action=index.cfm?t=results method=post name=FormX cfquery datasource=#App_DataSource# name=QryGetCityStates username=#App_DataBaseUser# password=#App_DataBasePass# SELECT DISTINCT STATE, City FROM TblMain WHERE State '' ORDER BY State /cfquery CF_TwoSelectsRelated QUERY=QryGetCityStates NAME1=form.STATE NAME2=form.City DISPLAY1=STATE DISPLAY2=City VALUE1=STATE VALUE2=City FORCEWIDTH1=70 FORCEWIDTH2=70 AUTOSELECTFIRST=No HTMLBETWEEN=BR FORMNAME=FormX .. /form Nothing has been changed in the TwoSelectsRelated.cfm file. Rick Eidson Partner CTO ArcRiver Technology, LLC http://www.arcriver.com/ Local Kansas City Music http://www.kcjukebox.com/ -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.298 / Virus Database: 265.6.4 - Release Date: 12/22/2004 ~| Special thanks to the CF Community Suite Silver Sponsor - RUWebby http://www.ruwebby.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188670 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Two Selects
It's in the Cold Fusion Exchange at Macromedia, there is also a 3 selects related tag. Rick -Original Message- From: Ray Champagne [mailto:[EMAIL PROTECTED] Sent: Thursday, December 23, 2004 10:05 AM To: CF-Talk Subject: Re: Two Selects Rick where did you get this tag? I am interested in using for a couple of projects...never knew it existed. Ray At 10:57 AM 12/23/2004, you wrote: Does the two selects related tag not work in CFMX? Dropdown one has the correct info but when I select an item nothing happens in select two. form action=index.cfm?t=results method=post name=FormX cfquery datasource=#App_DataSource# name=QryGetCityStates username=#App_DataBaseUser# password=#App_DataBasePass# SELECT DISTINCT STATE, City FROM TblMain WHERE State '' ORDER BY State /cfquery CF_TwoSelectsRelated QUERY=QryGetCityStates NAME1=form.STATE NAME2=form.City DISPLAY1=STATE DISPLAY2=City VALUE1=STATE VALUE2=City FORCEWIDTH1=70 FORCEWIDTH2=70 AUTOSELECTFIRST=No HTMLBETWEEN=BR FORMNAME=FormX .. /form Nothing has been changed in the TwoSelectsRelated.cfm file. Rick Eidson Partner CTO ArcRiver Technology, LLC http://www.arcriver.com/ Local Kansas City Music http://www.kcjukebox.com/ -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.298 / Virus Database: 265.6.4 - Release Date: 12/22/2004 ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188671 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Two Selects
CF_TwoSelectsRelated tag should work on CFMX no problem. You should enable JavaScript debugging and see if you get any js errors on the page. Marius Milosav www.scorpiosoft.com It's not about Technology, it's about people Virtual Company (VICO) Application demo www.scorpiosoft.com/vicodemo/login.cfm - Original Message - From: Rick [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Thursday, December 23, 2004 11:00 AM Subject: RE: Two Selects Correction to code below... CF_TwoSelectsRelated QUERY=QryGetCityStates NAME1=SearchSTATE NAME2=SearchCity DISPLAY1=STATE DISPLAY2=City VALUE1=STATE VALUE2=City FORCEWIDTH1=70 FORCEWIDTH2=70 AUTOSELECTFIRST=No HTMLBETWEEN=BR FORMNAME=FormX Thanks! Rick Eidson Partner CTO ArcRiver Technology, LLC http://www.arcriver.com/ Local Kansas City Music http://www.kcjukebox.com/ -Original Message- From: Rick [mailto:[EMAIL PROTECTED] Sent: Thursday, December 23, 2004 9:57 AM To: CF-Talk Subject: Two Selects Does the two selects related tag not work in CFMX? Dropdown one has the correct info but when I select an item nothing happens in select two. form action=index.cfm?t=results method=post name=FormX cfquery datasource=#App_DataSource# name=QryGetCityStates username=#App_DataBaseUser# password=#App_DataBasePass# SELECT DISTINCT STATE, City FROM TblMain WHERE State '' ORDER BY State /cfquery CF_TwoSelectsRelated QUERY=QryGetCityStates NAME1=form.STATE NAME2=form.City DISPLAY1=STATE DISPLAY2=City VALUE1=STATE VALUE2=City FORCEWIDTH1=70 FORCEWIDTH2=70 AUTOSELECTFIRST=No HTMLBETWEEN=BR FORMNAME=FormX .. /form Nothing has been changed in the TwoSelectsRelated.cfm file. Rick Eidson Partner CTO ArcRiver Technology, LLC http://www.arcriver.com/ Local Kansas City Music http://www.kcjukebox.com/ -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.298 / Virus Database: 265.6.4 - Release Date: 12/22/2004 ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188672 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Two Selects
Sweet. thx! Ray At 11:07 AM 12/23/2004, you wrote: It's in the Cold Fusion Exchange at Macromedia, there is also a 3 selects related tag. Rick -Original Message- From: Ray Champagne [mailto:[EMAIL PROTECTED] Sent: Thursday, December 23, 2004 10:05 AM To: CF-Talk Subject: Re: Two Selects Rick where did you get this tag? I am interested in using for a couple of projects...never knew it existed. Ray At 10:57 AM 12/23/2004, you wrote: Does the two selects related tag not work in CFMX? Dropdown one has the correct info but when I select an item nothing happens in select two. form action=index.cfm?t=results method=post name=FormX cfquery datasource=#App_DataSource# name=QryGetCityStates username=#App_DataBaseUser# password=#App_DataBasePass# SELECT DISTINCT STATE, City FROM TblMain WHERE State '' ORDER BY State /cfquery CF_TwoSelectsRelated QUERY=QryGetCityStates NAME1=form.STATE NAME2=form.City DISPLAY1=STATE DISPLAY2=City VALUE1=STATE VALUE2=City FORCEWIDTH1=70 FORCEWIDTH2=70 AUTOSELECTFIRST=No HTMLBETWEEN=BR FORMNAME=FormX .. /form Nothing has been changed in the TwoSelectsRelated.cfm file. Rick Eidson Partner CTO ArcRiver Technology, LLC http://www.arcriver.com/ Local Kansas City Music http://www.kcjukebox.com/ -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.298 / Virus Database: 265.6.4 - Release Date: 12/22/2004 ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188673 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Two Selects
Error: missing ; before statement Source File: http://burrows.arcriver.com/i/index.cfm Line: 179, Column: 211 Source Code: NewOpt[86] = new Option(Oak Park);NewOpt[86].value = 'Oak Park'; NewOpt[87] = new Option(Oakbrook Terrace);NewOpt[87].value = 'Oakbrook Terrace'; NewOpt[88] = new Option(O'Fallon); NewOpt[88].value = 'O'Fallon'; NewOpt[89] = new Option(Orland Par Well this looks like that maybe the ' in the city o'Fallon could be the issue. Rick -Original Message- From: Marius Milosav [mailto:[EMAIL PROTECTED] Sent: Thursday, December 23, 2004 10:10 AM To: CF-Talk Subject: Re: Two Selects CF_TwoSelectsRelated tag should work on CFMX no problem. You should enable JavaScript debugging and see if you get any js errors on the page. Marius Milosav www.scorpiosoft.com It's not about Technology, it's about people Virtual Company (VICO) Application demo www.scorpiosoft.com/vicodemo/login.cfm - Original Message - From: Rick [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Thursday, December 23, 2004 11:00 AM Subject: RE: Two Selects Correction to code below... CF_TwoSelectsRelated QUERY=QryGetCityStates NAME1=SearchSTATE NAME2=SearchCity DISPLAY1=STATE DISPLAY2=City VALUE1=STATE VALUE2=City FORCEWIDTH1=70 FORCEWIDTH2=70 AUTOSELECTFIRST=No HTMLBETWEEN=BR FORMNAME=FormX Thanks! Rick Eidson Partner CTO ArcRiver Technology, LLC http://www.arcriver.com/ Local Kansas City Music http://www.kcjukebox.com/ -Original Message- From: Rick [mailto:[EMAIL PROTECTED] Sent: Thursday, December 23, 2004 9:57 AM To: CF-Talk Subject: Two Selects Does the two selects related tag not work in CFMX? Dropdown one has the correct info but when I select an item nothing happens in select two. form action=index.cfm?t=results method=post name=FormX cfquery datasource=#App_DataSource# name=QryGetCityStates username=#App_DataBaseUser# password=#App_DataBasePass# SELECT DISTINCT STATE, City FROM TblMain WHERE State '' ORDER BY State /cfquery CF_TwoSelectsRelated QUERY=QryGetCityStates NAME1=form.STATE NAME2=form.City DISPLAY1=STATE DISPLAY2=City VALUE1=STATE VALUE2=City FORCEWIDTH1=70 FORCEWIDTH2=70 AUTOSELECTFIRST=No HTMLBETWEEN=BR FORMNAME=FormX .. /form Nothing has been changed in the TwoSelectsRelated.cfm file. Rick Eidson Partner CTO ArcRiver Technology, LLC http://www.arcriver.com/ Local Kansas City Music http://www.kcjukebox.com/ -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.298 / Virus Database: 265.6.4 - Release Date: 12/22/2004 ~| Special thanks to the CF Community Suite Silver Sponsor - New Atlanta http://www.newatlanta.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188674 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Two Selects
In the TwoSelectsRelated.cfm file on about line 100 I changed the ' to NewOpt[#Counter2#].value = '#Evaluate(Attributes.Value2)#'; To NewOpt[#Counter2#].value = #Evaluate(Attributes.Value2)#; Does anyone see any reason why I shouldn't? Rick -Original Message- From: Rick [mailto:[EMAIL PROTECTED] Sent: Thursday, December 23, 2004 10:18 AM To: CF-Talk Subject: RE: Two Selects Error: missing ; before statement Source File: http://burrows.arcriver.com/i/index.cfm Line: 179, Column: 211 Source Code: NewOpt[86] = new Option(Oak Park);NewOpt[86].value = 'Oak Park'; NewOpt[87] = new Option(Oakbrook Terrace);NewOpt[87].value = 'Oakbrook Terrace'; NewOpt[88] = new Option(O'Fallon); NewOpt[88].value = 'O'Fallon'; NewOpt[89] = new Option(Orland Par Well this looks like that maybe the ' in the city o'Fallon could be the issue. Rick -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.298 / Virus Database: 265.6.4 - Release Date: 12/22/2004 ~| Special thanks to the CF Community Suite Silver Sponsor - New Atlanta http://www.newatlanta.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188675 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Two Selects
use JSStringFormat and not evaluate Marius Milosav www.scorpiosoft.com It's not about Technology, it's about people Virtual Company (VICO) Application demo www.scorpiosoft.com/vicodemo/login.cfm - Original Message - From: Rick [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Thursday, December 23, 2004 11:23 AM Subject: RE: Two Selects In the TwoSelectsRelated.cfm file on about line 100 I changed the ' to NewOpt[#Counter2#].value = '#Evaluate(Attributes.Value2)#'; To NewOpt[#Counter2#].value = #Evaluate(Attributes.Value2)#; Does anyone see any reason why I shouldn't? Rick -Original Message- From: Rick [mailto:[EMAIL PROTECTED] Sent: Thursday, December 23, 2004 10:18 AM To: CF-Talk Subject: RE: Two Selects Error: missing ; before statement Source File: http://burrows.arcriver.com/i/index.cfm Line: 179, Column: 211 Source Code: NewOpt[86] = new Option(Oak Park); NewOpt[86].value = 'Oak Park'; NewOpt[87] = new Option(Oakbrook Terrace); NewOpt[87].value = 'Oakbrook Terrace'; NewOpt[88] = new Option(O'Fallon); NewOpt[88].value = 'O'Fallon'; NewOpt[89] = new Option(Orland Par Well this looks like that maybe the ' in the city o'Fallon could be the issue. Rick -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.298 / Virus Database: 265.6.4 - Release Date: 12/22/2004 ~| Special thanks to the CF Community Suite Silver Sponsor - RUWebby http://www.ruwebby.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188676 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Two Selects
Slightly OT but I managed to alter the 3 selects and create a 4 selects related tag if that is of any help to anyone? It was a nightmare to do and I can't actually remember how I did it but it works great, I had to alter it to enable a user to select a region, country, division club, I am sure it could be useful for other things with a few more changes? ~| Special thanks to the CF Community Suite Silver Sponsor - New Atlanta http://www.newatlanta.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188680 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Two Selects
I don't have a need for it now but I did a while back. Can't you upload it to the Exchange? Rick -Original Message- From: Andy Mcshane [mailto:[EMAIL PROTECTED] Sent: Thursday, December 23, 2004 11:24 AM To: CF-Talk Subject: RE: Two Selects Slightly OT but I managed to alter the 3 selects and create a 4 selects related tag if that is of any help to anyone? It was a nightmare to do and I can't actually remember how I did it but it works great, I had to alter it to enable a user to select a region, country, division club, I am sure it could be useful for other things with a few more changes? ~| Special thanks to the CF Community Suite Silver Sponsor - New Atlanta http://www.newatlanta.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188681 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Two Selects
Andy... I'd sure be interested Tim -Original Message- From: Andy Mcshane [mailto:[EMAIL PROTECTED] Sent: Thursday, December 23, 2004 12:24 PM To: CF-Talk Subject: RE: Two Selects Slightly OT but I managed to alter the 3 selects and create a 4 selects related tag if that is of any help to anyone? It was a nightmare to do and I can't actually remember how I did it but it works great, I had to alter it to enable a user to select a region, country, division club, I am sure it could be useful for other things with a few more changes? ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188682 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Two Selects
You also might want to look at the qForms implementation of this concept. Its pretty easilly implemented. http://www.pengoworks.com/qforms/docs/examples/n-related_selectboxes.htm Tim Laureska wrote: Andy... I'd sure be interested Tim -Original Message- From: Andy Mcshane [mailto:[EMAIL PROTECTED] Sent: Thursday, December 23, 2004 12:24 PM To: CF-Talk Subject: RE: Two Selects Slightly OT but I managed to alter the 3 selects and create a 4 selects related tag if that is of any help to anyone? It was a nightmare to do and I can't actually remember how I did it but it works great, I had to alter it to enable a user to select a region, country, division club, I am sure it could be useful for other things with a few more changes? ~| Special thanks to the CF Community Suite Silver Sponsor - New Atlanta http://www.newatlanta.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188683 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Two Selects
Ray, I have had better luck FWIW with the QForms JSAPI and their n-related select boxes. They work with any browser and are rock solid. http://www.pengoworks.com/qforms/docs/examples/n-related_selectboxes.htm No problems with 2 and 3 selects related though I tried once to get a 5 selects related going and couldn't make it work :)! Rick Mason On Thu, 23 Dec 2004 11:05:15 -0500, Ray Champagne [EMAIL PROTECTED] wrote: Rick where did you get this tag? I am interested in using for a couple of projects...never knew it existed. Ray At 10:57 AM 12/23/2004, you wrote: Does the two selects related tag not work in CFMX? Dropdown one has the correct info but when I select an item nothing happens in select two. form action=index.cfm?t=results method=post name=FormX cfquery datasource=#App_DataSource# name=QryGetCityStates username=#App_DataBaseUser# password=#App_DataBasePass# SELECT DISTINCT STATE, City FROM TblMain WHERE State '' ORDER BY State /cfquery CF_TwoSelectsRelated QUERY=QryGetCityStates NAME1=form.STATE NAME2=form.City DISPLAY1=STATE DISPLAY2=City VALUE1=STATE VALUE2=City FORCEWIDTH1=70 FORCEWIDTH2=70 AUTOSELECTFIRST=No HTMLBETWEEN=BR FORMNAME=FormX .. /form Nothing has been changed in the TwoSelectsRelated.cfm file. Rick Eidson Partner CTO ArcRiver Technology, LLC http://www.arcriver.com/ Local Kansas City Music http://www.kcjukebox.com/ -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.298 / Virus Database: 265.6.4 - Release Date: 12/22/2004 ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188684 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Two Selects
I will do just that, thank for the advice! Ray At 01:07 PM 12/23/2004, you wrote: Ray, I have had better luck FWIW with the QForms JSAPI and their n-related select boxes. They work with any browser and are rock solid. http://www.pengoworks.com/qforms/docs/examples/n-related_selectboxes.htm No problems with 2 and 3 selects related though I tried once to get a 5 selects related going and couldn't make it work :)! Rick Mason On Thu, 23 Dec 2004 11:05:15 -0500, Ray Champagne [EMAIL PROTECTED] wrote: Rick where did you get this tag? I am interested in using for a couple of projects...never knew it existed. Ray At 10:57 AM 12/23/2004, you wrote: Does the two selects related tag not work in CFMX? Dropdown one has the correct info but when I select an item nothing happens in select two. form action=index.cfm?t=results method=post name=FormX cfquery datasource=#App_DataSource# name=QryGetCityStates username=#App_DataBaseUser# password=#App_DataBasePass# SELECT DISTINCT STATE, City FROM TblMain WHERE State '' ORDER BY State /cfquery CF_TwoSelectsRelated QUERY=QryGetCityStates NAME1=form.STATE NAME2=form.City DISPLAY1=STATE DISPLAY2=City VALUE1=STATE VALUE2=City FORCEWIDTH1=70 FORCEWIDTH2=70 AUTOSELECTFIRST=No HTMLBETWEEN=BR FORMNAME=FormX .. /form Nothing has been changed in the TwoSelectsRelated.cfm file. Rick Eidson Partner CTO ArcRiver Technology, LLC http://www.arcriver.com/ Local Kansas City Music http://www.kcjukebox.com/ -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.298 / Virus Database: 265.6.4 - Release Date: 12/22/2004 ~| Special thanks to the CF Community Suite Silver Sponsor - RUWebby http://www.ruwebby.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188685 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Two Selects
I've always used this one; it has an example going 6 deep, and I don't think there is a limit... http://www.mattkruse.com/javascript/dynamicoptionlist/ -Original Message- From: Andy Mcshane [mailto:[EMAIL PROTECTED] Sent: Thursday, December 23, 2004 10:24 AM To: CF-Talk Subject: RE: Two Selects Slightly OT but I managed to alter the 3 selects and create a 4 selects related tag if that is of any help to anyone? It was a nightmare to do and I can't actually remember how I did it but it works great, I had to alter it to enable a user to select a region, country, division club, I am sure it could be useful for other things with a few more changes? ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188687 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Two Selects
Rick, Be sure you escape or remove any single or double quotes or any JavaScript unfriendly characters from the data before feeding the tag. Best Regards, Dennis Powers UXB Internet- A Website Design and Hosting Company 690 Wolcott Road - P.O. Box 6028 Wolcott, CT 06716tel: (203)879-2844 http://www.uxbinternet.com http://dennis.uxb.net -Original Message- From: Rick [mailto:[EMAIL PROTECTED] Sent: Thursday, December 23, 2004 10:57 AM To: CF-Talk Subject: Two Selects Does the two selects related tag not work in CFMX? Dropdown one has the correct info but when I select an item nothing happens in select two. form action=index.cfm?t=results method=post name=FormX cfquery datasource=#App_DataSource# name=QryGetCityStates username=#App_DataBaseUser# password=#App_DataBasePass# SELECT DISTINCT STATE, City FROM TblMain WHERE State '' ORDER BY State /cfquery CF_TwoSelectsRelated QUERY=QryGetCityStates NAME1=form.STATE NAME2=form.City DISPLAY1=STATE DISPLAY2=City VALUE1=STATE VALUE2=City FORCEWIDTH1=70 FORCEWIDTH2=70 AUTOSELECTFIRST=No HTMLBETWEEN=BR FORMNAME=FormX .. /form Nothing has been changed in the TwoSelectsRelated.cfm file. Rick Eidson Partner CTO ArcRiver Technology, LLC http://www.arcriver.com/ Local Kansas City Music http://www.kcjukebox.com/ -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.298 / Virus Database: 265.6.4 - Release Date: 12/22/2004 ~| Special thanks to the CF Community Suite Silver Sponsor - New Atlanta http://www.newatlanta.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188695 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Two Selects
qForms is what I have used for this as well. I like being able to control the layout of my form more so than what could be done with the two or three selects tags. I put up some examples a long time ago doing n-selects with qForms, actually before pengoworks had any up. Maybe I should go through mine and make sure they are done correctly :) On Thu, 23 Dec 2004 12:59:16 -0500, Chris Stoner [EMAIL PROTECTED] wrote: You also might want to look at the qForms implementation of this concept. Its pretty easilly implemented. http://www.pengoworks.com/qforms/docs/examples/n-related_selectboxes.htm Tim Laureska wrote: Andy... I'd sure be interested Tim -Original Message- From: Andy Mcshane [mailto:[EMAIL PROTECTED] Sent: Thursday, December 23, 2004 12:24 PM To: CF-Talk Subject: RE: Two Selects Slightly OT but I managed to alter the 3 selects and create a 4 selects related tag if that is of any help to anyone? It was a nightmare to do and I can't actually remember how I did it but it works great, I had to alter it to enable a user to select a region, country, division club, I am sure it could be useful for other things with a few more changes? ~| Special thanks to the CF Community Suite Silver Sponsor - New Atlanta http://www.newatlanta.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188699 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: Two Selects
As cool as that tag is It seems there may be other solutions, here's one example I whipped up some time ago... [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Two Selects
Blech, it ate my code! Let's try that this way: [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Two Selects
Your probably posting with a dividing line of -, _, ~ or the like of 50 characters long or more. Try without the line and it'll work. Your running into the code I use to remove the footer from all posts. Blech, it ate my code! Let's try that this way: [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Two Selects
Ahh, that makes sense, here it is: !--- This has been tested on IE 6, NS 7, Mozilla 1.4, Opera 7 and should work on any browser that supports _javascript_ 1.4 or higher. --- !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd html head meta http-equiv=Content-Type content=text/html; charset=utf-8 title_javascript_: Related Selects/title cfoutput !--- The following lines are creating a simulated query to demonstrate the related selects functionality --- cfscript GetChild = QueryNew(ParentID,ChildID,Child); QueryAddRow(GetChild); QuerySetCell(GetChild,ParentID,1); QuerySetCell(GetChild,ChildID,1); QuerySetCell(GetChild,Child,Shrimp); QueryAddRow(GetChild); QuerySetCell(GetChild,ParentID,1); QuerySetCell(GetChild,ChildID,2); QuerySetCell(GetChild,Child,Lobster); QueryAddRow(GetChild); QuerySetCell(GetChild,ParentID,2); QuerySetCell(GetChild,ChildID,3); QuerySetCell(GetChild,Child,Ribeye); QueryAddRow(GetChild); QuerySetCell(GetChild,ParentID,2); QuerySetCell(GetChild,ChildID,4); QuerySetCell(GetChild,Child,Sirloin); GetParent = QueryNew(ParentID,Parent); QueryAddRow(GetParent); QuerySetCell(GetParent,ParentID,1); QuerySetCell(GetParent,Parent,Surf); QueryAddRow(GetParent); QuerySetCell(GetParent,ParentID,2); QuerySetCell(GetParent,Parent,Turf); /cfscript script language=_javascript_ !--- Create an Array to hold the values for the dependent select control --- var ChildArray = new Array; cfloop query=GetChild !--- For each element of the array, create an object that will hold the value, display and parent value for each option in the dependent selection control --- ChildArray[ChildArray.length] = {childID: #Val(GetChild.ChildID)#, Child: #GetChild.Child#, parentID: #GetChild.ParentID#}; !--- Because a _javascript_ array is a zero index array, the length of the array works as the next incrementally created Array element --- !--- A _javascript_ object can be considered similar to a ColdFusion structure. In this case we've declared and set three properties for the individual object held in each element of the array --- !--- The object syntax is also more readable than array syntax --- /cfloop function setSelect () { // It can be more reader friendly in the actual function to fully create shorter references for objects as much as possible var objForm = document.myForm; var objParentID = objForm.cboParentID; var objChildID = objForm.cboChildID; objChildID.options.length = 0; // This erases the entire contents of the dependent select control objChildID.options[0] = new Option(- Select One - ,, false, false); // This will set the initial option, the trailing false statements determine if it is a selected option. for (i = 0; i ChildArray.length; i++) { // Loop through our array of objects if (ChildArray[i].parentID == objParentID.value || objParentID.value == '') // We want to check to see if current value of the array matches the selected value of the calling select control // We also are checking to see if the selected value of the calling select control is the first selection // In either case, we'll write a new option to our dependent select option // If there is no match then we'll skip that row objChildID.options[objChildID.options.length] = new Option(ChildArray[i].Child,ChildArray[i].childID,false,false); } } /script /head body form name=myForm Parent: select name=cboParentID > option value= -- Select One -- /option cfloop query=GetParent option value=#GetParent.ParentID##GetParent.Parent#/option /cfloop /selectbr Child: select name=cboChildID option value= -- Select One -- /option cfloop query=GetChild option value=#GetChild.ChildID##GetChild.Child#/option /cfloop /selectbr /form /body /cfoutput /html - Original Message - From: Michael Dinowitz To: CF-Talk Sent: Wednesday, December 31, 2003 8:12 AM Subject: Re: Two Selects Your probably posting with a dividing line of -, _, ~ or the like of 50 characters long or more. Try without the line and it'll work. Your running into the code I use to remove the footer from all posts. Blech, it ate my code! Let's try that this way: [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re[2]: Two Selects
You might also want to check out a tutorial I wrote for easycfm.com It deals with homegrown multiple selects related that can be used multiple times within a form. The article can be found at http://tutorial196.easycfm.com There is also an example at http://www.durette.org/tutorials/MultiSelect.cfm Steve -- Best regards, Steven mailto:[EMAIL PROTECTED] [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re: Re[2]: Two Selects
Looks fairly close to what I submitted, what browser versions has yours been tested on? - Calvin - Original Message - From: Steven Durette To: CF-Talk Sent: Wednesday, December 31, 2003 6:30 PM Subject: Re[2]: Two Selects You might also want to check out a tutorial I wrote for easycfm.com It deals with homegrown multiple selects related that can be used multiple times within a form. The article can be found at http://tutorial196.easycfm.com There is also an example at http://www.durette.org/tutorials/MultiSelect.cfm Steve -- Best regards, Steven mailto:[EMAIL PROTECTED] [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Re[5]: Two Selects
All, I have just tested the Multi Selects Related demo for the tutorial on the following browsers: IE 6.0.2800.106.xpsp2.030422-1633 Opera 7.23 Mozilla 1.5.0.2003100716 Mozilla Firebird 0.7 Netscape 7.1 MyIE2 0.9.12 And it passed all of them with flying colors.Are there any other major browsers that you suggest that I check?I am on a WinXP system, so I can't check Linux or MacOS web browsers. Thanks Steve SD Hello Calvin, SD Mine was tested on IE, but I used the _javascript_ 1.3 pdf from SD Netscape's web site to ensure that the _javascript_ would be processed SD properly an not use any JS that was IE specific. SD I have just recently started to download other browsers for testing at SD home. The place that I work has a closed intranet where the SD browser/version is dictated to us by IT. SD I will do some testing and see what I find out. SD Steve SD Wednesday, December 31, 2003, 9:52:17 PM, you wrote: CW Looks fairly close to what I submitted, what browser CW versions has yours been tested on? -- Best regards, Steven mailto:[EMAIL PROTECTED] [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Two Selects
Can someone point me to the latest version of the Two Selects Related tag that works in CFMX? Thanks! Hatton --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.555 / Virus Database: 347 - Release Date: 12/23/2003 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]
Two Selects Related - Problem
Has anyone had a problem with the two selects related tag where it gets hung up and eats up all of the CPU. If you have, can you please tell me how you fixed it. I am using CF Enterprise server 4.5.1 TIA DDINC -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.