|
Navigation - DynaTree with Visual Data Format |
The second tree data format is a visual format in which you can use any tool
to create. The only requirement is that the levels must have the same
indentation. We create the car_visual.txt file manually with the firing node on
purpose as the third node so we can use the same display Right Frame code as
before. The only parameters we need to change is the Data file name, Data Type,
default url and default target frame (in blue). That's all.
Main Frame Code - Setup Left and Right FRAME
|
<!--T_TreeFrame_2.html-->
<FRAMESET cols="25%,*">
<FRAME SCROLLING='yes' NAME="main" SRC='T_showtree_2.aspx'>
<FRAME NAME='disp' SRC='T_showcar.aspx'>
</FRAMESET>
|
Left Frame Tree Code - Data from file - Visual
Format
|
<!--T_showtree.aspx-->
<script language="vb" runat="server">
Sub Page_Load(Source as Object, E as EventArgs)
Dim Rm As New Tornado.Z()
Dim Params as string="tdfp=car_Visual.txt|
wi=200| he=500|mst=5| mbg=ffffff| mifp=aspdbmenuicons1.gif|
sifp=aspdbmenuscroll.gif| fontsize2=11|
fontname0=Verdana| fontname1=Verdana| fontname2=Verdana| fontname3=Verdana|
textstyle2=1| xoffset0=4| xoffset1=4| xoffset2=4| xoffset3=3|
hovercolor0=6E6E6E| hovercolor1=6E6E6E |hovercolor2=6E6E6E |hovercolor3=6E6E6E|
opencolor0=FF0000| opencolor1=FF0000| opencolor2=FF0000| visitedcolor0=a5a5a5|
Visitedcolor1=a5a5a5| visitedcolor2=a5a5a5| visitedcolor3=a5a5a5| nodeheight=1|
Type=Template| du=http://localhost/tornado/ShowCar.aspx|
dt=disp"
Rm.dbTreeParams = Params
Response.Write(Rm.ASPdbTree())
End Sub
</script> |
Right Frame Display Code (same as Previous example)
|
<!--T_showcar.aspx-->
<script language="vb" runat="server">
Sub Page_Load(Source as Object, E as EventArgs)
Dim aa As String = Request.QueryString("V2")
If aa <> "" Then
Dim DY5 As New Tornado.Z()
With DY5
.dbQP="U=56| S=bluebricks| M=f|
D=car2000.Mdb| Mts=-1| Th=tit=Dynamic Tree"
.dbSQL = "SELECT * FROM
Carspecs WHERE car = '" & aa & "'"
.dbFormTemplate =
"file=/tornado/templates/Autosales/eg_CarDisplaytemplate1.html"
.dbFormMagicCell = "fi=Price|macro=#Price::Currency#,fi=Picture|macro=<IMG
width=256 SRC='/tornado/DB/images-car/#picture#'>"
.ASPdbNET()
End With
Else
response.write("<body bgcolor='#ffffff'
leftmargin='0' marginwidth='0' topmargin='0' marginheight='0'>")
response.write("<img src='/tornado/templates/autosales/logo.jpg'
width='585' height='240' border='0'></body>")
End If
End Sub
</script>
|
Visual Tree Data - Car_visual.txt
|
<!--Car_visual.txt--> US
Cadillac
Catera
DeVille
Eldorado
Seville
Buick
Century
Le Sabre
Park Avenue
Regal
Riviera
Pontiac
Bonneville
Firebird
Grand Am
Grand Prix
Sunfire
Chevrolet
Lumina
Malibu
Monte Carlo
S-Series
Suburban
Tahoe
Venture
Japan
Honda
Accord
Civic
CR-V
del Sol
Odyssey
Passport
Prelude
Toyota
4Runner
Avalon
Celica
Corolla
Land Cruiser
Europe
Mercedes
C-Class
E-Class
S-Class
SL-Class
SLK
CLK |