This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Pages: [1]
1
Web Server - Ask For Help / Re: Tree function
« on: December 31, 2007, 12:44:45 AM »
Hallo Bram,
Even een stukje in het Nederlands.
Ik zag dat je uit Musselkanaal komt en dat is maar 100 kilometer hier vandaan (Dokkum)
Maar de rest doe ik in het Engels dan snappen de andere forum gebruikers het ook.
Sorry guys this was just a little dutch.
however,
This is a sample of how i build the treeitems with three levels (And more is just as simple)
I know it ia a long one, but it could be helpfull for someone
regards
Evert
!!!!!!!!! I use the Main lvel to retrun to the mainMenu
Treemenu routine
temptext='BACK TO MAIN MENU'
linktext=clip('MenuOnLeft target="left_fram""')
packet = clip(packet) & |
'<9><<script language="JavaScript"><13,10>'&|
'<9><<!--//<13,10>'&|
'<13,10>'&|
'var TREE_ITEMS = [<13,10>'&|
'<9>['&''''&clip(temptext)&''''&','&''''&linktext&''''&',<13,10>'
do SendPacket
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!! Then I make a menu-node that is only visible for customers to go to the check-out
if p_web.GetSessionValue('Customernumber')>0
temptext=clip('To ShoppingCart')
linktext=clip('ToCheckout target="right_fram""')
packet = clip(packet) & |
'<9,9>['''&clip(temptext)&''''&','&''''&linktext&''''&'],<13,10>'
do sendpacket
.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!Then the real Parent child thingy based on data files is starting
!!!!Based on these files:
open(ProductMainGroup,42h)
open(ConnectFileMainSub,42h)
open(ProductSubgroup,42h)
open(ConnectFileSubgroup_Group,42h)
open(ProductGroup,42h)
!!!!!!!!!
!!!!Here we go!
MAIN:MaingroupDescription=''
set(MAIN:KeyMaingroupDescription,MAIN:KeyMaingroupDescription)
loop until eof(ProductMainGroup)
next(ProductMainGroup)
temptext=clip(MAIN:MaingroupDescription)
z#=0
loop until z#=1
if instring('''',temptext,1,1)>0
x#=len(clip(temptext))
temptext=clip( SUB( clip(temptext),1,(instring('''',temptext,1,1)-1)) & SUB(clip(temptext),(instring('''',temptext,1,1)+1),x#) )
else
z#=1
.
end
linktext=clip('Bestelregel<!-- Net:s:SID-->&BrowseOrderregels_Sort=+bes:DEBNUM,+bes:Artikelnr&UpdateFile=Bestelregels&UpdateKey=bes:KEYORDERREGE&IDField=bes__ORDERREGELNU&Insert_btn=Insert&target=right_fram&filtertext=Hgroup:'&MAIN:Maingroupnumber&'.')
packet = clip(packet) & |
'<9,9>['&''''&clip(temptext)&''''&','&''''&linktext&''''&',<13,10>'
do sendpacket
HS:Maingroupnumber=MAIN:Maingroupnumber
set(HS:KeyMaingroupnumber,HS:KeyMaingroupnumber)
loop until eof(ConnectFileMainSub) or HS:Maingroupnumber<>MAIN:Maingroupnumber
next(ConnectFileMainSub)
if HS:Maingroupnumber=MAIN:Maingroupnumber
SUB:Subgroupnumber=HS:Subgroupnumber
get(ProductSubgroup,SUB:KeySubgroupnumber)
temptext=clip(SUB:SubgroupDescription)
z#=0
loop until z#=1
if instring('''',temptext,1,1)>0
x#=len(clip(temptext))
temptext=clip( SUB( clip(temptext),1,(instring('''',temptext,1,1)-1)) & SUB(clip(temptext),(instring('''',temptext,1,1)+1),x#) )
else
z#=1
.
end
linktext=clip('Bestelregel<!-- Net:s:SID-->&BrowseOrderregels_Sort=+bes:DEBNUM,+bes:Artikelnr&UpdateFile=Bestelregels&UpdateKey=bes:KEYORDERREGE&IDField=bes__ORDERREGELNU&Insert_btn=Insert&target=right_fram&filtertext=Sgroup:'&SUB:Subgroupnumber&'.')
packet = clip(packet) & |
'<9,9,9>['&''''&clip(temptext)&''''&','&''''&linktext&''''&',<13,10>'
do sendpacket
AKSG:Subgroup=SUB:Subgroupnumber
set(AKSG:PerSubgroup,AKSG:PerSubgroup)
loop until eof(ConnectFileSubgroup_Group) or AKSG:Subgroup<>SUB:Subgroupnumber
next(ConnectFileSubgroup_Group)
if AKSG:Subgroup=SUB:Subgroupnumber
ARG2:Groupnumber=AKSG:Groupnumber
get(ProductGroup,ARG2:KeyGroupnumber)
temptext=clip(ARG2:Description)
z#=0
loop until z#=1
if instring('''',temptext,1,1)>0
x#=len(clip(temptext))
temptext=clip( SUB( clip(temptext),1,(instring('''',temptext,1,1)-1)) & SUB(clip(temptext),(instring('''',temptext,1,1)+1),x#) )
else
z#=1
.
end
linktext=clip('Bestelregel<!-- Net:s:SID-->&BrowseOrderregels_Sort=+bes:DEBNUM,+bes:Artikelnr&UpdateFile=Bestelregels&UpdateKey=bes:KEYORDERREGE&IDField=bes__ORDERREGELNU&Insert_btn=Insert&target=right_fram&filtertext=Agroup:'&ARG2:Groupnumber&'.')
packet = clip(packet) & |
'<9,9,9,9>['''&clip(temptext)&''''&','&''''&linktext&''''&'],<13,10>'
do SendPacket
.
end
packet = clip(packet) & |
'<9,9,9>],<13,10>'
do SendPacket
.
end
packet = clip(packet) & |
'<9,9>],<13,10>'
do SendPacket
end
packet = clip(packet) & |
'<9>]<13,10>'&|
'];<13,10>'&|
'<9>//--><13,10>'&|
'<9><</script><13,10>'&|
''
do SendPacket
Even een stukje in het Nederlands.
Ik zag dat je uit Musselkanaal komt en dat is maar 100 kilometer hier vandaan (Dokkum)
Maar de rest doe ik in het Engels dan snappen de andere forum gebruikers het ook.
Sorry guys this was just a little dutch.
however,
This is a sample of how i build the treeitems with three levels (And more is just as simple)
I know it ia a long one, but it could be helpfull for someone
regards
Evert
!!!!!!!!! I use the Main lvel to retrun to the mainMenu
Treemenu routine
temptext='BACK TO MAIN MENU'
linktext=clip('MenuOnLeft target="left_fram""')
packet = clip(packet) & |
'<9><<script language="JavaScript"><13,10>'&|
'<9><<!--//<13,10>'&|
'<13,10>'&|
'var TREE_ITEMS = [<13,10>'&|
'<9>['&''''&clip(temptext)&''''&','&''''&linktext&''''&',<13,10>'
do SendPacket
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!! Then I make a menu-node that is only visible for customers to go to the check-out
if p_web.GetSessionValue('Customernumber')>0
temptext=clip('To ShoppingCart')
linktext=clip('ToCheckout target="right_fram""')
packet = clip(packet) & |
'<9,9>['''&clip(temptext)&''''&','&''''&linktext&''''&'],<13,10>'
do sendpacket
.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!Then the real Parent child thingy based on data files is starting
!!!!Based on these files:
open(ProductMainGroup,42h)
open(ConnectFileMainSub,42h)
open(ProductSubgroup,42h)
open(ConnectFileSubgroup_Group,42h)
open(ProductGroup,42h)
!!!!!!!!!
!!!!Here we go!
MAIN:MaingroupDescription=''
set(MAIN:KeyMaingroupDescription,MAIN:KeyMaingroupDescription)
loop until eof(ProductMainGroup)
next(ProductMainGroup)
temptext=clip(MAIN:MaingroupDescription)
z#=0
loop until z#=1
if instring('''',temptext,1,1)>0
x#=len(clip(temptext))
temptext=clip( SUB( clip(temptext),1,(instring('''',temptext,1,1)-1)) & SUB(clip(temptext),(instring('''',temptext,1,1)+1),x#) )
else
z#=1
.
end
linktext=clip('Bestelregel<!-- Net:s:SID-->&BrowseOrderregels_Sort=+bes:DEBNUM,+bes:Artikelnr&UpdateFile=Bestelregels&UpdateKey=bes:KEYORDERREGE&IDField=bes__ORDERREGELNU&Insert_btn=Insert&target=right_fram&filtertext=Hgroup:'&MAIN:Maingroupnumber&'.')
packet = clip(packet) & |
'<9,9>['&''''&clip(temptext)&''''&','&''''&linktext&''''&',<13,10>'
do sendpacket
HS:Maingroupnumber=MAIN:Maingroupnumber
set(HS:KeyMaingroupnumber,HS:KeyMaingroupnumber)
loop until eof(ConnectFileMainSub) or HS:Maingroupnumber<>MAIN:Maingroupnumber
next(ConnectFileMainSub)
if HS:Maingroupnumber=MAIN:Maingroupnumber
SUB:Subgroupnumber=HS:Subgroupnumber
get(ProductSubgroup,SUB:KeySubgroupnumber)
temptext=clip(SUB:SubgroupDescription)
z#=0
loop until z#=1
if instring('''',temptext,1,1)>0
x#=len(clip(temptext))
temptext=clip( SUB( clip(temptext),1,(instring('''',temptext,1,1)-1)) & SUB(clip(temptext),(instring('''',temptext,1,1)+1),x#) )
else
z#=1
.
end
linktext=clip('Bestelregel<!-- Net:s:SID-->&BrowseOrderregels_Sort=+bes:DEBNUM,+bes:Artikelnr&UpdateFile=Bestelregels&UpdateKey=bes:KEYORDERREGE&IDField=bes__ORDERREGELNU&Insert_btn=Insert&target=right_fram&filtertext=Sgroup:'&SUB:Subgroupnumber&'.')
packet = clip(packet) & |
'<9,9,9>['&''''&clip(temptext)&''''&','&''''&linktext&''''&',<13,10>'
do sendpacket
AKSG:Subgroup=SUB:Subgroupnumber
set(AKSG:PerSubgroup,AKSG:PerSubgroup)
loop until eof(ConnectFileSubgroup_Group) or AKSG:Subgroup<>SUB:Subgroupnumber
next(ConnectFileSubgroup_Group)
if AKSG:Subgroup=SUB:Subgroupnumber
ARG2:Groupnumber=AKSG:Groupnumber
get(ProductGroup,ARG2:KeyGroupnumber)
temptext=clip(ARG2:Description)
z#=0
loop until z#=1
if instring('''',temptext,1,1)>0
x#=len(clip(temptext))
temptext=clip( SUB( clip(temptext),1,(instring('''',temptext,1,1)-1)) & SUB(clip(temptext),(instring('''',temptext,1,1)+1),x#) )
else
z#=1
.
end
linktext=clip('Bestelregel<!-- Net:s:SID-->&BrowseOrderregels_Sort=+bes:DEBNUM,+bes:Artikelnr&UpdateFile=Bestelregels&UpdateKey=bes:KEYORDERREGE&IDField=bes__ORDERREGELNU&Insert_btn=Insert&target=right_fram&filtertext=Agroup:'&ARG2:Groupnumber&'.')
packet = clip(packet) & |
'<9,9,9,9>['''&clip(temptext)&''''&','&''''&linktext&''''&'],<13,10>'
do SendPacket
.
end
packet = clip(packet) & |
'<9,9,9>],<13,10>'
do SendPacket
.
end
packet = clip(packet) & |
'<9,9>],<13,10>'
do SendPacket
end
packet = clip(packet) & |
'<9>]<13,10>'&|
'];<13,10>'&|
'<9>//--><13,10>'&|
'<9><</script><13,10>'&|
''
do SendPacket
2
Web Server - Ask For Help / Re: Tree function
« on: December 24, 2007, 12:59:08 PM »
I used this one in my "MenuOnLeft":
http://www.softcomplex.com/products/tigra_tree_menu/docs/
It's flexible, easy to use, and free...
I can recommend it.
regards
Evert
http://www.softcomplex.com/products/tigra_tree_menu/docs/
It's flexible, easy to use, and free...
I can recommend it.
regards
Evert
Pages: [1]