John Beschler said:
Let me be the first to say: Please post the relevant code.
<G>.
I was going to, but didn't want to waste anyone's bandwidth if this was a
common problem. Here it is:
<%@ language="JavaScript"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<!--#include virtual="/BTRC/Shared/Security/AuthenticateUser.asp" -->
<!--#include virtual="/BTRC/Shared/Server/DbLibrary.asp" -->
<link REL="stylesheet" TYPE="text/css"
HREF="/BTRC/Shared/Style/Style.css">
<link REL="stylesheet" TYPE="text/css"
HREF="/BTRC/Shared/Style/BgStyles.css">
<link REL="stylesheet" TYPE="text/css" HREF="Style/Style.css">
</head>
<body leftmargin=10 topmargin=10>
<script language="javascript" src="scripts/titleband.js"
type=text/javascript></script>
<script language='javascript'>
function DoCarrierSelectChange(ASelect)
{
document.URL = "SaveCarrier.asp" + ASelect.value;
}
ClearTitleHtml();
AddTitleHtml("<span style='position:absolute;left:10;'>Change
Carrier</span>");
</script>
<center>
<table border='0' cellpadding='0' cellspacing='0'>
<tr>
<td>
<table class='inner' border='0' cellpadding='2' cellspacing='1'>
<tr class='SUB_HEADER_ONE'>
<td colspan='2'>Change Carrier
<%
var vCarrierName = String(Request.Cookies("CarrierName"));
if (vCarrierName != "")
Response.write(" from " + vCarrierName);
%>
</td>
</tr>
<tr height="40" class='data_light'>
<td>
<table height='100%'>
<tr>
<td>Select a Carrier</td><td>
<%
Response.write('Session("securitytoken")=' + Session("SecurityToken") +
'<BR>');
Response.write("<select id='CarrierSelect'>\n");
ConnectDb();
BeginTrans();
vSQL =
'select '+
' C.carrier_id as ID, C.carrier_name as CName '+
'from '+
' security_token ST '+
' join user_carrier UC on UC.user_id = ST.user_id '+
' join carrier C on c.carrier_id = uc.carrier_id '+
'where '+
' st.security_token_id=' + Session("SecurityToken") + ' ' +
'order by '+
' C.carrier_name';
vCarrierList = ExecSQL(vSQL);
if (vCarrierList != null)
{
while (!vCarrierList.EOF)
{
Response.write(
"<option value='?id=" +
vCarrierList.Fields("ID").Value +
"&name=" +
vCarrierList.Fields("CName").Value);
if (String(vCarrierList.Fields("ID").Value) ==
String(Request.Cookies("CarrierId")))
Response.write("' selected>");
else
Response.write("'>");
Response.write(vCarrierList.Fields("CName").Value);
Response.write("</option>\n");
vCarrierList.Move(1);
}
}
else
Response.write('<option selected>Debug: Null result set</option>');
Commit();
DisconnectDb();
Response.write('</select>\n');
Response.write(' </td>\n');
Response.write(' </tr>\n');
Response.write(' </table>\n');
Response.write(' </td>\n');
Response.write(' </tr>\n');
Response.write(' </table>\n');
Response.write(' </td>\n');
Response.write(' </tr>\n');
Response.write(' <tr><td height="10"></td></tr>\n');
Response.write(' <tr height="34">\n');
Response.write(' <td colspan="2" class="buttons"
align="right">\n');
Response.write(' <button id=OkButton
onclick="DoCarrierSelectChange(CarrierSelect);"
style="width:75;margin-right:5;margin-left:5">Ok</button>\n');
Response.write(' </td>\n');
Response.write(' </tr>\n');
Response.write(' </table>\n');
Response.write(' </center>\n');
Response.write('</body>\n');
Response.write('</html>\n');
Response.End;
%>