i've put this page together using asp, html, javascript amd flash.
java passes a number of variables over to the flash file but the flash graph does not appear. The error which appears is SWFObject in undefined. The script tag contained <script type="text/javascript"> but after taking the "text/" out the, the pages shows not error but also not graph!!!!
at the end of my tether. PLEASE HELP!!!
code is list below
<%@LANGUAGE="VB SCRIPT" CODEPAGE="1252" %>
<%Option Explicit%>
<%Response.Buff er = false%>
<!--#include file="../../app_config/cc_config.asp"-->
<!--#include file="../../app_config/version.asp"-->
<!--#include file="../../app_config/db_config.asp" -->
<!--#include file="../../resources/includes/inc_client_bran d.asp" -->
<!--#include file="../../resources/includes/functions_sql.a sp" -->
<!--#include file="../../resources/includes/functions_datet ime.asp" -->
<%' ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~ SET PAGE NAV AND PERMISSIONS ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~
' Restrict Access to page
Dim iAccessID
iAccessID = 4 ' Equal to the AA_SECURITYID for this page
%>
<!--#include file="../includes/inc_restrictacc ess.asp"-->
<%' ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~ %>
<%
' declare variables
Dim rsData, rsResults, rsLevel, ft_ID, clientID
Dim frmCompleted, completedByDisp lay
Dim frmPriority, priorityDisplay , chart, javaChart, profile, pro, profileSQL
Dim f_day, f_month, f_year, fromDate, fromDateFormatt ed
Dim t_day, t_month, t_year, toDate, toDateFormatted
Dim rsSelectedList, reportSelectLis t, rsProfile
Dim reportSQL, reportJoinSQL, reportOrderSQL
Dim formError
Dim urlQueryVars
Dim option1, option2, option3, option4, option5, option6, option7, option8, option9, option10
Dim n
Dim iRow, rowColor ' alternating row colours
iRow = 1
n = 1
' get search variables
if not isnowt (request.form(" clientID")) then
clientID = request.form("c lientID")
else
clientID = request.queryst ring("clid")
end if
if not isnowt (request.form(" frmFramework")) then
ft_id = request.form("f rmFramework")
else
ft_id = request.queryst ring("cfid")
end if
if not isnowt (request.form(" frmCompleted")) then
frmCompleted = request.form("f rmCompleted")
else
frmCompleted = request.queryst ring("compl")
end if
if not isnowt (request.form(" frmPriority")) then
frmPriority = request.form("f rmPriority")
else
frmPriority = request.queryst ring("priority" )
end if
if not isnowt (request.form(" frmChart")) then
chart = request.form("f rmChart")
else
chart = request.queryst ring("chart")
end if
if not isnowt (request.form(" frmJobProfile") ) then
profile = request.form("f rmJobProfile")
else
profile = request.queryst ring("profile")
end if
f_day = request.form("f _day")
f_month = request.form("f _month")
f_year = request.form("f _year")
t_day = request.form("t _day")
t_month = request.form("t _month")
t_year = request.form("t _year")
fromDate = request.QuerySt ring("fromD")
toDate = request.QuerySt ring("toD")
if frmPriority = 1 then
priorityDisplay = "Display the 10 lowest performing competencies"
reportSQL = " AND (BUSINESS_COMPS .BC_PRIORITY = 1) "
reportOrderSQL = "ASC"
elseif frmPriority = 2 then
priorityDisplay = "Display the 10 highest performing competencies"
reportSQL = ""
reportOrderSQL = "DESC"
end if
if isnowt(toDate) then
toDate = t_day & "-" & t_month & "-" & t_year
toDateFormatted = dateShortDispla y(toDate)
Else
toDateFormatted = dateShortDispla y(toDate)
If IsDate(toDate) Then
t_day = day(toDate)
t_month = monthname(month (toDate))
t_year = year(toDate)
End If
end if
if isnowt(fromDate ) then
fromDate = f_day & "-" & f_month & "-" & f_year
fromDateFormatt ed = dateShortDispla y(fromDate)
Else
fromDateFormatt ed = dateShortDispla y(fromDate)
If IsDate(fromDate ) Then
f_day = day(fromDate)
f_month = monthname(month (fromDate))
f_year = year(fromDate)
End If
end if
urlQueryVars = "clid=" & clientID & "&cfid=" & ft_id & "&compl=" & frmCompleted & "&toD=" & Server.URLEncod e(toDate) & "&fromD=" & Server.URLEncod e(fromDate) & "&priority= " & frmPriority & "&chart=" & chart & "&profile=" & profile
If not IsDate(toDate) Then
formError = 1
response.redire ct("mis_cs_dp_h ome.asp?error=1 &" & urlQueryVars )
End If
If not IsDate(fromDate ) Then
formError = 1
response.redire ct("mis_cs_dp_h ome.asp?error=1 &" & urlQueryVars )
End If
if isnowt(clientID ) then
response.redire ct("mis_cs_dp_h ome.asp?error=2 &" & urlQueryVars )
end if
if isnowt(frmCompl eted) then
if not isnowt(request. QueryString("co mpl")) then
frmCompleted=re quest.QueryStri ng("compl")
else
response.redire ct("mis_cs_dp_h ome.asp?error=3 &" & urlQueryVars )
end if
end if
if isnowt(frmPrior ity) then
frmPriority=req uest.QueryStrin g("priority")
end if
Set rsLevel = Server.CreateOb ject("ADODB.Rec ordset")
rsLevel.ActiveC onnection = connSTRING
rsLevel.Source = "SELECT LEV_NAME FROM LEVELS WHERE LEV_ID=" & SQLNumber(frmCo mpleted) &" AND LEV_STATUS='v'"
rsLevel.CursorT ype = 0
rsLevel.CursorL ocation = 2
rsLevel.LockTyp e = 1
rsLevel.Open()
If not(rsLevel.BOF and rsLevel.EOF) Then
completedByDisp lay = rsLevel("LEV_NA ME")
Else
completedByDisp lay = ""
End If
rsLevel.Close()
Set rsLevel = Nothing
Set rsProfile = Server.CreateOb ject("ADODB.Rec ordset")
rsProfile.Activ eConnection = connSTRING
rsProfile.Sourc e = "SELECT JP_NAME FROM JOB_PROFILES WHERE JP_ID=" & SQLNumber(profi le) &" AND JP_STATUS='v'"
rsProfile.Curso rType = 0
rsProfile.Curso rLocation = 2
rsProfile.LockT ype = 1
rsProfile.Open( )
if not(rsProfile.e of and rsProfile.bof) then
pro = rsProfile("JP_N AME")
profileSQL = "and (JOB_PROFILES.J P_ID ="&SQLNumber(pr ofile)&")"
else
pro = "All Job Profiles"
end if
rsProfile.Close ()
Set rsProfile = Nothing
reportJoinSQL = " INNER JOIN JOB_PROFILES ON USER_DNA.UDNA_J P_ID = JOB_PROFILES.JP _ID INNER JOIN LEVELS ON JOB_PROFILES.JP _LEV_ID = LEVELS.LEV_ID "
reportSQL = reportSQL & " AND (JOB_PROFILES.J P_LEV_ID = "&SQLNumber(frm Completed)&") "
' ADD DATES TO REPORT QUERY
reportSQL = reportSQL & " AND (USER_DNA.UDNA_ STARTED>=" & SQLDate(fromDat e) & ") AND (USER_DNA.UDNA_ STARTED<=" & SQLDate(toDate) & ")"
Set rsData = Server.CreateOb ject("ADODB.Rec ordset")
rsData.ActiveCo nnection = connSTRING
rsData.Source = " SELECT DISTINCT FRAMEWORK_TYPE. FT_NAME, FRAMEWORK_TYPE. FT_ID, CLIENTS.CL_NAME "&_
" FROM USERS INNER JOIN "&_
" CLIENTS ON USERS.U_CL_ID = CLIENTS.CL_ID INNER JOIN "&_
" JOB_PROFILES ON CLIENTS.CL_ID = JOB_PROFILES.JP _CL_ID INNER JOIN "&_
" LEVEL_COMPS ON JOB_PROFILES.JP _LEV_ID = LEVEL_COMPS.LC_ LEV_ID INNER JOIN "&_
" BUSINESS_COMPS ON LEVEL_COMPS.LC_ BC_ID = BUSINESS_COMPS. BC_ID INNER JOIN "&_
" SCOPES ON BUSINESS_COMPS. BC_SC_ID = SCOPES.SC_ID INNER JOIN "&_
" DEFINITIONS ON SCOPES.SC_DEF_I D = DEFINITIONS.DEF _ID INNER JOIN "&_
" FRAMEWORK_TYPE ON DEFINITIONS.DEF _FT_ID = FRAMEWORK_TYPE. FT_ID "&_
" WHERE (USERS.U_CL_ID = "&SQLNumber(cli entID)&")"
rsData.CursorTy pe = 0
rsData.CursorLo cation = 2
rsData.LockType = 1
rsData.Open()
ft_ID = rsData("FT_ID")
Set rsResults = Server.CreateOb ject("ADODB.Rec ordset")
rsResults.Activ eConnection = connSTRING
rsResults.Sourc e = " SELECT TOP 10 AVG(USER_ANSWER S.UAN_SCORE) AS COMPSCORE, BUSINESS_COMPS. BC_ID, BUSINESS_COMPS. BC_REF, BUSINESS_COMPS. BC_NAME, CLIENT_BENCHMAR KS.CBM_SCORE "&_
" FROM USER_ANSWERS INNER JOIN USER_DNA ON USER_ANSWERS.UA N_UDNA_ID = USER_DNA.UDNA_I D INNER JOIN QUESTIONS "&_
" ON USER_ANSWERS.UA N_QU_ID = QUESTIONS.QU_ID INNER JOIN BUSINESS_COMPS ON QUESTIONS.QU_BC _ID = BUSINESS_COMPS. BC_ID "_
&"INNER JOIN CLIENT_BENCHMAR KS ON BUSINESS_COMPS. BC_ID = CLIENT_BENCHMAR KS.CBM_BC_ID " & reportJoinSQL &_
" WHERE (USER_DNA.UDNA_ WORKFLOW = 'f') AND (CLIENT_BENCHMA RKS.CBM_CL_ID = "&SQLNumber(cli entID)&") "&reportSQL &" "& profileSQL &_
" GROUP BY BUSINESS_COMPS. BC_ID, BUSINESS_COMPS. BC_REF, BUSINESS_COMPS. BC_NAME, CLIENT_BENCHMAR KS.CBM_SCORE ORDER BY COMPSCORE "&reportOrderSQ L&""
rsResults.Curso rType = 0
rsResults.Curso rLocation = 2
rsResults.LockT ype = 1
rsResults.Open( )
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><!-- InstanceBegin template="/Templates/management.dwt. asp" codeOutsideHTML IsLocked="false " -->
<head>
<!-- ~~~~~~~~~~~~~~~ ~~~~~~~ DNA Development Centre Platform ~~~~~~~~~~~~~~~ ~~~~~~~ -->
<!-- All code and content is copyright (c) DeltaNet International Ltd. -->
<!-- ~~~~~~~~~~~~~~~ ~~~~~~~~ www.delta-net.co.uk ~~~~~~~~~~~~~~~ ~~~~~~~~ -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!--#include file="../../resources/includes/mc_metadata.inc "-->
<title><%=cc_or g_name%> - <%=cc_app_name% ></title>
<link href="../../resources/styles/default_mc.css" rel="stylesheet " type="text/css">
<!-- InstanceBeginEd itable name="head" -->
<!-- InstanceEndEdit able -->
</head>
<body>
<!-- ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~
START SKIP NAV LINKS
~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~ -->
<div class="nopad red_bg"><a accesskey="s" href="#content" ><img src="../../media/images/spacer.gif" alt="Skip navigation jump to main content" width="1" height="1" border="0"></a></div>
<!-- ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~
START HEADER
~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~ -->
<div class="header_b g"><!--#include file="../../resources/includes/inc_header_mc.a sp" --></div>
<!-- ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~
START MAIN NAV
~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~ -->
<div class="breadcru mb" align="right">< !-- InstanceBeginEd itable name="loggedin" -->Logged in as: <%=ses sion("fullName" )%> |  ;<a href="../help/help.asp" class="help">He lp</a> | <a href="../authentication/logout.asp" class="help">Lo gout</a><!-- InstanceEndEdit able --></div>
<!-- ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~
START CONTENT
~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ -->
<table width="100%" border="0" cellpadding="0" summary="Main content layout table, Breadcrumb trail, side navigation and main content">
<tr>
<td class="bg_siden av_header"><img src="../media/images/spacer.gif" alt=" " width="160" height="15"></td>
<td width="100%" valign="middle" >
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="Breadc rumb navigation trail">
<tr>
<td valign="top"><i mg src="../media/images/interface/bllt_breadcrumb .gif" alt=" " width="28" height="12"></td>
<td width="100%" valign="top" class="breadcru mb"><a name="breadcrum b"></a><!-- InstanceBeginEd itable name="breadcrum b" --><a href="../home/home.asp" class="breadcru mb">Home</a> >&nb sp;<a href="../home/mis_home.asp" class="breadcru mb">MIS
reports</a> > <a href="mis_cs_ho me.asp" class="breadcru mb">Client
specific</a> > <a href="mis_cs_bs _home.asp?<%=ur lQueryVars%>" class="breadcru mb">Benchmark
standards report</a> > Summary ><!-- InstanceEndEdit able --></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="bg_greyp ale"><img src="../../media/images/spacer.gif" alt=" " width="1" height="1"></td>
</tr>
<tr>
<td valign="top" class="bg_siden av">
<a name="mainnav"> </a>
<!--#include file="../includes/inc_sidenav.asp " -->
<!-- InstanceBeginEd itable name="sidenav" -->
<!-- InstanceEndEdit able --></td>
<td valign="top" class="maincont ent"><a name="content"> </a> <!-- InstanceBeginEd itable name="mainconte nt" -->
<h1><img src="../media/images/interface/bllt_title.gif" alt=" " width="20" height="14">Cli ent specific - Benchmark standards report</h1>
<p>Benchmark standards report.</p>
<table width="100%" border="1" cellspacing="0" cellpadding="3" summary="Report basis" class="tbl_bord er1">
<tr>
<th colspan="2" nowrap class="th_head" ><div align="left">Re port basis</div></th>
</tr>
<tr valign="top">
<td nowrap class="td_row2" >Client name: </td>
<td width="100%" class="td_row2" ><%=rsData("CL_ NAME")%> </td>
</tr>
<tr valign="top">
<td nowrap class="td_row1" >Assessment period from: </td>
<td width="100%" class="td_row1" ><%=fromDateFor matted%> </td>
</tr>
<tr valign="top">
<td nowrap class="td_row2" >Assessment period to: </td>
<td class="td_row2" ><%=toDateForma tted%> </td>
</tr>
<tr valign="top">
<td nowrap class="td_row1" >Completed by Job Level: </td>
<td class="td_row1" ><%=completedBy Display%> </td>
</tr>
<tr valign="top">
<td nowrap class="td_row2" >Completed by Job Profile: </td>
<td class="td_row2" ><%=pro%> </td>
</tr>
<tr valign="top">
<td nowrap class="td_row1" >Performance:&n bsp;</td>
<td class="td_row1" ><%=priorityDis play%> </td>
</tr>
</table>
<img src="../media/images/spacer.gif" alt=" " width="1" height="20">
<table width="100%" border="1" cellspacing="0" cellpadding="3" class="tbl_bord er1">
<tr>
<th nowrap class="th_head" >BC Ref:</th>
<th width="100%" nowrap class="th_head" ><div align="left">Bu siness competency
name</div></th>
<th nowrap class="th_head" >Benchmark scores</th>
<th nowrap class="th_head" >Average scores</th>
</tr>
<%
if rsResults.EOF and rsResults.BOF then
%>
<tr>
<td colspan="4" class="td_row1" ><span class="redtext" >There are no records for this selection.</span></td>
</tr>
<%
end if
%>
<%do while not rsResults.EOF
' alternating row colour code
if iRow = 1 then
rowColor = "td_row1"
iRow = 2
elseif iRow = 2 then
rowColor = "td_row2"
iRow = 1
end if
%>
<tr valign="top">
<td class="<%=rowCo lor%>"><%=rsRes ults("BC_REF")% > </td>
<td class="<%=rowCo lor%>"><a href="mis_cs_bs _pie.asp?bcid=< %=rsResults("BC _ID")%>&<%=urlQ ueryVars%>"><%= rsResults("BC_N AME")%></a> </td>
<td class="<%=rowCo lor%>"><%=rsRes ults("CBM_SCORE ")%>% </td>
<td class="<%=rowCo lor%>"><%=rsRes ults("COMPSCORE ")%>% </td>
</tr>
<%
' assign vars for flash movie
If n= 1 then
option1 = rsResults("BC_N AME") & "[,]" & rsResults("CBM_ SCORE") & "[,]" & rsResults("COMP SCORE")
ElseIf n = 2 Then
option2 = rsResults("BC_N AME") & "[,]" & rsResults("CBM_ SCORE") & "[,]" & rsResults("COMP SCORE")
ElseIf n = 3 Then
option3 = rsResults("BC_N AME") & "[,]" & rsResults("CBM_ SCORE") & "[,]" & rsResults("COMP SCORE")
ElseIf n = 4 Then
option4 = rsResults("BC_N AME") & "[,]" & rsResults("CBM_ SCORE") & "[,]" & rsResults("COMP SCORE")
ElseIf n = 5 Then
option5 = rsResults("BC_N AME") & "[,]" & rsResults("CBM_ SCORE") & "[,]" & rsResults("COMP SCORE")
ElseIf n = 6 Then
option6 = rsResults("BC_N AME") & "[,]" & rsResults("CBM_ SCORE") & "[,]" & rsResults("COMP SCORE")
ElseIf n = 7 Then
option7 = rsResults("BC_N AME") & "[,]" & rsResults("CBM_ SCORE") & "[,]" & rsResults("COMP SCORE")
ElseIf n = 8 Then
option8 = rsResults("BC_N AME") & "[,]" & rsResults("CBM_ SCORE") & "[,]" & rsResults("COMP SCORE")
ElseIf n = 9 Then
option9 = rsResults("BC_N AME") & "[,]" & rsResults("CBM_ SCORE") & "[,]" & rsResults("COMP SCORE")
ElseIf n = 10 Then
option10 = rsResults("BC_N AME") & "[,]" & rsResults("CBM_ SCORE") & "[,]" & rsResults("COMP SCORE")
End If
n = n + 1
rsResults.MoveN ext
loop
%>
</table>
<img src="../media/images/spacer.gif" alt=" " width="1" height="20">
<%
if not rsResults.EOF and rsResults.BOF then
else
n = 1
rsResults.MoveF irst
%>
<table border="0">
<tr>
<td><img src="../../media/spacer.gif" alt=" " width="1" height="25">
<div id="flashconten t">
<strong>You may need to upgrade your Flash Player</strong><br>
<a target="_blank" href="http://www.adobe.com/">Download the latest flash player here</a>
</div>
</td>
<td width="75%">
<table border="0" class="tbl_bord er1">
<tr>
<th nowrap class="th_head" >Key</th>
<th nowrap class="th_head" ><div align="left">&n bsp;   ; Busine ss competency name</div></th>
</tr>
<%
do while not rsResults.EOF
%>
<tr>
<td width="20" bgcolor="#00000 0"><img src="../../media/spacer.gif" alt=" " width="1" height="1"><div align="center" class="whitetex t"><%=n%></div><img src="../../media/spacer.gif" alt=" " width="1" height="1"></td>
<td>   ; <%=rsRes ults("BC_NAME") %></td>
</tr>
<%
n = n + 1
rsResults.MoveN ext
loop
if chart = "1" then
javaChart = "multiple_bar_c hart.swf"
else
javaChart = "multiple_spide r_chart.swf"
end if
%>
<script type="javascrip t">
// <![CDATA[
var so = new SWFObject("../../media/flash/<%=javaChart%>" , "movie", "600", "600", "6", "#FFFFFF");
so.addVariable( "screenMode ", 2);
so.addVariable( "noTick", <%=n%>);
so.addVariable( "option1", "<%=replaceCRLF (option1)%>");
so.addVariable( "option2", "<%=replaceCRLF (option2)%>");
so.addVariable( "option3", "<%=replaceCRLF (option3)%>");
so.addVariable( "option4", "<%=replaceCRLF (option4)%>");
so.addVariable( "option5", "<%=replaceCRLF (option5)%>");
so.addVariable( "option6", "<%=replaceCRLF (option6)%>");
so.addVariable( "option7", "<%=replaceCRLF (option7)%>");
so.addVariable( "option8", "<%=replaceCRLF (option8)%>");
so.addVariable( "option9", "<%=replaceCRLF (option9)%>");
so.addVariable( "option10", "<%=replaceCRLF (option10)%>");
so.write("flash content");
// ]]>//
</script>
</table>
</td>
</tr>
</table>
<%
end if
%>
<!-- InstanceEndEdit able --></td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" summary="Footer content layout table">
<tr>
<td colspan="2" class="bg_white "><img src="../media/images/spacer.gif" alt=" " width="1" height="1"></td>
</tr>
<tr>
<td colspan="2" class="bg_greyp ale"><img src="../media/images/spacer.gif" alt=" " width="1" height="1"></td>
</tr>
<tr>
<td class="footer"> <%=cc_version%> </td>
<td class="footer"> <div align="right">& copy; DeltaNet International Ltd</div>
</td>
</tr>
<tr>
<td colspan="2" class="bg_greyp ale"><img src="../media/images/spacer.gif" alt=" " width="1" height="1"></td>
</tr>
</table>
<p> </p>
</body>
<!-- InstanceEnd --></html>