There has been a lot of talk of the cryptic variable names, and I apologize for not providing the documentation for the variables. (see the below argument description or for the complete documentation:http://www.softcomplex.com/products/tigra_menu_gold/docs/)

build_hierarchy_var(vn, dbl, tn, idfn, pidfn, cfn, lfn)

Variable name  : Description Accepted : values
vn : Name of _javascript_ variable which will contain menu hierarchy structure. : String
dbl : Path to Microsoft Access DB file : String
tn : Name of the table which will be used as a menu hierarchy source : String
idfn : Field name containing unique ID for each item : String
pidfn : Field name containing parent ID for each item : String
cfn : Field name containing caption for each item : String
lfn : Field name containing link for each item : String

build_hierarchy(conn, id, vn, tn, idfn, pidfn, cfn, lfn)

Variable name : Description : Accepted values
conn : ADODB.Connection object : ADODB.Connection : object
id : Initial parent ID value : Number
vn : Name of _javascript_ variable which will contain menu hierarchy structure : String
tn : Name of the table which will be used as a menu hierarchy source : String
idfn : Field name containing unique ID for each item : String
pidfn : Field name containing parent ID for each item : String
cfn : Field name containing caption for each item : String
lfn : Field name containing link for each item : String

The Tigra Menu GOLD v2.4 DHTML menu has great cross browser support and probably more "accessibility" friendly than most. For example: if you force font size to be bigger in IE, NS, Mozilla, etc..., then the associated container will also increase in size. see: http://www.softcomplex.com/products/tigra_menu_gold/

When I have completed the transition ASP to CF, I will make the source code available to this group.


Thank you,
Stan Winchester
[EMAIL PROTECTED]
http://www.aftershockweb.com/
Tel. 503-244-3440
Fax 503-244-3454

-----Original Message-----
From: Stan Winchester [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 22, 2003 11:07 PM
To: CF-Talk
Subject: ASP to CF5

I am not an ASP programmer and want to know, if this is easily converted to
CF5? Most of it makes sense, but some of it is Greek to me...

<%
'Call build_hierarchy_var("MENU_ITEMS0", "data", "comp", "product_id",
"ppid", "title", "home_url")
Sub build_hierarchy_var(vn, dbl, tn, idfn, pidfn, cfn, lfn)
   Dim MyConn
   MyDsn = "Driver={Microsoft Access Driver
(*.mdb)};DBQ=" & server.mappath(dbl) & ".mdb"
   Set MyConn = Server.CreateObject("ADODB.Connection")
   MyConn.Open MyDsn
   call build_hierarchy(MyConn, 0, vn, tn, idfn, pidfn,
cfn, lfn)
   MyConn.Close
   Set MyConn = Nothing
End Sub

Sub build_hierarchy(conn, id, vn, tn, idfn, pidfn, cfn, lfn)
   Set rs = Server.CreateObject("ADODB.Recordset")

  If id = 0 Then %var <%=vn% = [<%
   End If
   'I understand the select statement of course, but
what is rs.open? "id" is declared on line 9
  rs.open "SELECT * FROM " & tn & " WHERE " & pidfn & "= " & id, conn

  Do While not rs.eof
    If vn = "" Then %,<%  End If
    vn = ""
    clink = rs(lfn)
    cid = rs(idfn)
  % ["<%=rs(cfn)%", "_javascript_:linkCheck('<%=clink%')", <%
    If id = 0 Then %{'st':1}<%
    Else %0<%
    End If
    rs.movenext
    build_hierarchy conn, cid, vn,
tn, idfn, pidfn, cfn, lfn
  %]<%
   Loop
   rs.close
   If id = 0 Then %];<% End If
End Sub
%

Would a recursive custom tag be the way to tackle this?

Any help would be appreciated!

Thank you,
Stan Winchester
[EMAIL PROTECTED]
http://www.aftershockweb.com/
Tel. 503-244-3440
Fax 503-244-3454
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to