GuidesCreating Dynamic Forms Page 2

Creating Dynamic Forms Page 2

ServerWatch content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.




This page is the main page for the insurance company. It contains
links to the new transaction page and links to each transaction,
done thru DHTML outlines.

The following  javascript is
from MSDN. It is used for the DHTML outlines for the Insurance
center

 
function clickHandler() {
      var
targetId, srcElement, targetElement;
    

      srcElement =
window.event.srcElement;
      if
(srcElement.className == “Outline”)
{
          
targetId = srcElement.id +
“d”;
          
targetElement =
document.all(targetId);
      if
(targetElement.style.display == “none”)
{
         
targetElement.style.display =
“”;
         
srcElement.src = “OPEN.gif”;
      }
else {
         
targetElement.style.display =
“none”;
         
srcElement.src = “CLOSED.gif”;
     
}
}
}

document.onclick =
clickHandler;

INSURANCE
CENTER:


‘I have begun using file DSN to connect to
web databases. It is the way to go if you have to wait
‘for an
administrator to set up a system DSN

DB_PATH = SERVER.MAPPATH(“/DB”)  ‘map a path to the Database directory
CONNECT_STR = “FILEDSN=”&DB_PATH&”DB.DSN;”
& _
“DBQ=” & DB_PATH & “WEBDB.MDB;”  

count.Open
CONNECT_STR  
‘open the db
connection

‘get a recordset of all the transactions
Set RS = Count.Execute(“SELECT * FROM TRAN ORDER
BY TR_NAME”)
%>

MAINTENANCE

     ADD NEW
TRANSACTION

     ADD NEW
INSURANCE TYPE

<img src="" id="Out” class=”Outline” style=”cursor: hand” width=”16″ height=”16″> TRANSACTIONS

‘in this loop we are creating a link
to each form

DO WHILE NOT RS.EOF

      DIV_NBR = DIV_NBR + 1
%>

    — 
<a href="TRAN.ASP?TRAN_ID=“>

RS.MOVENEXT
LOOP
%>

Get the Free Newsletter!
Subscribe to Daily Tech Insider for top news, trends & analysis
This email address is invalid.
Get the Free Newsletter!
Subscribe to Daily Tech Insider for top news, trends & analysis
This email address is invalid.

Latest Posts

Related Stories