Sample ASP Page, Inline-Frame League Schedule, VBScript
Return - Your Pages Setup
In this sample, you only need the programming in blue, optional lines
are in green.
For a quick-start, you can copy and paste this entire code to a file in your website named
"SampleIframeLeagueSchedule.asp", then view this page in your browser:
http://(YourSite)/SampleIframeLeagueSchedule.asp
Working sample:
http://www.divebarsussex.com/SampleIframeLeagueSchedule.asp?rES=3&rSP=1&rLN=236&rDM=1
(displaying the sample code below)
If you would rather skip the sample page, just copy and paste the blue,
and optionally green lines into your .asp page.
<% ' Sample League Schedule file, using inline-frame, for IIS Server, ASP VBScript
' --------------------------------- Retrieve settings from the Query String
xES = Request.QueryString("rES") ' EstablishmentNumber
xSP = Request.QueryString("rSP") ' SportNumber
xLN = Request.QueryString("rLN") ' LeagueNumber
xDM = Request.QueryString("rDM") ' DisplayMode
' --------------------------------- The next 2 settings for options on this page
xMO = 1 ' Set MouseOverTeam and MouseOverRow Hi-Light effect
' (1=enable,0=disable)
xFD = 1 ' Set TopOfPage FullDisplay elements (1=enable,0=disable)
' (the PrinterFriendly link and Standings link)
URLStr = "http://www.easyleagues.biz/Content/Schedule.asp?rES=" & xES & _
"&rSP=" & xSP & "&rLN=" & xLN & "&rDM=" & xDM & "&rMO=" & xMO & "&rFD=" & xFD %>
<% CalcFrameStr = "http://www.easyleagues.biz/Content/CalcParentFrame.asp?" & _
"rES=" & xES & "&rSP=" & xSP & "&rLN=" & xLN & "&rPG=2&rTH=22&rCH=23&rFF=5" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<title>iframe Sample - League Schedule</title>
<style type="text/css"><!--
.easyLeaguesFrame {width: 90%; height: 200px; margin: 5px 5%;
border: 1px solid #c0c0c0; overflow: hidden;} --></style>
<link href="<%= Server.HTMLEncode(CalcFrameStr) %>" rel="stylesheet" type="text/css" />
</head>
<body>
<div style="width: 800px; height: 100px; border: 1px solid #000000;">
Your page header/banner here.
</div>
<div style="width: 800px; border: 1px solid #000000;">
<p>Your personalized page-body content here, before the Schedule content.</p>
<!-- The first part of your page programming before here -->
<!-- Begin needed programming -->
<iframe src="<%= Server.HTMLEncode(URLStr) %>" frameborder="0" class="easyLeaguesFrame">
Your browser does not support iframes.<br />
View <a href="<%= Server.HTMLEncode(URLStr) %>" target="_blank">Simple Page</a>
in a new window.
</iframe>
<!-- End needed programming -->
<!-- The remainder of your page programming after here -->
</div>
<div style="width: 800px; height: 100px; border: 1px solid #000000;">
Your page footer here.
</div>
</body>
</html>
Required Query String Parameters.
The EasyLeagues.biz content for both the web page version and printable version of the Schedule page
originates from the same file: "http://www.easyleagues.biz/Content/Schedule.asp". The
parameter "rMO=1" will enable the MouseOver high-lighting in the web page version
(setting "rMO=0" will disable the MouseOver high-lighting for the printable version).
The parameter "rFD=1" will enable FullDisplay of the top-of-page links to a
printer-friendly version and also the standings page (setting "rFD=0" will prevent the
top-of-page information from appearing on the printer-friendly version of the Schedule).
Remember to seperate each parameter with an "&" (ampersand).
Optional programming, calculate <iframe> height.
Looking at the example above, you will see the URL for the style-sheet was constructed and assigned
to a variable named CalcFrameStr. In the "Query String Parameter" part of the URL, the
"EstablishmentNumber", "SportNumber", and "LeagueNo" were passed in according what League was selected.
The four additional parameters for specifying how the <iframe> height should be
calculated are the same as on the LeagueSelect page:
- rPG=2, which page to calculate for (1=LeagueSelect, 2=LeagueSchedule, 3=LeagueStandings).
- rTH=22, how tall the TitleHeight rows are. (all heights are in pixels).
- rCH=23, the CellHeight rows in the rest of the table.
- rFF=5, a FudgeFactor value to be added.
Sample Page Styles and Links
The styles and links in the sample pages will not work properly until you have copied the sample CSS
files to your site and configured "Settings" in EasyLeagues.biz, but the content will display without
problem.