home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / software / pelne / optionp / rds.cab / sampstart.asp < prev    next >
Text File  |  1997-08-14  |  4KB  |  103 lines

  1.  
  2. <HTML>
  3. <HEAD>
  4. <TITLE>ADC Sample Selector</TITLE></HEAD>
  5. <BODY BACKGROUND="/MSADC/Samples/AddressBook/Arcadia.gif">
  6. <CENTER><H1> Sample Selector </H1></Center>
  7. <Bold>Select a Client and Middle Tier to view a sample using that combination.</Bold>
  8. <BR><Center>
  9. <TABLE BORDER=2 CELLPADDING="5" CELLSPACING="5">
  10. <TR>
  11. <TD ALIGN="CENTER"><B><FONT COLOR="#800040">Client Tier</FONT></B></TD>
  12. <TD ALIGN="CENTER"><B><FONT COLOR="#800040">Middle Tier</FONT></B></TD>
  13. <TD ALIGN="CENTER"><B><FONT COLOR="#800040">Data Tier</FONT></B></TD>
  14. </TR>
  15.  
  16. <TR>  <!-- These first two options are enabled as the default. -->
  17. <TD ALIGN="LEFT"><INPUT TYPE="RADIO" NAME="optClient" CHECKED OnClick="SetCT('IEVBS')"> VBScript in Internet Explorer</TD>
  18. <TD ALIGN="LEFT"><Input Type="RADIO" Name="optMiddleTier" CHECKED OnClick="SetMT('ADC')"> ADF Automatically</TD>
  19. <TD ALIGN="CENTER" Width="150"><B><FONT COLOR="#008080">Chose Query Type On Sample Page</FONT></B></TD>
  20. </TR>
  21.  
  22. <TR>
  23. <TD ALIGN="LEFT"><INPUT TYPE="RADIO" NAME="optClient" OnClick="SetCT('VBC')"> Visual Basic</TD>
  24. <TD ALIGN="LEFT"><INPUT TYPE="RADIO" Name="optMiddleTier" OnClick="SetMT('ADF')"> AdvancedDataFactory</TD>
  25. </TR>
  26.  
  27. <TR>
  28. <TD ALIGN="CENTER"></TD>
  29. <TD ALIGN="LEFT"><Input Type="RADIO" Name="optMiddleTier" OnClick="SetMT('VBBO')"> Custom Visual Basic Business Object</TD>
  30. <TR>
  31. <TD ALIGN="CENTER"></TD>
  32.  
  33. </TABLE>
  34.  
  35. <BR>
  36. <INPUT TYPE=BUTTON VALUE="GO see the Sample" NAME="GetSample">
  37. <INPUT NAME="txtResult" SIZE="70" VALUE="The Advanced Data Control in the basic coding scenario from Internet Explorer">
  38.  
  39. </CENTER>
  40.  
  41. <SCRIPT LANGUAGE="VBScript">
  42.  
  43. Dim ClientTierSel
  44. Dim MiddleTierSel
  45.  
  46. 'Initialize starting selection values.
  47. ClientTierSel = "IEVBS"
  48. MiddleTierSel = "ADC"
  49.  
  50. 'Reset Client Tier selection.
  51. Sub SetCT(NewCT)    
  52.     ClientTierSel = NewCT
  53.     Call ShowStatus
  54. End Sub
  55.  
  56. 'Reset Middle Tier selection.
  57. Sub SetMT(NewMT)
  58.     MiddleTierSel = NewMT 
  59.     Call ShowStatus
  60. End Sub
  61.  
  62. 'Update message based on Client and Middle Tier selections.
  63. Sub ShowStatus()
  64.     'IE client selections
  65.     If ClientTierSel = "IEVBS" And MiddleTierSel = "ADC" Then 
  66.         txtResult.Value= "The Advanced Data Control in the basic coding scenario from Internet Explorer"
  67.     ElseIf ClientTierSel = "IEVBS" And MiddleTierSel = "ADF" Then
  68.         txtResult.Value= "The Advanced Data Factory being called manually to get data"
  69.     ElseIf ClientTierSel = "IEVBS" And MiddleTierSel = "VBBO" Then    
  70.         txtResult.Value= "A Custom Business Object called from the ADC in Internet Explorer"
  71.     End If
  72.  
  73.     'VB client selections
  74.     If ClientTierSel = "VBC" And MiddleTierSel <> "VBBO" Then
  75.         txtResult.Value= "The Advanced Data Factory being called from a Visual Basic client"
  76.     ElseIf    ClientTierSel = "VBC" And MiddleTierSel = "VBBO" Then
  77.         txtResult.Value= "A Custom Business Object called from a Visual Basic client"
  78.     End If
  79. End Sub
  80.  
  81. 'Determine which sample page to call based on RADIO button settings.
  82. Sub GetSample_OnClick
  83.     'IE client selections
  84.     If ClientTierSel = "IEVBS" And MiddleTierSel = "ADC" Then
  85.         Window.location.href = "Client/IE/ADCAuto.asp"
  86.     ElseIf ClientTierSel = "IEVBS" And MiddleTierSel = "ADF" Then
  87.         Window.location.href ="Client/IE/ADCtoADF.asp"
  88.     ElseIf ClientTierSel = "IEVBS"  And MiddleTierSel = "VBBO" Then
  89.         Window.location.href ="Client/IE/ADCtoVB.asp"
  90.     End If
  91.  
  92.     'VB client selections
  93.     If ClientTierSel = "VBC" And MiddleTierSel <> "VBBO" Then
  94.             Window.Open("Client/VB/VBtoADF/Setup/VBtoADF.htm")
  95.     ElseIf ClientTierSel = "VBC" And MiddleTierSel = "VBBO" Then
  96.             Window.Open("Client/VB/VBtoVB/Setup/VBtoVB.htm")
  97.     End If        
  98. End Sub
  99.  
  100. </SCRIPT>
  101. </BODY>
  102. </HTML>
  103.