Click to See Complete Forum and Search --> : collapsible list to display faqs


savi
09-12-2005, 08:32 AM
Hi,

I have some error in my collapsible list to display faqs. I am not able to display the complete data. The code is displaying only 11 faqs of the first category. But I have 15 categories to display.



Thanks
savi

minority
09-12-2005, 10:23 AM
for a start you cant create an asp faq unless you are posting back each time to the server are you doing this?

secondly you would find this far more effective if you populated a javascript array and then used javascript to collapse and expand as required.

as the way you are currently employing means bandwidth is being used, time between server calls etc.

Bullschmidt
09-13-2005, 10:54 PM
I have some error in my collapsible list to display faqs. I am not able to display the complete data. The code is displaying only 11 faqs of the first category. But I have 15 categories to display.



strQuery = "SELECT * FROM FAQ WHERE Status='Approved' AND Type='Question' ORDER BY Category DESC, ModifyDate DESC, Question ASC"


Maybe the records that you want to show but aren't showing have either a blank Status field or a blank Question field. Anyways I doubt that they have both Status of Approved and Type of Question.

Don't know if it would help to put brackets around Status and Type:
strQuery = "SELECT * FROM FAQ WHERE [Status]='Approved' AND [Type]='Question' ORDER BY Category DESC, ModifyDate DESC, Question ASC"


If strCategory <> objRS("category") then
strCategory = objRS("category")
catcnt=catcnt+1
Select Case strCategory
Case "DomainServices"
strDispCat = "AD / Domain Services"
tog_col = 0
Case "TerminalServices"
strDispCat = "Terminal Services"
...


Maybe there are some typing differences (including lowercase vs. uppercase) between these and what's in your database.