Results 1 to 3 of 3

Thread: Tornado - Popup window implementation

  1. #1
    Join Date
    Dec 2002
    Albany, NY

    Tornado - Popup window implementation


    What is the best way to implement a popup window, via custom button which contains a table data (eg) memo field or text?

    We have a dscription field which can contain large amounts of data and need to implement the custom button/popup window.


  2. #2
    Join Date
    Oct 2002
    You can Have a MagicText to Pop a window and then execute a second program with a key value passed in the URL. You then need to open the DB and then retrieve the one field in the one record and the display in the window. This is pretty standard since Classic ASP-db.

    The latest patch includes a MEMO PopText feature. No need to program a second popup application. However, it works only in MEMO field and not 256 text field. Check out the manual. Several users are testing that now... I can send you a copy if needed.

    Look at this example which performs the master / slave popup in one file -

    <body onLoad="self.focus()">
    <script language="vb" runat="server">
    Sub Page_Load(Source as Object, E as EventArgs)
    Dim myself = Request.ServerVariables("SCRIPT_NAME")
    If Request.QueryString("details") = "" Then
    Dim pop As String = "<A HREF='" & myself & "?Details=#0#' Target='Details' onClick=""'','Details', 'width=500, height=500, left=400, top=400, directories=no, menubar=no, toolbar=no, status=no, resizable=yes')"">#0#</A>"
    Dim E63 As New tornado.z()
    With E63
    .dbQP = "U=60| S=Gold| M=G| D=Nwind| GDF=CustomerID,CompanyName,ContactName"
    .dbEmbeddedGridMagicCell = "(;![]#|~/+{})fi=OrderID|mac=" & pop
    .dbGridMagicCell = "(;![]#|~/+{})field=CompanyName|macro=#1#<br>#4#<br>#5#, #7#<p>#2#<br>#4#<br>#9#! field=ContactName|Macro=SQL:SELECT OrderID,OrderDate,RequiredDate,ShippedDate from orders where customerID= '#0#'"
    .dbNameMap = "field=CustomerID|alias=ID,field=CompanyName|alias =Customer,field=ContactName|alias=Orders"
    .dbEmbeddedGridNameMap = "field=OrderID|alias=ID,field=OrderDate|alias=Orde red,field=RequiredDate|alias=Required,field=Shippe dDate|alias=Shipped"
    .dbSQL = "SELECT CustomerID,CompanyName,ContactName,ContactTitle,Ad dress,City,Region,PostalCode, Country,Phone,Fax FROM Customers"
    .dbTextHolder = "Title=Tornado Demo - Advanced Master with embedded Charting Details|subtitle=Can you image you can do this with 30 lines of code without knowing too much about ASP or ASP.NET?"
    End With
    Dim ID As String = Request.QueryString("Details")
    Dim E61 As New tornado.z()
    With E61
    .dbQP = "U=61| S=Gold| M=GC| PS=-1| Ni=None| D=Nwind.mdb"
    .dbGridMagicCell = "field=0|tag=align=middle,field=2|tag=align=right, field=4|tag=align=right,field=SubTotal|tag=align=r ight|macro=#SubTotal:currency#,field=Quantity|tag= align=right|macro=#quantity#"
    .dbCommonTables = "index=PID,PDesc|sql=Select ProductID,ProductName from Products"
    .dbLookUpFlds = "field=1|keyindex=PID|Lookupindex=PDesc"
    .dbSQL = "SELECT ProductId,ProductId as Description,UnitPrice,Quantity,Discount,UnitPrice* Quantity*(1 -Discount) as SubTotal from [order details] where OrderID=" & ID
    .dbAggregate = "(~^Fields=3^5|AggType=SUM|BottomTemp=<tr bgcolor=yellow align=right><td ColSPAN=3><b>Total </b></td><td>[[3:###,###]]<td><td Colspan=2 align=right>[[5:Currency]]</td>|CellFormat=Val"
    .dbTextHolder = "Title=Order Details for Order " & ID
    .dbChartData = "dataset0yValues=#(5)#| dataset0Labels=#1#"
    .dbChartParams = "Type=26| TitleString='Description vs SubTotal Spinning Plot'| titleFont='Arial,14,1'| Archieve=/tornado/Jars/|Width=350| Height=350| 3D=True| textLabelsOn=True| pieWidth=.40| pieHeight=.40| valueLabelsOn=True"
    .dbGridTemplate = "<center>[[Grid]]<P>[[Chart]]</center>"
    End With
    End If
    End Sub


    p.s. the aggregate prop delimiters are being changed to icons for some reason... watch out...

  3. #3
    Join Date
    Oct 2002
    I implemented the "field" poptext in the magic and it seems pretty easy. Give it a try withthe following code. Both memo and text field pop use the same window prop. Pick up the latest in your ftp dir version - 7.22.04 ->

    Dim Mydb As New tornado.z()
    With Mydb
    .dbQP = "Unit=2| Mode=Grid| S=2| DSN=Nwind| gdf=0,1,2,Notes| SQL=SELECT * From employees| TextHolder=Title=Pop Memo"
    .dbMagicCell = "f=firstname|mac=#poptext#"
    .dbPopText = "Skin=Plain| LinkText = <IMG border=0 SRC='/tornado/images-net/search.gif'>..."
    End With


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts