Hi Guys,
I have been looking at this code for ages and cant see the problem. The Box on the page returns the results from a database query, i have tested the Query and it is fine. It creates 26 rows in the select box, but they are blank. I have checked the CSS and that isnt the problem. When i highlight the rows the text does not appear (as it would if it was white text).
Can anyone spot the problem, i would be very greatful of any help
Cheers Si,
here's the code, PS i have removed email/web addresses and replaced them with "???":
<%
const strTableAnd = "tblCandANDSkill_IT"
const strTableExc = "tblCandExcludeSkill_IT"
Dim gstrConnStr
Dim cn
Dim rs
dim lngCandID
dim strSQL
Sub DBConnect
gstrConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Inetpub\Set cn = Server.CreateObject("ADODB.Connection"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
cn.Open gstrConnStr
End Sub
Sub DBDisconnect
Set rs = Nothing
cn.Close
Set cn = Nothing
End Sub
dbconnect()
set rs = cn.Execute("SELECT MAX(CandID) FROM " & Request.QueryString("tb"
& " WHERE [First Name] = '" & Request.QueryString("fn"
& "' AND [Last Name] = '" & Request.QueryString("sn"
& "'"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
lngCandID = rs.fields(0).value
strSQL = "SELECT Distinct(skills.skill) AS Skill FROM " & strTableAnd & " inner join skills on " & strTableAnd & ".skillID = skills.skillID WHERE " & strTableAnd & ".CandID = " & lngCandID & " ORDER BY skill"
set rs = cn.execute(strsql)
'response.write strsql
do while rs.eof = false
optionStr = optionStr & "<option value='" & rs("Skill"
.value & "'>"
rs.movenext
loop
dbdisconnect()
%>
<html>
<head>
<title></title>
</head>
<link rel="stylesheet" href=" type="text/css">
<body>
<table border="0" cellspacing="0" cellpadding="5" align="center" width="514" style="BORDER-RIGHT: #000052 1px solid; BORDER-TOP: #000052 1px solid; BORDER-LEFT: #000052 1px solid; WIDTH: 514px; BORDER-BOTTOM: #000052 1px solid; BACKGROUND-REPEAT: no-repeat; HEIGHT: 402px; BACKGROUND-COLOR: #ffffff">
<tr>
<td>
<P align=center><span class="title"><FONT style="FONT-WEIGHT: normal"
size=2><STRONG>Upload CV</STRONG> | Update Skills | <STRONG>Personal
Details</STRONG></FONT> </span></P>
<P><SPAN class=title>IT Recruitment - Update Skills</SPAN><br >
Please type your details in the form below. You can upload your CV as a file (Word
document preferred) or you can paste details into the text box provided (Those fields
marked with a * are mandatory). If you have already registered with us and wish to give us
an update or you are unsure, there is no need to complete this form you can forward your
CV via email to <A href="mailto
aul@????.com">Paul ????</A><br
></P>
<P align=center>
<FORM name=myForm>
<TABLE cellPadding=3 width=385 border=0>
<TR>
<TD align=left width=607 colSpan=3>
<DIV align=left>
<P>Your skills have been extracted from your CV and are listed
below. Please exclude any skills that you do not wish to be
included in our vacancy searches: </P></DIV></TD></TR>
<TR>
<TD align=middle width=145>
<P align=center><STRONG>Skills</STRONG></P></TD>
<TD align=middle width=149>
<P align=center> </P></TD>
<TD align=middle width=313>
<P align=center><STRONG>Excluded Skills</STRONG></P></TD></TR>
<TR>
<TD width=145>
<P align=center><SELECT id=clients1
style="WIDTH: 160px; COLOR: black; HEIGHT: 266px"
multiple size=5
name=clients1><%=optionStr%></SELECT> </P></TD>
<TD width=250>
<CENTER><INPUT onclick="moveIt('del',document.myForm.clients2.selectedIndex)" type=button value="Include" style="WIDTH: 61px; HEIGHT: 22px" size=51><INPUT onclick="moveIt('add',document.myForm.clients1.selectedIndex)" type=button value="Exclude" style="WIDTH: 61px; HEIGHT: 22px" size=52>
</CENTER></TD>
<TD align=middle width=313>
<P align=center><SELECT id=clients2
style="WIDTH: 160px; COLOR: black; HEIGHT: 264px"
multiple size=5
name=clients2></SELECT> </P></TD></TR>
<TR align=middle>
<TD width=145>
<P align=left><INPUT type=submit value=Submit name=Submit></P></TD>
<TD width=250>
<P align=right> </P></TD>
<TD width=313>
<P align=right> </P></TD></TR></TABLE>
<SCRIPT language=JavaScript>
function moveIt(action, thisOption){
if (thisOption == -1){
return false;
}
if (action == 'add'){
c2 = document.getElementById("clients2"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
c2.options[c2.options.length] = new Option (document.myForm.clients1[thisOption].text, document.myForm.clients1[thisOption].value)
c1 = document.getElementById("clients1"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
c1.options[thisOption] = null
}
if (action == 'del'){
c1 = document.getElementById("clients1"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
c1.options[c1.options.length] = new Option (document.myForm.clients2[thisOption].text, document.myForm.clients2[thisOption].value)
c2 = document.getElementById("clients2"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
c2.options[thisOption] = null
}
}
</SCRIPT>
</FORM></P>
</td>
</tr>
</table>
</body>
</html>
I have been looking at this code for ages and cant see the problem. The Box on the page returns the results from a database query, i have tested the Query and it is fine. It creates 26 rows in the select box, but they are blank. I have checked the CSS and that isnt the problem. When i highlight the rows the text does not appear (as it would if it was white text).
Can anyone spot the problem, i would be very greatful of any help
Cheers Si,
here's the code, PS i have removed email/web addresses and replaced them with "???":
<%
const strTableAnd = "tblCandANDSkill_IT"
const strTableExc = "tblCandExcludeSkill_IT"
Dim gstrConnStr
Dim cn
Dim rs
dim lngCandID
dim strSQL
Sub DBConnect
gstrConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Inetpub\Set cn = Server.CreateObject("ADODB.Connection"
cn.Open gstrConnStr
End Sub
Sub DBDisconnect
Set rs = Nothing
cn.Close
Set cn = Nothing
End Sub
dbconnect()
set rs = cn.Execute("SELECT MAX(CandID) FROM " & Request.QueryString("tb"
lngCandID = rs.fields(0).value
strSQL = "SELECT Distinct(skills.skill) AS Skill FROM " & strTableAnd & " inner join skills on " & strTableAnd & ".skillID = skills.skillID WHERE " & strTableAnd & ".CandID = " & lngCandID & " ORDER BY skill"
set rs = cn.execute(strsql)
'response.write strsql
do while rs.eof = false
optionStr = optionStr & "<option value='" & rs("Skill"
rs.movenext
loop
dbdisconnect()
%>
<html>
<head>
<title></title>
</head>
<link rel="stylesheet" href=" type="text/css">
<body>
<table border="0" cellspacing="0" cellpadding="5" align="center" width="514" style="BORDER-RIGHT: #000052 1px solid; BORDER-TOP: #000052 1px solid; BORDER-LEFT: #000052 1px solid; WIDTH: 514px; BORDER-BOTTOM: #000052 1px solid; BACKGROUND-REPEAT: no-repeat; HEIGHT: 402px; BACKGROUND-COLOR: #ffffff">
<tr>
<td>
<P align=center><span class="title"><FONT style="FONT-WEIGHT: normal"
size=2><STRONG>Upload CV</STRONG> | Update Skills | <STRONG>Personal
Details</STRONG></FONT> </span></P>
<P><SPAN class=title>IT Recruitment - Update Skills</SPAN><br >
Please type your details in the form below. You can upload your CV as a file (Word
document preferred) or you can paste details into the text box provided (Those fields
marked with a * are mandatory). If you have already registered with us and wish to give us
an update or you are unsure, there is no need to complete this form you can forward your
CV via email to <A href="mailto
></P>
<P align=center>
<FORM name=myForm>
<TABLE cellPadding=3 width=385 border=0>
<TR>
<TD align=left width=607 colSpan=3>
<DIV align=left>
<P>Your skills have been extracted from your CV and are listed
below. Please exclude any skills that you do not wish to be
included in our vacancy searches: </P></DIV></TD></TR>
<TR>
<TD align=middle width=145>
<P align=center><STRONG>Skills</STRONG></P></TD>
<TD align=middle width=149>
<P align=center> </P></TD>
<TD align=middle width=313>
<P align=center><STRONG>Excluded Skills</STRONG></P></TD></TR>
<TR>
<TD width=145>
<P align=center><SELECT id=clients1
style="WIDTH: 160px; COLOR: black; HEIGHT: 266px"
multiple size=5
name=clients1><%=optionStr%></SELECT> </P></TD>
<TD width=250>
<CENTER><INPUT onclick="moveIt('del',document.myForm.clients2.selectedIndex)" type=button value="Include" style="WIDTH: 61px; HEIGHT: 22px" size=51><INPUT onclick="moveIt('add',document.myForm.clients1.selectedIndex)" type=button value="Exclude" style="WIDTH: 61px; HEIGHT: 22px" size=52>
</CENTER></TD>
<TD align=middle width=313>
<P align=center><SELECT id=clients2
style="WIDTH: 160px; COLOR: black; HEIGHT: 264px"
multiple size=5
name=clients2></SELECT> </P></TD></TR>
<TR align=middle>
<TD width=145>
<P align=left><INPUT type=submit value=Submit name=Submit></P></TD>
<TD width=250>
<P align=right> </P></TD>
<TD width=313>
<P align=right> </P></TD></TR></TABLE>
<SCRIPT language=JavaScript>
function moveIt(action, thisOption){
if (thisOption == -1){
return false;
}
if (action == 'add'){
c2 = document.getElementById("clients2"
c2.options[c2.options.length] = new Option (document.myForm.clients1[thisOption].text, document.myForm.clients1[thisOption].value)
c1 = document.getElementById("clients1"
c1.options[thisOption] = null
}
if (action == 'del'){
c1 = document.getElementById("clients1"
c1.options[c1.options.length] = new Option (document.myForm.clients2[thisOption].text, document.myForm.clients2[thisOption].value)
c2 = document.getElementById("clients2"
c2.options[thisOption] = null
}
}
</SCRIPT>
</FORM></P>
</td>
</tr>
</table>
</body>
</html>