Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

document.write

Status
Not open for further replies.

jamesmay

Technical User
Jun 1, 2004
41
GB
Thought i best post a new vesion of my last request but with my entire code. it might be a bit better to understand.

i am trying to disply certain information if a button is selected or not. hope this makes sence...


<%@ LANGUAGE="VBSCRIPT" %>
<!--#include file="../connections/SS0302.asp" -->
<!--#include file="../connections/global.asp" -->
<%
if request.querystring("WeekNumber") = "" then
Session("WeekNumber") = Session("Week_Number")
Session("WeekDay") = "Last3Months"
else
Session("Week_Number") = request.querystring("WeekNumber")
Session("WeekDay") = "Week"
end if

if request.querystring("Year") = "" then
Session("YearStart") = Session("Year_Start")
else
Session("Year_Start") = DateValue("01/01/" & request.querystring("Year"))
end if

YearStart = Session("Year_Start")

if Session("Week_Number") = "" then
Week_Number = session("WeekNumberVal")
else
Week_Number = Session("Week_Number")
end if

if request.querystring("DefectCount") = "" then
DefectCount = 0
else
DefectCount = request.querystring("DefectCount")
end if


if Session("WeekDay") = "Week" then
WeekStart = (YearStart - DatePart("w", YearStart)) + 1 'Sunday
WeekEnd = (YearStart - DatePart("w", YearStart)) + 7 ' Saturday
Title_Date = "For Week - " + Cstr(Week_Number)
end if

WeekStart_Var = FormatDateTime(WeekStart + (7 * (Week_Number - 1)) ,vbShortDate)
WeekEnd_Var = FormatDateTime(WeekEnd + (7 * (Week_Number - 1)) ,vbShortDate)

Week_Start_dd_var = Cstr(Day(WeekStart_Var))
Week_Start_mm_var = Cstr(Month(WeekStart_Var))
Week_Start_yyyy_var = Cstr(Year(WeekStart_Var))
Week_End_dd_var = Cstr(Day(WeekEnd_Var))
Week_End_mm_var = Cstr(Month(WeekEnd_Var))
Week_End_yyyy_var = Cstr(Year(WeekEnd_Var))

if Week_Start_dd_var < 10 then Week_Start_dd_var = "0" + Week_Start_dd_var
if Week_Start_mm_var < 10 then Week_Start_mm_var = "0" + Week_Start_mm_var
if Week_End_dd_var < 10 then Week_End_dd_var = "0" + Week_End_dd_var
if Week_End_mm_var < 10 then Week_End_mm_var = "0" + Week_End_mm_var


Var_Week_Start_Date = Week_Start_yyyy_var + "-" + Week_Start_mm_var + "-" + Week_Start_dd_var + " " + "00:00:00"
Var_Week_End_Date = Week_End_yyyy_var + "-" + Week_End_mm_var + "-" + Week_End_dd_var + " " + "23:59:59"

Title_Week_Start_Date = " (" + Week_Start_dd_var + "/" + Week_Start_mm_var + "/" + Week_Start_yyyy_var
Title_Week_End_Date = " - " + Week_End_dd_var + "/" + Week_End_mm_var + "/" + Week_End_yyyy_var + ")"

Week_Start_Date = Var_Week_Start_Date ' For use in SQL Query
Week_End_Date = Var_Week_End_Date ' For use in SQL Query

Pareto_Start_Date = Week_Start_Date
Pareto_End_Date = Week_End_Date

StartDate = Pareto_Start_Date
EndDate = Pareto_End_Date
TrendType = "Week"

if Session("WeekDay") = "Last3Months" then
StartDate = Last3Months_Start_Date
EndDate = Last3Months_End_Date
Title_Date = Last3Months_DateRange
Title_Week_Start_Date = ""
Title_Week_End_Date = ""
TrendType = "Year"
end if

session("Visual_Start_Date") = StartDate
session("Visual_End_Date") = EndDate
session("Visual_Title_Date") = Title_Date + Title_Week_Start_Date + Title_Week_End_Date
'response.write session("Visual_Start_Date") & " - " & session("Visual_End_Date")
'response.write StartDate & " - " & EndDate

dim ReportLevels
dim StationName

dim SampleSize
dim DefectiveUnits
dim Defects
dim RFT_Percent
dim Non_RFT_Percent
dim RFT
dim Non_RFT

dim Period, Headerfilters, CheckFilters, HeaderLevels, CheckLevels

HeaderFilters = session("HeaderFilters")
CheckFilters = session("CheckFilters")
HeaderLevels = session("HeaderLevels")
CheckLevels = session("CheckLevels") & ",D1,D2"
TopxValue = session("TopxValue")

if CheckFilters = "" then
CheckFilters = "C1 <> NULL"
else
CheckFilters = CheckFilters & " AND C1 <> NULL"
end if

set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_FLAGS_STRING
Recordset1.CursorType = 0
Recordset1.CursorLocation = 3
Recordset1.LockType = 3
Recordset1.Source = "exec sp_pareto '" & StartDate & "','" & EndDate & "','" & HeaderLevels & "','" & CheckLevels & "','" & HeaderFilters & "','" & CheckFilters & "'," & TopxValue
Recordset1.Open()

dim sPrintDefectQty, sPrintPart
dim i
redim x(Cint(TopxValue)-1)
redim y(Cint(TopxValue)-1)
redim z(Cint(TopxValue)-1)

i = 0
DefectTotal = 0
while not Recordset1.EOF
if not isnull(recordset1("C2")) then
x(i) = Recordset1("Defects")

if Isnull(Recordset1("C1")) then
DefectTotal = DefectTotal
sPrintDefectQty = sPrintDefectQty & ","
else
DefectTotal = DefectTotal + x(i)
sPrintDefectQty = sPrintDefectQty & x(i) & ","
end if


if Isnull(Recordset1("D2")) then
sPrintPart = sPrintPart & "No Visual Report,"

OldCheck1 = Recordset1("C1")
NewCheck1 = ""'replace(OldCheck1,"&","xxANDxx")

OldCheck2 = Recordset1("C2")
NewCheck2 = ""'replace(OldCheck2,"/","xxSLASHxx")

OldCheck3 = Recordset1("C3")
NewCheck3 = ""'replace(OldCheck3,"/","xxSLASHxx")

y(i) = ""
z(i) = "DefectTrend.asp?MainPart=" & NewCheck1 & "&Part=" & NewCheck2 & "&Defect=" & NewCheck3
else

OldCheck1 = Recordset1("C1")
NewCheck1 = replace(OldCheck1,"&","xxANDxx")

OldCheck2 = Recordset1("C2")
NewCheck2 = replace(OldCheck2,"/","xxSLASHxx")

OldCheck3 = Recordset1("C3")
NewCheck3 = replace(OldCheck3,"/","xxSLASHxx")

sPrintPart = sPrintPart & "Visual Report for " & Recordset1("C2") & ","
y(i) = "paretovisual.asp?MainPart=" & NewCheck1 & "&Part=" & NewCheck2& "&Defect=" & NewCheck3 & "&DrawingName=" & Recordset1("D2")
z(i) = "defecttrend.asp?MainPart=" & NewCheck1 & "&Part=" & NewCheck2 & "&Defect=" & NewCheck3
end if
i=i+1
end if
Recordset1.MoveNext

wend

if sPrintDefectQty <> "" then sPrintDefectQty = Left(sPrintDefectQty, Len(sPrintDefectQty) - 1)
if sPrintPart <> "" then sPrintPart = Left(sPrintPart, Len(sPrintPart) - 1)
if sPrintPart2 <> "" then sPrintPart2 = Left(sPrintPart2, Len(sPrintPart2) - 1)

if i > 0 then Recordset1.MoveFirst

function PrintDefectQty
Response.Write sPrintDefectQty
end function

function PrintPart
Response.Write sPrintPart
end function
%>
<%'response.write Recordset1.Source%>
<html>
<head>
<title>Pareto</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="../css/web.css" type="text/css">
<script language="JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
</script>
</head>

<body bgcolor="#FFFFFF" text="#000000" onload="refreshbottom()">
<script language="JavaScript">
function refreshbottom() {
parent.frames['bottom'].location.href='bottom.asp'
}
</script>
<table width="100%" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td width="50%">
<table width="100%" border="1" cellspacing="0" cellpadding="0" height="100%" bordercolor="#C0C0C0">
<tr>
<td><applet code=com.objectplanet.chart.BarChartApplet
archive=chartserver.jar width=100% height=100% codebase="../charts" name="Pareto">
<param name="sampleCount" value="10">
<param name=chartTitle value="<%=Title_Date%> <%=Title_Week_Start_Date%> <%=Title_Week_End_Date%>, Total Top <%=TopxValue%> Defects = <%=DefectTotal%>">
<param name="singleClickURLOn" value="true">
<param name=sampleValues value="<%call PrintDefectQty%>">
<param name=sampleLabels value="<%call PrintPart%>">
<param name="barLabels" value="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20">
<param name=barLabelsOn value=true>
<param name=valueLabelsOn value="true">
<param name=Background value="#F7F3F7">
<param name=barLabelStyle value="below_and_floating">
<param name=multiColorOn value=true>
<param name="valueLinesOn" value="true">
<param name=3DModeOn value="false">
<param name=3DDepth value="3">
<param name=barWidth value="0.7">
<param name=rangeAxisLabel value="Defects">
<param name=rangeAxisLabelAngle value="270">
<param name=sampleAxisLabel value="Id">
<param name="urltarget" value="_top">
<param name="url_0" value="<%=y(0)%>">
<param name="url_1" value="<%=y(1)%>">
<param name="url_2" value="<%=y(2)%>">
<param name="url_3" value="<%=y(3)%>">
<param name="url_4" value="<%=y(4)%>">
<param name="url_5" value="<%=y(5)%>">
<param name="url_6" value="<%=y(6)%>">
<param name="url_7" value="<%=y(7)%>">
<param name="url_8" value="<%=y(8)%>">
<param name="url_9" value="<%=y(9)%>">
<param name="printAsBitmap" value="true">
</applet></td>
</tr>
</table>
</td>
<td width="3%">
<div align="center">
<form name="form1" method="post" action="">
<div align="center">
<input type="hidden" name="hiddenField" value="null">
<input type="button" name="HideMenu" value="&lt;" onClick="resize()">
</div>
<script language="JavaScript">
function resize() {
if (document.getElementById('hiddenField').style.visibility != "hidden") {
window.parent.xyz.rows="52,0,200,200";
document.getElementById('hiddenField').style.visibility = "hidden";
document.getElementById('HideMenu').value = ">";
}

else {
window.parent.xyz.rows="52,200,200,0";
document.getElementById('hiddenField').style.visibility = "visible";
document.getElementById('HideMenu').value = "<";
parent.frames['bottom'].location.href='bottom.asp';
}
}
</script>
</form>
</div>
</td>
<td width="47%" valign="top">
<table width="100%" border="1" cellspacing="0" cellpadding="0" bordercolor="#C0C0C0" height="100%">
<tr>
<td valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="15%">
<tr bgcolor="#F7F3F7">
<td width="5%">
<div align="center"><b><font size="-1">Id</font></b></div>
</td>
<td width="40%"><b><font size="-1">Part</font></b></td>
<td width="45%"><b><font size="-1">Defect</font></b></td>
<td width="10%">
<div align="center"><b><font size="-1">Qty</font></b></div>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="10%">
<%
dim j
j = 1
while not Recordset1.EOF
if not Isnull(Recordset1("C2")) then
%>
<tr>
<td width="5%" height="20">
<div align="center"><font size="-1"><%=j%></font></div>
</td>
<td width="40%" height="20"><font size="-1"><%=Left((Recordset1.Fields.Item("C2").Value),20)%></font></td>
<script language="JavaScript">
if (document.getElementById('hiddenField').style.visibility != "hidden") {
document.write('<td width="45%" height="20"><font size="-1"><a href="<%=z(j-1)%>" id = "<%=j%>" target="bottom" title="Defect Trend Report for <%=(Recordset1.Fields.Item("C3").Value)%>"><%=(Recordset1.Fields.Item("C3").Value)%></a></font></td>');
}
else {
document.write('<td width="45%" height="20"><font size="-1"><%=(Recordset1.Fields.Item("C3").Value)%></font></td>');
}
</script>
<td width="10%" height="20">
<div align="center"><font size="-1" color="#990000"><%=(Recordset1.Fields.Item("Defects").Value)%></font></div>
</td>
</tr>

<%
j = j + 1
end if

Recordset1.MoveNext()


wend
%>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>



kindest thanks,

james m
</html>
 
not if u give us the ASP code also, run the ASP file, do a view source and paste the HTML output...

Known is handfull, Unknown is worldfull
 
Cheers for replying, this is the source....
<html>
<head>
<title>Pareto</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="../css/web.css" type="text/css">
<script language="JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
</script>
</head>

<body bgcolor="#FFFFFF" text="#000000" onload="refreshbottom()">
<script language="JavaScript">
function refreshbottom() {
parent.frames['bottom'].location.href='bottom.asp'
}
</script>
<table width="100%" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td width="50%">
<table width="100%" border="1" cellspacing="0" cellpadding="0" height="100%" bordercolor="#C0C0C0">
<tr>
<td><applet code=com.objectplanet.chart.BarChartApplet
archive=chartserver.jar width=100% height=100% codebase="../charts" name="Pareto">
<param name="sampleCount" value="10">
<param name=chartTitle value="01/04/2004 - 31/07/2004, Total Top 10 Defects = 38">
<param name="singleClickURLOn" value="true">
<param name=sampleValues value="7,4,4,4,4,3,3,3,3,3">
<param name=sampleLabels value="Visual Report for LHF Checkstrap,Visual Report for LHR Door Harness,Visual Report for RHF Inner Release Cable,Visual Report for RHF Regulator Assy,Visual Report for RHR Door Harness,Visual Report for Main Engine Harness,Visual Report for Vacuum pump,Visual Report for LH Side Repeater,Visual Report for RH Side Repeater,Visual Report for LHF Inner Release Cable">
<param name="barLabels" value="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20">
<param name=barLabelsOn value=true>
<param name=valueLabelsOn value="true">
<param name=Background value="#F7F3F7">
<param name=barLabelStyle value="below_and_floating">
<param name=multiColorOn value=true>
<param name="valueLinesOn" value="true">
<param name=3DModeOn value="false">
<param name=3DDepth value="3">
<param name=barWidth value="0.7">
<param name=rangeAxisLabel value="Defects">
<param name=rangeAxisLabelAngle value="270">
<param name=sampleAxisLabel value="Id">
<param name="urltarget" value="_top">
<param name="url_0" value="paretovisual.asp?MainPart=LHF Door Int Un-trim&Part=LHF Checkstrap&Defect=Not Fitted&DrawingName=36DRLHF.bmp">
<param name="url_1" value="paretovisual.asp?MainPart=LHR Door Int Un-trim&Part=LHR Door Harness&Defect=Not Fitted&DrawingName=36DRLHR.bmp">
<param name="url_2" value="paretovisual.asp?MainPart=RHF Door Int Un-trim&Part=RHF Inner Release Cable&Defect=Not Fitted&DrawingName=36DRRHF.bmp">
<param name="url_3" value="paretovisual.asp?MainPart=RHF Door Int Un-trim&Part=RHF Regulator Assy&Defect=Not Fitted&DrawingName=36DRRHF.bmp">
<param name="url_4" value="paretovisual.asp?MainPart=RHR Door Int Un-trim&Part=RHR Door Harness&Defect=Not Fitted&DrawingName=36DRRHR.bmp">
<param name="url_5" value="paretovisual.asp?MainPart=Engine Bay&Part=Main Engine Harness&Defect=Poor Fit&DrawingName=11EN.bmp">
<param name="url_6" value="paretovisual.asp?MainPart=Engine Bay&Part=Vacuum pump&Defect=Poor Fit&DrawingName=11EN.bmp">
<param name="url_7" value="paretovisual.asp?MainPart=External Lights&Part=LH Side Repeater&Defect=Not Fitted&DrawingName=12LIEX.bmp">
<param name="url_8" value="paretovisual.asp?MainPart=External Lights&Part=RH Side Repeater&Defect=Not Fitted&DrawingName=12LIEX.bmp">
<param name="url_9" value="paretovisual.asp?MainPart=LHF Door Int Un-trim&Part=LHF Inner Release Cable&Defect=Not Fitted&DrawingName=36DRLHF.bmp">
<param name="printAsBitmap" value="true">
</applet></td>
</tr>
</table>
</td>
<td width="3%">
<div align="center">
<form name="form1" method="post" action="">
<div align="center">
<input type="hidden" name="hiddenField" value="null">
<input type="button" name="HideMenu" value="&lt;" onClick="resize()">
</div>
<script language="JavaScript">
function resize() {
if (document.getElementById('hiddenField').style.visibility != "hidden") {
window.parent.xyz.rows="52,0,200,200";
document.getElementById('hiddenField').style.visibility = "hidden";
document.getElementById('HideMenu').value = ">";
}

else {
window.parent.xyz.rows="52,200,200,0";
document.getElementById('hiddenField').style.visibility = "visible";
document.getElementById('HideMenu').value = "<";
parent.frames['bottom'].location.href='bottom.asp';
}
}
</script>
</form>
</div>
</td>
<td width="47%" valign="top">
<table width="100%" border="1" cellspacing="0" cellpadding="0" bordercolor="#C0C0C0" height="100%">
<tr>
<td valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="15%">
<tr bgcolor="#F7F3F7">
<td width="5%">
<div align="center"><b><font size="-1">Id</font></b></div>
</td>
<td width="40%"><b><font size="-1">Part</font></b></td>
<td width="45%"><b><font size="-1">Defect</font></b></td>
<td width="10%">
<div align="center"><b><font size="-1">Qty</font></b></div>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="10%">

<tr>
<td width="5%" height="20">
<div align="center"><font size="-1">1</font></div>
</td>
<td width="40%" height="20"><font size="-1">LHF Checkstrap</font></td>
<script language="JavaScript">
if (document.getElementById('hiddenField').style.visibility != "hidden") {
document.write('<td width="45%" height="20"><font size="-1"><a href="defecttrend.asp?MainPart=LHF Door Int Un-trim&Part=LHF Checkstrap&Defect=Not Fitted" id = "1" target="bottom" title="Defect Trend Report for Not Fitted">Not Fitted</a></font></td>');
}
else {
document.write('<td width="45%" height="20"><font size="-1">Not Fitted</font></td>');
}
</script>
<td width="10%" height="20">
<div align="center"><font size="-1" color="#990000">7</font></div>
</td>
</tr>


<tr>
<td width="5%" height="20">
<div align="center"><font size="-1">2</font></div>
</td>
<td width="40%" height="20"><font size="-1">LHR Door Harness</font></td>
<script language="JavaScript">
if (document.getElementById('hiddenField').style.visibility != "hidden") {
document.write('<td width="45%" height="20"><font size="-1"><a href="defecttrend.asp?MainPart=LHR Door Int Un-trim&Part=LHR Door Harness&Defect=Not Fitted" id = "2" target="bottom" title="Defect Trend Report for Not Fitted">Not Fitted</a></font></td>');
}
else {
document.write('<td width="45%" height="20"><font size="-1">Not Fitted</font></td>');
}
</script>
<td width="10%" height="20">
<div align="center"><font size="-1" color="#990000">4</font></div>
</td>
</tr>


<tr>
<td width="5%" height="20">
<div align="center"><font size="-1">3</font></div>
</td>
<td width="40%" height="20"><font size="-1">RHF Inner Release Ca</font></td>
<script language="JavaScript">
if (document.getElementById('hiddenField').style.visibility != "hidden") {
document.write('<td width="45%" height="20"><font size="-1"><a href="defecttrend.asp?MainPart=RHF Door Int Un-trim&Part=RHF Inner Release Cable&Defect=Not Fitted" id = "3" target="bottom" title="Defect Trend Report for Not Fitted">Not Fitted</a></font></td>');
}
else {
document.write('<td width="45%" height="20"><font size="-1">Not Fitted</font></td>');
}
</script>
<td width="10%" height="20">
<div align="center"><font size="-1" color="#990000">4</font></div>
</td>
</tr>


<tr>
<td width="5%" height="20">
<div align="center"><font size="-1">4</font></div>
</td>
<td width="40%" height="20"><font size="-1">RHF Regulator Assy</font></td>
<script language="JavaScript">
if (document.getElementById('hiddenField').style.visibility != "hidden") {
document.write('<td width="45%" height="20"><font size="-1"><a href="defecttrend.asp?MainPart=RHF Door Int Un-trim&Part=RHF Regulator Assy&Defect=Not Fitted" id = "4" target="bottom" title="Defect Trend Report for Not Fitted">Not Fitted</a></font></td>');
}
else {
document.write('<td width="45%" height="20"><font size="-1">Not Fitted</font></td>');
}
</script>
<td width="10%" height="20">
<div align="center"><font size="-1" color="#990000">4</font></div>
</td>
</tr>


<tr>
<td width="5%" height="20">
<div align="center"><font size="-1">5</font></div>
</td>
<td width="40%" height="20"><font size="-1">RHR Door Harness</font></td>
<script language="JavaScript">
if (document.getElementById('hiddenField').style.visibility != "hidden") {
document.write('<td width="45%" height="20"><font size="-1"><a href="defecttrend.asp?MainPart=RHR Door Int Un-trim&Part=RHR Door Harness&Defect=Not Fitted" id = "5" target="bottom" title="Defect Trend Report for Not Fitted">Not Fitted</a></font></td>');
}
else {
document.write('<td width="45%" height="20"><font size="-1">Not Fitted</font></td>');
}
</script>
<td width="10%" height="20">
<div align="center"><font size="-1" color="#990000">4</font></div>
</td>
</tr>


<tr>
<td width="5%" height="20">
<div align="center"><font size="-1">6</font></div>
</td>
<td width="40%" height="20"><font size="-1">Main Engine Harness</font></td>
<script language="JavaScript">
if (document.getElementById('hiddenField').style.visibility != "hidden") {
document.write('<td width="45%" height="20"><font size="-1"><a href="defecttrend.asp?MainPart=Engine Bay&Part=Main Engine Harness&Defect=Poor Fit" id = "6" target="bottom" title="Defect Trend Report for Poor Fit">Poor Fit</a></font></td>');
}
else {
document.write('<td width="45%" height="20"><font size="-1">Poor Fit</font></td>');
}
</script>
<td width="10%" height="20">
<div align="center"><font size="-1" color="#990000">3</font></div>
</td>
</tr>


<tr>
<td width="5%" height="20">
<div align="center"><font size="-1">7</font></div>
</td>
<td width="40%" height="20"><font size="-1">Vacuum pump</font></td>
<script language="JavaScript">
if (document.getElementById('hiddenField').style.visibility != "hidden") {
document.write('<td width="45%" height="20"><font size="-1"><a href="defecttrend.asp?MainPart=Engine Bay&Part=Vacuum pump&Defect=Poor Fit" id = "7" target="bottom" title="Defect Trend Report for Poor Fit">Poor Fit</a></font></td>');
}
else {
document.write('<td width="45%" height="20"><font size="-1">Poor Fit</font></td>');
}
</script>
<td width="10%" height="20">
<div align="center"><font size="-1" color="#990000">3</font></div>
</td>
</tr>


<tr>
<td width="5%" height="20">
<div align="center"><font size="-1">8</font></div>
</td>
<td width="40%" height="20"><font size="-1">LH Side Repeater</font></td>
<script language="JavaScript">
if (document.getElementById('hiddenField').style.visibility != "hidden") {
document.write('<td width="45%" height="20"><font size="-1"><a href="defecttrend.asp?MainPart=External Lights&Part=LH Side Repeater&Defect=Not Fitted" id = "8" target="bottom" title="Defect Trend Report for Not Fitted">Not Fitted</a></font></td>');
}
else {
document.write('<td width="45%" height="20"><font size="-1">Not Fitted</font></td>');
}
</script>
<td width="10%" height="20">
<div align="center"><font size="-1" color="#990000">3</font></div>
</td>
</tr>


<tr>
<td width="5%" height="20">
<div align="center"><font size="-1">9</font></div>
</td>
<td width="40%" height="20"><font size="-1">RH Side Repeater</font></td>
<script language="JavaScript">
if (document.getElementById('hiddenField').style.visibility != "hidden") {
document.write('<td width="45%" height="20"><font size="-1"><a href="defecttrend.asp?MainPart=External Lights&Part=RH Side Repeater&Defect=Not Fitted" id = "9" target="bottom" title="Defect Trend Report for Not Fitted">Not Fitted</a></font></td>');
}
else {
document.write('<td width="45%" height="20"><font size="-1">Not Fitted</font></td>');
}
</script>
<td width="10%" height="20">
<div align="center"><font size="-1" color="#990000">3</font></div>
</td>
</tr>


<tr>
<td width="5%" height="20">
<div align="center"><font size="-1">10</font></div>
</td>
<td width="40%" height="20"><font size="-1">LHF Inner Release Ca</font></td>
<script language="JavaScript">
if (document.getElementById('hiddenField').style.visibility != "hidden") {
document.write('<td width="45%" height="20"><font size="-1"><a href="defecttrend.asp?MainPart=LHF Door Int Un-trim&Part=LHF Inner Release Cable&Defect=Not Fitted" id = "10" target="bottom" title="Defect Trend Report for Not Fitted">Not Fitted</a></font></td>');
}
else {
document.write('<td width="45%" height="20"><font size="-1">Not Fitted</font></td>');
}
</script>
<td width="10%" height="20">
<div align="center"><font size="-1" color="#990000">3</font></div>
</td>
</tr>


</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>


Kindest thanks,

JM
 
I have tried using layers as this seems to be the only way. it works fine appart from doubling up on each line here is the code...

<td width="45%" height="20">
<div id="A<%=j%>" style="z-index:1; visibility: hidden"><font size="-1"><a href="<%=z(j-1)%>" target="bottom" title="Defect Trend Report for <%=(Recordset1.Fields.Item("C3").Value)%>"><%=(Recordset1.Fields.Item("C3").Value)%></a></font></div>
<div id="B<%=j%>" style="z-index:2"><font size="-1">
<%=(Recordset1.Fields.Item("C3").Value)%>
</font></div>
</td>

When one layer is visable the second is not but the second layer still takes up the same space so you get a line break in the viewed web page.

Can anyone help?
kindest thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top