Static page technology in ASP

xiaoxiao2021-03-06  74

Demonstration: http://asp2004.net/temp/treemenu/Menu.asp Source Code Download: http://asp2004.net/temp/treeMenu.rar

<

!

-

#include file

=

"

Conn.asp

"

->

<

%

DIM

Str

FUNCTION

Menu (ID)

Set

RS

=

Server.

CreateObject

(

"

AdoDb.recordset

"

SQL

=

"

Select * from menu where id1 =

"

&

id

&

"

ORDER BY URL, ID "

RS.Open SQL, CONN,

1

,

1

Str

=

Str

"

"

CHR

(

13

I

=

1

While

NOT

Rs.eof childcount

=

CN.

EXECUTE

(

"

SELECT Count (*) from menu where id1 =

"

&

RS (

"

id

"

))))

0

)

IF

Childcount

=

0

THEN

IF

i

=

Rs.Recordcount

THEN

MenuType

=

"

File1 "

Else

MenuType

=

"

File "

End

IF

Menuname

=

"

"

&

RS (

"

Menuname

"

)

&

"

OnMouseup

=

"

"

Else

IF

i

=

Rs.Recordcount

THEN

MenuType

=

"

Menu3 "

LISTTYPE

=

"

List1

OnMouseup

=

"

ONMOUSEUP = Change1 ('A

"

&

RS (

"

id

"

)

&

"

',' b

"

&

RS (

"

id

"

)

&

"

'); "

Else

MenuType

=

"

Menu1 "

LISTTYPE

=

"

List "

OnMouseup

=

"

ONMOUSEUP = Change2 ('a

"

&

RS (

"

id

"

)

&

"

',' b

"

&

RS (

"

id

"

)

&

"

'); "

End

IF

Menuname

= RS (

"

Menuname

"

)

End

IF

Str

=

Str

"

"

&

OnMouseup

&

"

>

"

&

Menuname

&

"

"

CHR

(

13

)

IF

Childcount

>

0

THEN

Str

=

Str

"

"

&

RS (

"

id

"

)

&

"

'Style =' Display: None '>