• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

2selectsrelated help

New Here ,
Dec 02, 2007 Dec 02, 2007

Copy link to clipboard

Copied

WOW as a jr developer years ago I got this working in my sleep. Now I cant get it to work. Funny enough I am using it for the exact same reason as used in the help file and copied the code exactly and even used the same field names in my query and the second select wont populate.

Here is my query
SELECT c.CategoryID AS MCode,
c.CategoryName AS Master_Cat,
s.SubCategoryID AS Code,
s.SubCategoryName AS Cat
FROM Categories c
INNER JOIN SubCategories s ON c.CategoryID = s.FK_CategoryID
ORDER BY c.CategoryName ASC

here is the code
<CF_TwoSelectsRelated
QUERY="Server.Cats"
NAME1="Cat"
NAME2="Selected"
DISPLAY1="Master_Cat"
DISPLAY2="Cat"
VALUE1="MCode"
VALUE2="Code"
FORCEWIDTH1="70"
FORCEWIDTH2="70"
SIZE1="1"
SIZE2="1"
HTMLBETWEEN="<BR>"
AUTOSELECTFIRST="Yes"
EMPTYTEXT2="(now choose a subcategory)">

Views

360

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Dec 02, 2007 Dec 02, 2007

Copy link to clipboard

Copied

Works for me.

> QUERY="Server.Cats"
Is your query really in the server scope "Server.Cats"?

> NAME2="Selected"

Personally I would use a more descriptive name. Also "Selected" is too close to the "selected" property of select lists for my comfort 😉 Though it probably won't cause an error



Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Dec 02, 2007 Dec 02, 2007

Copy link to clipboard

Copied

Btw, CF_TwoSelectsRelated is an "oldie but goodie" as far as tags go. There are also newer options available such as ajax or flash.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 03, 2007 Dec 03, 2007

Copy link to clipboard

Copied

What database do you use?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 03, 2007 Dec 03, 2007

Copy link to clipboard

Copied

SQL Server 2005.

cf_dev1 I just used the exact same code as the example given by the author and renamed my columns to match. Still doesnt work.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Dec 03, 2007 Dec 03, 2007

Copy link to clipboard

Copied

LATEST
What version of the tag are you using?

Are you getting a CF error or javascript error? I'm assuming javascript. Try running the script in FireFox and check Tools > Error Console. What is the error message?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation