Link to home
Start Free TrialLog in
Avatar of grantballantyne
grantballantyneFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Dynamically populate hidden form field based on previous selection

Dear Experts

I have a form where the form field 'nActingSolcRef' is dynamically populated after a selection from the form field 'nSolFirm' is made.

When making a selection from the form field 'nActingSolcRef' I would also like to dynamically populate a hidden form field called 'nActingSol'.  The value of 'nActingSol' would be the same as the label value of the form field 'nActingSolcRef' .

Can anyone offer some assistance with this?

Please see full code from the page below.

Thanks

Grant
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../Connections/camsmith.asp" -->
 
 
 
 
 
<%
Dim property__MMColParam
property__MMColParam = "1"
If (Session("pRef")  <> "") Then 
  property__MMColParam = Session("pRef") 
End If
%>
<%
Dim property
Dim property_cmd
Dim property_numRows
 
Set property_cmd = Server.CreateObject ("ADODB.Command")
property_cmd.ActiveConnection = MM_camsmith_STRING
property_cmd.CommandText = "SELECT * FROM dbo.Property WHERE pRef = ?" 
property_cmd.Prepared = true
property_cmd.Parameters.Append property_cmd.CreateParameter("param1", 5, 1, -1, property__MMColParam) ' adDouble
 
Set property = property_cmd.Execute
property_numRows = 0
%>
<% Session("pRef") = (property.Fields.Item("pRef").Value) %>
<%
Dim user__MMColParam
user__MMColParam = "1"
If (Session("MM_Username") <> "") Then 
  user__MMColParam = Session("MM_Username")
End If
%>
<%
Dim user
Dim user_numRows
 
Set user = Server.CreateObject("ADODB.Recordset")
user.ActiveConnection = MM_camsmith_STRING
user.Source = "SELECT * FROM dbo.cmslogin WHERE UserLoginID = '" + Replace(user__MMColParam, "'", "''") + "'"
user.CursorType = 0
user.CursorLocation = 2
user.LockType = 1
user.Open()
 
user_numRows = 0
%>
<%
Dim vendoraddress
Dim vendoraddress_cmd
Dim vendoraddress_numRows
 
Set vendoraddress_cmd = Server.CreateObject ("ADODB.Command")
vendoraddress_cmd.ActiveConnection = MM_camsmith_STRING
vendoraddress_cmd.CommandText = "SELECT * FROM dbo.addresslookupaddproperty ORDER BY Name" 
vendoraddress_cmd.Prepared = true
 
Set vendoraddress = vendoraddress_cmd.Execute
vendoraddress_numRows = 0
%>
<%
Dim addressbook__MMColParam
addressbook__MMColParam = "9999999"
If (Request.QueryString("record") <> "") Then 
  addressbook__MMColParam = Request.QueryString("record")
End If
%>
<%
Dim addressbook
Dim addressbook_cmd
Dim addressbook_numRows
 
Set addressbook_cmd = Server.CreateObject ("ADODB.Command")
addressbook_cmd.ActiveConnection = MM_camsmith_STRING
addressbook_cmd.CommandText = "SELECT * FROM dbo.addressbook WHERE cRef = ?" 
addressbook_cmd.Prepared = true
addressbook_cmd.Parameters.Append addressbook_cmd.CreateParameter("param1", 200, 1, 30, addressbook__MMColParam) ' adVarChar
 
Set addressbook = addressbook_cmd.Execute
addressbook_numRows = 0
%>
<%
Dim vendorinfo__MMColParam
vendorinfo__MMColParam = "9999999"
If (Request.QueryString("record") <> "") Then 
  vendorinfo__MMColParam = Request.QueryString("record")
End If
%>
<%
Dim vendorinfo
Dim vendorinfo_cmd
Dim vendorinfo_numRows
 
Set vendorinfo_cmd = Server.CreateObject ("ADODB.Command")
vendorinfo_cmd.ActiveConnection = MM_camsmith_STRING
vendorinfo_cmd.CommandText = "SELECT * FROM dbo.addresslookupaddproperty WHERE cRef = ?" 
vendorinfo_cmd.Prepared = true
vendorinfo_cmd.Parameters.Append vendorinfo_cmd.CreateParameter("param1", 200, 1, 30, vendorinfo__MMColParam) ' adVarChar
 
Set vendorinfo = vendorinfo_cmd.Execute
vendorinfo_numRows = 0
%>
<%
Dim soladdressbook
Dim soladdressbook_numRows
 
Set soladdressbook = Server.CreateObject("ADODB.Recordset")
soladdressbook.ActiveConnection = MM_camsmith_STRING
soladdressbook.Source = "SELECT distinct cCompany  FROM dbo.addressbook  WHERE cType = 'Solicitor'  ORDER BY cCompany"
soladdressbook.CursorType = 0
soladdressbook.CursorLocation = 2
soladdressbook.LockType = 1
soladdressbook.Open()
 
soladdressbook_numRows = 0
%>
<%
Dim solicitors
Dim solicitors_numRows
 
Set solicitors = Server.CreateObject("ADODB.Recordset")
solicitors.ActiveConnection = MM_camsmith_STRING
solicitors.Source = "SELECT *  FROM dbo.addresslookupaddproperty"
solicitors.CursorType = 0
solicitors.CursorLocation = 2
solicitors.LockType = 1
solicitors.Open()
 
solicitors_numRows = 0
%>
<%
Dim viewing__MMColParam
viewing__MMColParam = "1"
If (Session("pRef")  <> "") Then 
  viewing__MMColParam = Session("pRef") 
End If
%>
<%
Dim viewing
Dim viewing_cmd
Dim viewing_numRows
 
Set viewing_cmd = Server.CreateObject ("ADODB.Command")
viewing_cmd.ActiveConnection = MM_camsmith_STRING
viewing_cmd.CommandText = "SELECT * FROM dbo.notesofinterest,addressbook WHERE nPref = ? and ncRef = cRef ORDER BY nDate DESC" 
viewing_cmd.Prepared = true
viewing_cmd.Parameters.Append viewing_cmd.CreateParameter("param1", 5, 1, -1, viewing__MMColParam) ' adDouble
 
Set viewing = viewing_cmd.Execute
viewing_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
 
Repeat1__numRows = -1
Repeat1__index = 0
viewing_numRows = viewing_numRows + Repeat1__numRows
%>
 
<%
Dim MM_editAction
MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
  MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString)
End If
 
' boolean to abort record edit
Dim MM_abortEdit
MM_abortEdit = false
%>
<%
' IIf implementation
Function MM_IIf(condition, ifTrue, ifFalse)
  If condition = "" Then
    MM_IIf = ifFalse
  Else
    MM_IIf = ifTrue
  End If
End Function
%>
<%
If (CStr(Request("MM_insert")) = "form2") Then
  If (Not MM_abortEdit) Then
    ' execute the insert
    Dim MM_editCmd
 
    Set MM_editCmd = Server.CreateObject ("ADODB.Command")
    MM_editCmd.ActiveConnection = MM_camsmith_STRING
    MM_editCmd.CommandText = "INSERT INTO dbo.notesofinterest (nDate, nSolFirm,  nActingSolcRef, nComments, nPref, ncRef) VALUES (?, ?, ?, ?,  ?, ?)" 
    MM_editCmd.Prepared = true
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 135, 1, -1, MM_IIF(Request.Form("nDate"), Request.Form("nDate"), null)) ' adDBTimeStamp
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 201, 1, 50, Request.Form("nSolFirm")) ' adLongVarChar
 
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param4", 5, 1, -1, Request.Form("nActingSolcRef")) ' adLongVarChar
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param5", 201, 1, 300, Request.Form("nComments")) ' adLongVarChar
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param6", 5, 1, -1, MM_IIF(Request.Form("nPref"), Request.Form("nPref"), null)) ' adDouble
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param7", 5, 1, -1, MM_IIF(Request.Form("ncRef"), Request.Form("ncRef"), null)) ' adDouble
 
    MM_editCmd.Execute
    MM_editCmd.ActiveConnection.Close
 
    ' append the query string to the redirect URL
    Dim MM_editRedirectUrl
    MM_editRedirectUrl = "solicitor_estateagency_notesofinterestlistafterinsert.asp"
 
    If (Request.QueryString <> "") Then
      If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then
        MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
      Else
        MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
      End If
    End If
    Response.Redirect(MM_editRedirectUrl)
  End If
End If
%>
 
 
 
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Estate-Agent Solicitor Intelligent Property Management: Notes of Interest</title>
 
 
<script language="JavaScript">
<!--
var arrDynaList = new Array();
var arrDL1 = new Array();
arrDL1[1] = "nSolFirm";               // Name of parent list box
arrDL1[2] = "form1";                  // Name of form containing parent list box
arrDL1[3] = "nActingSolcRef";               // Name of child list box
arrDL1[4] = "form1";                  // Name of form containing child list box
arrDL1[5] = arrDynaList;
  
<%
Dim txtDynaListRelation, txtDynaListLabel, txtDynaListValue, oDynaListRS
txtDynaListRelation = "cCompany"      ' Name of recordset field relating to parent
txtDynaListLabel = "Name"            ' Name of recordset field for child Item Label
txtDynaListValue = "cRef"            ' Name of recordset field for child Value
 
Set oDynaListRS = solicitors
             ' Name of child list box recordset
  
Dim varDynaList
varDynaList = -1
Dim varMaxWidth
varMaxWidth = "1"
Dim varCheckGroup
varCheckGroup = oDynaListRS.Fields.Item(txtDynaListRelation).Value
Dim varCheckLength
varCheckLength = 0
Dim varMaxLength
varMaxLength = 0
While (NOT oDynaListRS.EOF)
 If (varCheckGroup <> oDynaListRS.Fields.Item(txtDynaListRelation).Value) Then
  If (varCheckLength > varMaxLength) Then
   varMaxLength = varCheckLength
  End If
  varCheckLength = 0
 End If
%>
 arrDynaList[<%=(varDynaList+1)%>] = "<%=(oDynaListRS.Fields.Item(txtDynaListRelation).Value)%>"
 arrDynaList[<%=(varDynaList+2)%>] = "<%=(oDynaListRS.Fields.Item(txtDynaListLabel).Value)%>"
 arrDynaList[<%=(varDynaList+3)%>] = "<%=(oDynaListRS.Fields.Item(txtDynaListValue).Value)%>"
<%
 If (len(oDynaListRS.Fields.Item(txtDynaListLabel).Value) > len(varMaxWidth)) Then
  varMaxWidth = oDynaListRS.Fields.Item(txtDynaListLabel).Value
 End If
 varCheckLength = varCheckLength + 1
 varDynaList = varDynaList + 3
 oDynaListRS.MoveNext()
Wend
If (varCheckLength > varMaxLength) Then
 varMaxLength = varCheckLength
End If
%>
//-->
</script>
<script type="text/javascript">
<!--
<!--
function setDynaList(arrDL){
 var oList1 = document.forms[arrDL[2]].elements[arrDL[1]];
 var oList2 = document.forms[arrDL[4]].elements[arrDL[3]];
 var arrList = arrDL[5];
 
 clearDynaList(oList2);
 
 if (oList1.selectedIndex == -1){
  oList1.selectedIndex = 0;
 }
 populateDynaList(oList2, oList1[oList1.selectedIndex].value, arrList);
 return true;
}
 
function clearDynaList(oList){
 for (var i = oList.options.length; i >= 0; i--){
  oList.options[i] = null;
 }
 
 oList.selectedIndex = -1;
}
 
function populateDynaList(oList, nIndex, aArray){
 oList.options.length=0;
 oList.options[oList.options.length] = new Option("Not Specified  ","%");
 for (var i = 0; i < aArray.length; i= i + 3){
  if (aArray[i] == nIndex){
   oList.options[oList.options.length] = new Option(aArray[i + 1], aArray[i + 2]);
  }
 }
 
 oList.selectedIndex = 0;
}
 
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function YY_checkform() { //v4.71
//copyright (c)1998,2002 Yaromat.com
  var a=YY_checkform.arguments,oo=true,v='',s='',err=false,r,o,at,o1,t,i,j,ma,rx,cd,cm,cy,dte,at;
  for (i=1; i<a.length;i=i+4){
    if (a[i+1].charAt(0)=='#'){r=true; a[i+1]=a[i+1].substring(1);}else{r=false}
    o=MM_findObj(a[i].replace(/\[\d+\]/ig,""));
    o1=MM_findObj(a[i+1].replace(/\[\d+\]/ig,""));
    v=o.value;t=a[i+2];
    if (o.type=='text'||o.type=='password'||o.type=='hidden'){
      if (r&&v.length==0){err=true}
      if (v.length>0)
      if (t==1){ //fromto
        ma=a[i+1].split('_');if(isNaN(v)||v<ma[0]/1||v > ma[1]/1){err=true}
      } else if (t==2){
        rx=new RegExp("^[\\w\.=-]+@[\\w\\.-]+\\.[a-zA-Z]{2,4}$");if(!rx.test(v))err=true;
      } else if (t==3){ // date
        ma=a[i+1].split("#");at=v.match(ma[0]);
        if(at){
          cd=(at[ma[1]])?at[ma[1]]:1;cm=at[ma[2]]-1;cy=at[ma[3]];
          dte=new Date(cy,cm,cd);
          if(dte.getFullYear()!=cy||dte.getDate()!=cd||dte.getMonth()!=cm){err=true};
        }else{err=true}
      } else if (t==4){ // time
        ma=a[i+1].split("#");at=v.match(ma[0]);if(!at){err=true}
      } else if (t==5){ // check this 2
            if(o1.length)o1=o1[a[i+1].replace(/(.*\[)|(\].*)/ig,"")];
            if(!o1.checked){err=true}
      } else if (t==6){ // the same
            if(v!=MM_findObj(a[i+1]).value){err=true}
      }
    } else
    if (!o.type&&o.length>0&&o[0].type=='radio'){
          at = a[i].match(/(.*)\[(\d+)\].*/i);
          o2=(o.length>1)?o[at[2]]:o;
      if (t==1&&o2&&o2.checked&&o1&&o1.value.length/1==0){err=true}
      if (t==2){
        oo=false;
        for(j=0;j<o.length;j++){oo=oo||o[j].checked}
        if(!oo){s+='* '+a[i+3]+'\n'}
      }
    } else if (o.type=='checkbox'){
      if((t==1&&o.checked==false)||(t==2&&o.checked&&o1&&o1.value.length/1==0)){err=true}
    } else if (o.type=='select-one'||o.type=='select-multiple'){
      if(t==1&&o.selectedIndex/1==0){err=true}
    }else if (o.type=='textarea'){
      if(v.length<a[i+1]){err=true}
    }
    if (err){s+='* '+a[i+3]+'\n'; err=false}
  }
  if (s!=''){alert('The required information is incomplete or contains errors:\t\t\t\t\t\n\n'+s)}
  document.MM_returnValue = (s=='');
}//-->
</script>
 
 
 
 
<script type="text/javascript">
<!--
 
 
 
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
<link href="solicitors_estateagency_styles.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="p7pm/p7popmenu.js"></script>
<link href="includes/p7pm/p7pmv0.css" rel="stylesheet" type="text/css" />
<style type="text/css">
/*<![CDATA[*/
 
 
 
#scroller {
	width: 100%;
	height: 240px;
	overflow: auto;
	border-top: 0px inset;
	border-right: 0px inset;
	border-bottom: 0px inset;
	border-left: 0px inset;
 }
</style>
 
<script>
 
 
<script>
function RefreshData(sel)
      {
      var entry = sel.options[sel.selectedIndex].value;
      document.location.href="solicitor_estateagency_addviewingappointment2.asp?record=" + entry; + "pRef=" 
      }
</script>
 
<script type="text/javascript">
<!--
function setDynaList(arrDL){
 var oList1 = document.forms[arrDL[2]].elements[arrDL[1]];
 var oList2 = document.forms[arrDL[4]].elements[arrDL[3]];
 var arrList = arrDL[5];
 
 clearDynaList(oList2);
 
 if (oList1.selectedIndex == -1){
  oList1.selectedIndex = 0;
 }
 populateDynaList(oList2, oList1[oList1.selectedIndex].value, arrList);
 return true;
}
 
function clearDynaList(oList){
 for (var i = oList.options.length; i >= 0; i--){
  oList.options[i] = null;
 }
 
 oList.selectedIndex = -1;
}
 
function populateDynaList(oList, nIndex, aArray){
 oList.options.length=0;
 oList.options[oList.options.length] = new Option("Select Solicitor  ","%");
  oList.options[oList.options.length] = new Option("Unknown  ","Unknown");
 oList.options[oList.options.length] = new Option("INFORMAL  ","INFORMAL");
 for (var i = 0; i < aArray.length; i= i + 3){
  if (aArray[i] == nIndex){
   oList.options[oList.options.length] = new Option(aArray[i + 1], aArray[i + 2]);
  }
 }
 
 oList.selectedIndex = 0;
}
 
function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}
 
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
 
function YY_checkform() { //v4.71
//copyright (c)1998,2002 Yaromat.com
  var a=YY_checkform.arguments,oo=true,v='',s='',err=false,r,o,at,o1,t,i,j,ma,rx,cd,cm,cy,dte,at;
  for (i=1; i<a.length;i=i+4){
    if (a[i+1].charAt(0)=='#'){r=true; a[i+1]=a[i+1].substring(1);}else{r=false}
    o=MM_findObj(a[i].replace(/\[\d+\]/ig,""));
    o1=MM_findObj(a[i+1].replace(/\[\d+\]/ig,""));
    v=o.value;t=a[i+2];
    if (o.type=='text'||o.type=='password'||o.type=='hidden'){
      if (r&&v.length==0){err=true}
      if (v.length>0)
      if (t==1){ //fromto
        ma=a[i+1].split('_');if(isNaN(v)||v<ma[0]/1||v > ma[1]/1){err=true}
      } else if (t==2){
        rx=new RegExp("^[\\w\.=-]+@[\\w\\.-]+\\.[a-zA-Z]{2,4}$");if(!rx.test(v))err=true;
      } else if (t==3){ // date
        ma=a[i+1].split("#");at=v.match(ma[0]);
        if(at){
          cd=(at[ma[1]])?at[ma[1]]:1;cm=at[ma[2]]-1;cy=at[ma[3]];
          dte=new Date(cy,cm,cd);
          if(dte.getFullYear()!=cy||dte.getDate()!=cd||dte.getMonth()!=cm){err=true};
        }else{err=true}
      } else if (t==4){ // time
        ma=a[i+1].split("#");at=v.match(ma[0]);if(!at){err=true}
      } else if (t==5){ // check this 2
            if(o1.length)o1=o1[a[i+1].replace(/(.*\[)|(\].*)/ig,"")];
            if(!o1.checked){err=true}
      } else if (t==6){ // the same
            if(v!=MM_findObj(a[i+1]).value){err=true}
      }
    } else
    if (!o.type&&o.length>0&&o[0].type=='radio'){
          at = a[i].match(/(.*)\[(\d+)\].*/i);
          o2=(o.length>1)?o[at[2]]:o;
      if (t==1&&o2&&o2.checked&&o1&&o1.value.length/1==0){err=true}
      if (t==2){
        oo=false;
        for(j=0;j<o.length;j++){oo=oo||o[j].checked}
        if(!oo){s+='* '+a[i+3]+'\n'}
      }
    } else if (o.type=='checkbox'){
      if((t==1&&o.checked==false)||(t==2&&o.checked&&o1&&o1.value.length/1==0)){err=true}
    } else if (o.type=='select-one'||o.type=='select-multiple'){
      if(t==1&&o.selectedIndex/1==0){err=true}
    }else if (o.type=='textarea'){
      if(v.length<a[i+1]){err=true}
    }
    if (err){s+='* '+a[i+3]+'\n'; err=false}
  }
  if (s!=''){alert('The required information is incomplete or contains errors:\t\t\t\t\t\n\n'+s)}
  document.MM_returnValue = (s=='');
}
//-->
</script>
</head>
<body onload="P7_initPM(0,0,1,-20,10)">
<div id ="outerwrapper">
<table width="840" height="75" border="0" cellpadding="0" cellspacing="0" background="../graphics/cms_bg_header.jpg">
    <tr>
      <td><img src="../graphics/menu2/sea_logo.jpg" alt="Solicitor Estate Agency Property Management" width="200" height="75" hspace="0" vspace="0" /></td>
      <td width="640" align="right" valign="bottom"><table width="0" height="70" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td colspan="11"></td>
        </tr>
        <tr>
          <td align="right"><a href="solicitor_estateagency_propertydetails.asp?pRef=<%=(property.Fields.Item("pRef").Value)%>"><img src="../graphics/easi_menu/property_details_active.jpg" alt="Property Details" name="Image12" width="62" height="70" border="0" id="Image12" onmouseover="MM_swapImage('Image12','','../graphics/easi_menu/property_details_rollover.jpg',1)" onmouseout="MM_swapImgRestore()" /></a><a href="solicitor_estateagency_propertydetails.asp"></a></td>
          <td align="right"><a href="solicitor_estateagency_createschedule.asp?pRef=<%=(property.Fields.Item("pRef").Value)%>"><img src="../graphics/easi_menu/checklists_active.jpg" alt="Checklists" width="62" height="70" border="0" id="Image4" onmouseover="MM_swapImage('Image4','','../graphics/easi_menu/checklists_rollover.jpg',1)" onmouseout="MM_swapImgRestore()" /></a></td>
          <td align="right"><a href="solicitor_estateagency_viewinglist.asp?pRef=<%=(property.Fields.Item("pRef").Value)%>"><img src="../graphics/easi_menu/viewing_appts_active.jpg" alt="Viewing Appointments" width="62" height="70" border="0" id="Image21" onmouseover="MM_swapImage('Image21','','../graphics/easi_menu/viewing_appts_rollover.jpg',1)" onmouseout="MM_swapImgRestore()" /></a><a href="solicitor_estateagency_viewinglist.asp?pRef=<%=(property.Fields.Item("pRef").Value)%>"></a></td>
          <td align="right"><img src="../graphics/easi_menu/noi_current.jpg" alt="Notes of Interest" width="62" height="70" border="0" id="Image311" /></td>
          <td align="right"><a href="solicitor_estateagency_surveyslist.asp?pRef=<%=(property.Fields.Item("pRef").Value)%>"><img src="../graphics/easi_menu/surveys_active.jpg" alt="Surveys Instructed" width="62" height="70" border="0" id="Image411" onmouseover="MM_swapImage('Image411','','../graphics/easi_menu/surveys_rollover.jpg',1)" onmouseout="MM_swapImgRestore()" /></a></td>
          <td align="right"><a href="solicitor_estateagency_offerslist.asp?pRef=<%=(property.Fields.Item("pRef").Value)%>"><img src="../graphics/easi_menu/offers_active.jpg" alt="Offers Received" width="62" height="70" border="0" id="Image511" onmouseover="MM_swapImage('Image511','','../graphics/easi_menu/offers_rollover.jpg',1)" onmouseout="MM_swapImgRestore()" /></a></td>
          <td align="right"><a href="solicitor_estateagency_createwindowcard.asp?pRef=<%=(property.Fields.Item("pRef").Value)%>"><img src="../graphics/easi_menu/merge_docs_active.jpg" alt="Merge Documents" name="Image611" width="62" height="70" border="0" id="Image611" onmouseover="MM_swapImage('Image611','','../graphics/easi_menu/merge_docs_rollover.jpg',1)" onmouseout="MM_swapImgRestore()" /></a></td>
          <td align="right"><a href="solicitor_estateagency_pdfupload.asp?pRef=<%=(property.Fields.Item("pRef").Value)%>"><img src="../graphics/easi_menu/upload_active.jpg" alt="Upload Photo/PDF" width="62" height="70" border="0" id="Image5" onmouseover="MM_swapImage('Image5','','../graphics/easi_menu/upload_rollover.jpg',1)" onmouseout="MM_swapImgRestore()" /></a></td>
          <td align="right"><a href="solicitor_estateagency_generalnotes.asp?pRef=<%=(property.Fields.Item("pRef").Value)%>"><img src="../graphics/easi_menu/general_notes_active.jpg" alt="General Notes" width="62" height="70" border="0" id="Image6" onmouseover="MM_swapImage('Image6','','../graphics/easi_menu/general_notes_rollover.jpg',1)" onmouseout="MM_swapImgRestore()" /></a></td>
          <td><a href="solicitor_estateagency_enquiries.asp?pRef=<%=(property.Fields.Item("pRef").Value)%>"><img src="../graphics/easi_menu/enquiries_active.jpg" alt="Enqruiries" width="62" height="70" border="0" id="Image7" onmouseover="MM_swapImage('Image7','','../graphics/easi_menu/enquiries_rollover.jpg',1)" onmouseout="MM_swapImgRestore()" /></a></td>
        </tr>
      </table></td>
    </tr>
  </table>
 
 
<div id="maincontent">
  <table width="100%" height="0" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td height="0" colspan="2" valign="top" background="../graphics/menu_cms_bg.gif"></td>
    </tr>
    <tr>
     <td height="30" colspan="2" valign="middle" id="searchfunction_property"><p align="right">You are logged in as <%=(user.Fields.Item("UserFirstName").Value)%> </a><%=(user.Fields.Item("UserLastName").Value)%></p></td>
    </tr>
    <tr>
      <td width="185" valign="top" bgcolor="#024B8F"><!--#include file="includes/mainnav_easi.asp" --></td>
      <td height="420" valign="top" bgcolor="#FFFFFF"><div class="highlight">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="504"><img src="../graphics/menu/viewingappointments_icon.jpg" alt="Add Viewing Appointment" name="Image1" width="60" height="48" hspace="5" border="0" align="left" id="Image1" />
              <h1>Add Note of Interest </h1>
                <h2 ><%=(property.Fields.Item("pAddress1").Value)%>, <%=(property.Fields.Item("pAddress2").Value)%>, <%=(property.Fields.Item("pTown").Value)%>, <%=(property.Fields.Item("pPostCode").Value)%></h2></td><td width="136" align="right">&nbsp;</td>
          </tr>
        </table>
      </div>
         <div class="checklist"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td colspan="2" valign="top"><span class="propertydetailsstatus"><%=(property.Fields.Item("pStage").Value)%>&nbsp;<%=(property.Fields.Item("pClosingDate").Value)%> </span></td>
    </tr>
  <tr>
    <td width="54" valign="top"><p class="propertydetailsheading">Price: </p></td>
    <td width="596" valign="middle"> <p><%=(property.Fields.Item("pPriceType").Value)%> <%= FormatCurrency((property.Fields.Item("pPrice").Value), 0, -2, -2, -2) %><span class="propertydetailsheading"><br />
        </span></p>      </td>
  </tr>
  
  <tr>
    <td valign="top"><p class="propertydetailsheading">NOI:</p></td>
    <td valign="middle"><p> Notes of Interest taken in Total </p></td>
  </tr>
</table>
 
		 
 
		</div>
       <div class="checklist">
		 <div id ="formcontainer">
		<form action="<%=MM_editAction%>" method="post" name="form1" id="form1" onsubmit="YY_checkform('document.form1','input_flightdeparture6','#q','0','Please select the Date of the Note of Interest','nSolFirm','q','1','Please select the Solicitor Firm making the Note of Interest','nActingSol','q','1','Please select the Solicitor Name ');return document.MM_returnValue">
		  <table width="100%" height="0" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="100%" valign="top">
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
      
      <tr>
        <td width="70%" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
              
              <tr>
                <td height="25" colspan="2">    <h2>Add Note of Interest </h2>                </tr>
              <tr>
                <td height="25"><p class="propertydetailsheading"> Client's Name : 
                </p>
                <td width="73%">  <p>
                    <label><a href="solicitor_estateagency_addaddcontactpop.asp" target="addvendor"></a></label>
                  <%=(addressbook.Fields.Item("cTitle").Value)%><%=(addressbook.Fields.Item("cFirstName").Value)%><%=(addressbook.Fields.Item("cSurName").Value)%></p></td>
                </tr>
              
              
              <tr>
                <td width="27%" height="25"><p class="propertydetailsheading">Address: </p></td>
                <td><p>
                    <% If Not vendorinfo.EOF Or Not vendorinfo.BOF Then %>
                    <%=(vendorinfo.Fields.Item("cAddress1").Value) & " " & (vendorinfo.Fields.Item("cAddress2").Value) & ", " & (vendorinfo.Fields.Item("cTown").Value)%>
                    <% End If %>
                </p></td>
              </tr>
              
              <tr>
                <td height="25"><p class="propertydetailsheading">Date Note Taken: </p></td>
                <td><input name="nDate" type="text" id='input_flightdeparture6' size="12" />
                    <img src="calendarimages/dlcalendar_2.gif" alt="calendar" name="img_flightdeparture6" width="13" height="13" align="middle" id="img_flightdeparture6" />
                    <dlcalendar click_element_id="img_flightdeparture6"
            emptydate_option="true"
            hide_onselection="true"
            input_element_id="input_flightdeparture6"
            tool_tip="Click to choose flight departure date"></dlcalendar></td>
                </tr>
              <tr>
                <td height="25"><p class="propertydetailsheading">Solicitor Firm: </p></td>
                <td><select name="nSolFirm" id="nSolFirm" onchange="MM_callJS('setDynaList(arrDL1)')" TABINDEX=5>
                    <option value="NA">Please Select...</option>
                    <option value="INFORMAL">INFORMAL</option>
					<%
While (NOT soladdressbook.EOF)
%><option value="<%=(soladdressbook.Fields.Item("cCompany").Value)%>"><%=(soladdressbook.Fields.Item("cCompany").Value)%></option>
                    <%
  soladdressbook.MoveNext()
Wend
If (soladdressbook.CursorType > 0) Then
  soladdressbook.MoveFirst
Else
  soladdressbook.Requery
End If
%>
                  </select>&nbsp;<label class="propertydetailscheck" onclick="MM_openBrWindow('solicitor_estateagency_addaddcontactPOP.asp','addcontact','scrollbars=yes,width=650,height=475')"><img src="../graphics/menu/addcontact_sm.jpg" alt="Add contact" width="20" height="24" align="absbottom" /><a href="solicitor_estateagency_addaddcontactpop.asp" target="addcontact">Add
 Contact</a></label></td>
              </tr>
              
              <tr>
                <td height="25"><p class="propertydetailsheading">Acting Solicitor: </p></td>
                <td><select name="nActingSolcRef" id="nActingSolcRef">
                    <option value="NA">Select Solicitor Firm</option>
                   
				  
				  </select>
                  <input name="nActingSol" type="hidden" id="nActingSol" /></td>
              </tr>
              
              <tr>
                <td height="25" valign="top"><p class="propertydetailsheading">Comments: </p></td>
                <td><textarea name="nComments" cols="40" rows="4" wrap="virtual" id="nComments" onkeyup='countIt()'  ></textarea></td>
              </tr>
              <tr>
                <td><input name="nPref" type="hidden" id="nPref" value="<%=(property.Fields.Item("pRef").Value)%>" />
                  <input name="ncRef" type="hidden" id="ncRef" value="<%=(vendorinfo.Fields.Item("cRef").Value)%>" /></td>
                <td><input name="Add Property" type="submit" class="button" onclick="YY_checkform('form1');return document.MM_returnValue" value="Complete"></td>
              </tr>
              <tr>
                <td>&nbsp;</td>
                <td></td>
              </tr>
            </table></td>
        <td width="30%" valign="top"><div class="viewingappointmentsrights">
          <h2>Notes of Interest Recorded</h2>
         <div id="scroller">
           <% 
While ((Repeat1__numRows <> 0) AND (NOT viewing.EOF)) 
%>
             <table width="90%" border="0" cellspacing="0" cellpadding="0">
               
               <tr>
                 <td><p class="propertydetailslist"><a href="solicitor_estateagency_notesofinterestdetails.asp?pRef=<%=(viewing.Fields.Item("nPref").Value)%>&amp;ncRef=<%=(viewing.Fields.Item("ncRef").Value)%>&amp;ref=<%=(viewing.Fields.Item("ref").Value)%>&amp;sName=<%=(viewing.Fields.Item("nActingSol").Value)%>"><%=(viewing.Fields.Item("nDate").Value)%></a>
                   
                   
                   </p></td>
                          <td><p class="propertydetailslist">&nbsp;</p></td>
                    </tr>
             </table>
             <% 
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  viewing.MoveNext()
Wend
%>
</div>     
          </td>
      </tr>
    </table>
   <input type="hidden" name="MM_insert" value="form2"></td>
  </tr>
  
  
</table>
        </form></div>
		
 
		 
		 </div>
        </td>
    </tr>
  </table>
</div>
</div>
<script>
function dl_viewOver(eElement)
{
	eElement.onmouseout = dl_viewOut;
	eElement.style.color = "blue";
}
function dl_viewOut()
{
	this.style.color = "firebrick";
}
function dl_viewSource(eElement)
{
	var eXMP=eElement.nextSibling;
	while((eXMP.nodeType==3)||(eXMP.tagName.toLowerCase()=="br")){eXMP=eXMP.nextSibling};
	if(eXMP.style.display=="block"){eXMP.style.display="none"; eElement.innerHTML="[ View Source ]";}
							   else{eXMP.style.display="block";eElement.innerHTML="[ Hide Source ]";}
}
</script>
<script type="text/javascript" language="javascript"  src="dlcalendar.js"></script>
 
 
<!--#include file="includes/footer.asp" -->
 
 
 
</body>
</html>
<%
user.Close()
Set user = Nothing
%>
<%
vendoraddress.Close()
Set vendoraddress = Nothing
%>
<%
addressbook.Close()
Set addressbook = Nothing
%>
<%
vendorinfo.Close()
Set vendorinfo = Nothing
%>
<%
soladdressbook.Close()
Set soladdressbook = Nothing
%>
<%
solicitors.Close()
Set solicitors = Nothing
%>
<%
viewing.Close()
Set viewing = Nothing
%>
<%
property.Close()
Set property = Nothing
%>

Open in new window

Avatar of hielo
hielo
Flag of Wallis and Futuna image

try:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../Connections/camsmith.asp" -->
<%
Dim property__MMColParam
property__MMColParam = "1"
If (Session("pRef")  <> "") Then 
  property__MMColParam = Session("pRef") 
End If
%>
<%
Dim property
Dim property_cmd
Dim property_numRows
 
Set property_cmd = Server.CreateObject ("ADODB.Command")
property_cmd.ActiveConnection = MM_camsmith_STRING
property_cmd.CommandText = "SELECT * FROM dbo.Property WHERE pRef = ?" 
property_cmd.Prepared = true
property_cmd.Parameters.Append property_cmd.CreateParameter("param1", 5, 1, -1, property__MMColParam) ' adDouble
 
Set property = property_cmd.Execute
property_numRows = 0
%>
<% Session("pRef") = (property.Fields.Item("pRef").Value) %>
<%
Dim user__MMColParam
user__MMColParam = "1"
If (Session("MM_Username") <> "") Then 
  user__MMColParam = Session("MM_Username")
End If
%>
<%
Dim user
Dim user_numRows
 
Set user = Server.CreateObject("ADODB.Recordset")
user.ActiveConnection = MM_camsmith_STRING
user.Source = "SELECT * FROM dbo.cmslogin WHERE UserLoginID = '" + Replace(user__MMColParam, "'", "''") + "'"
user.CursorType = 0
user.CursorLocation = 2
user.LockType = 1
user.Open()
 
user_numRows = 0
%>
<%
Dim vendoraddress
Dim vendoraddress_cmd
Dim vendoraddress_numRows
 
Set vendoraddress_cmd = Server.CreateObject ("ADODB.Command")
vendoraddress_cmd.ActiveConnection = MM_camsmith_STRING
vendoraddress_cmd.CommandText = "SELECT * FROM dbo.addresslookupaddproperty ORDER BY Name" 
vendoraddress_cmd.Prepared = true
 
Set vendoraddress = vendoraddress_cmd.Execute
vendoraddress_numRows = 0
%>
<%
Dim addressbook__MMColParam
addressbook__MMColParam = "9999999"
If (Request.QueryString("record") <> "") Then 
  addressbook__MMColParam = Request.QueryString("record")
End If
%>
<%
Dim addressbook
Dim addressbook_cmd
Dim addressbook_numRows
 
Set addressbook_cmd = Server.CreateObject ("ADODB.Command")
addressbook_cmd.ActiveConnection = MM_camsmith_STRING
addressbook_cmd.CommandText = "SELECT * FROM dbo.addressbook WHERE cRef = ?" 
addressbook_cmd.Prepared = true
addressbook_cmd.Parameters.Append addressbook_cmd.CreateParameter("param1", 200, 1, 30, addressbook__MMColParam) ' adVarChar
 
Set addressbook = addressbook_cmd.Execute
addressbook_numRows = 0
%>
<%
Dim vendorinfo__MMColParam
vendorinfo__MMColParam = "9999999"
If (Request.QueryString("record") <> "") Then 
  vendorinfo__MMColParam = Request.QueryString("record")
End If
%>
<%
Dim vendorinfo
Dim vendorinfo_cmd
Dim vendorinfo_numRows
 
Set vendorinfo_cmd = Server.CreateObject ("ADODB.Command")
vendorinfo_cmd.ActiveConnection = MM_camsmith_STRING
vendorinfo_cmd.CommandText = "SELECT * FROM dbo.addresslookupaddproperty WHERE cRef = ?" 
vendorinfo_cmd.Prepared = true
vendorinfo_cmd.Parameters.Append vendorinfo_cmd.CreateParameter("param1", 200, 1, 30, vendorinfo__MMColParam) ' adVarChar
 
Set vendorinfo = vendorinfo_cmd.Execute
vendorinfo_numRows = 0
%>
<%
Dim soladdressbook
Dim soladdressbook_numRows
 
Set soladdressbook = Server.CreateObject("ADODB.Recordset")
soladdressbook.ActiveConnection = MM_camsmith_STRING
soladdressbook.Source = "SELECT distinct cCompany  FROM dbo.addressbook  WHERE cType = 'Solicitor'  ORDER BY cCompany"
soladdressbook.CursorType = 0
soladdressbook.CursorLocation = 2
soladdressbook.LockType = 1
soladdressbook.Open()
 
soladdressbook_numRows = 0
%>
<%
Dim solicitors
Dim solicitors_numRows
 
Set solicitors = Server.CreateObject("ADODB.Recordset")
solicitors.ActiveConnection = MM_camsmith_STRING
solicitors.Source = "SELECT *  FROM dbo.addresslookupaddproperty"
solicitors.CursorType = 0
solicitors.CursorLocation = 2
solicitors.LockType = 1
solicitors.Open()
 
solicitors_numRows = 0
%>
<%
Dim viewing__MMColParam
viewing__MMColParam = "1"
If (Session("pRef")  <> "") Then 
  viewing__MMColParam = Session("pRef") 
End If
%>
<%
Dim viewing
Dim viewing_cmd
Dim viewing_numRows
 
Set viewing_cmd = Server.CreateObject ("ADODB.Command")
viewing_cmd.ActiveConnection = MM_camsmith_STRING
viewing_cmd.CommandText = "SELECT * FROM dbo.notesofinterest,addressbook WHERE nPref = ? and ncRef = cRef ORDER BY nDate DESC" 
viewing_cmd.Prepared = true
viewing_cmd.Parameters.Append viewing_cmd.CreateParameter("param1", 5, 1, -1, viewing__MMColParam) ' adDouble
 
Set viewing = viewing_cmd.Execute
viewing_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
 
Repeat1__numRows = -1
Repeat1__index = 0
viewing_numRows = viewing_numRows + Repeat1__numRows
%>
 
<%
Dim MM_editAction
MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
  MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString)
End If
 
' boolean to abort record edit
Dim MM_abortEdit
MM_abortEdit = false
%>
<%
' IIf implementation
Function MM_IIf(condition, ifTrue, ifFalse)
  If condition = "" Then
    MM_IIf = ifFalse
  Else
    MM_IIf = ifTrue
  End If
End Function
%>
<%
If (CStr(Request("MM_insert")) = "form2") Then
  If (Not MM_abortEdit) Then
    ' execute the insert
    Dim MM_editCmd
 
    Set MM_editCmd = Server.CreateObject ("ADODB.Command")
    MM_editCmd.ActiveConnection = MM_camsmith_STRING
    MM_editCmd.CommandText = "INSERT INTO dbo.notesofinterest (nDate, nSolFirm,  nActingSolcRef, nComments, nPref, ncRef) VALUES (?, ?, ?, ?,  ?, ?)" 
    MM_editCmd.Prepared = true
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 135, 1, -1, MM_IIF(Request.Form("nDate"), Request.Form("nDate"), null)) ' adDBTimeStamp
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 201, 1, 50, Request.Form("nSolFirm")) ' adLongVarChar
 
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param4", 5, 1, -1, Request.Form("nActingSolcRef")) ' adLongVarChar
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param5", 201, 1, 300, Request.Form("nComments")) ' adLongVarChar
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param6", 5, 1, -1, MM_IIF(Request.Form("nPref"), Request.Form("nPref"), null)) ' adDouble
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param7", 5, 1, -1, MM_IIF(Request.Form("ncRef"), Request.Form("ncRef"), null)) ' adDouble
 
    MM_editCmd.Execute
    MM_editCmd.ActiveConnection.Close
 
    ' append the query string to the redirect URL
    Dim MM_editRedirectUrl
    MM_editRedirectUrl = "solicitor_estateagency_notesofinterestlistafterinsert.asp"
 
    If (Request.QueryString <> "") Then
      If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0) Then
        MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
      Else
        MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
      End If
    End If
    Response.Redirect(MM_editRedirectUrl)
  End If
End If
%>
 
 
 
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Estate-Agent Solicitor Intelligent Property Management: Notes of Interest</title>
 
 
<script language="JavaScript">
<!--
var arrDynaList = new Array();
var arrDL1 = new Array();
arrDL1[1] = "nSolFirm";               // Name of parent list box
arrDL1[2] = "form1";                  // Name of form containing parent list box
arrDL1[3] = "nActingSolcRef";               // Name of child list box
arrDL1[4] = "form1";                  // Name of form containing child list box
arrDL1[5] = arrDynaList;
  
<%
Dim txtDynaListRelation, txtDynaListLabel, txtDynaListValue, oDynaListRS
txtDynaListRelation = "cCompany"      ' Name of recordset field relating to parent
txtDynaListLabel = "Name"            ' Name of recordset field for child Item Label
txtDynaListValue = "cRef"            ' Name of recordset field for child Value
 
Set oDynaListRS = solicitors
             ' Name of child list box recordset
  
Dim varDynaList
varDynaList = -1
Dim varMaxWidth
varMaxWidth = "1"
Dim varCheckGroup
varCheckGroup = oDynaListRS.Fields.Item(txtDynaListRelation).Value
Dim varCheckLength
varCheckLength = 0
Dim varMaxLength
varMaxLength = 0
While (NOT oDynaListRS.EOF)
 If (varCheckGroup <> oDynaListRS.Fields.Item(txtDynaListRelation).Value) Then
  If (varCheckLength > varMaxLength) Then
   varMaxLength = varCheckLength
  End If
  varCheckLength = 0
 End If
%>
 arrDynaList[<%=(varDynaList+1)%>] = "<%=(oDynaListRS.Fields.Item(txtDynaListRelation).Value)%>"
 arrDynaList[<%=(varDynaList+2)%>] = "<%=(oDynaListRS.Fields.Item(txtDynaListLabel).Value)%>"
 arrDynaList[<%=(varDynaList+3)%>] = "<%=(oDynaListRS.Fields.Item(txtDynaListValue).Value)%>"
<%
 If (len(oDynaListRS.Fields.Item(txtDynaListLabel).Value) > len(varMaxWidth)) Then
  varMaxWidth = oDynaListRS.Fields.Item(txtDynaListLabel).Value
 End If
 varCheckLength = varCheckLength + 1
 varDynaList = varDynaList + 3
 oDynaListRS.MoveNext()
Wend
If (varCheckLength > varMaxLength) Then
 varMaxLength = varCheckLength
End If
%>
//-->
</script>
<script type="text/javascript">
<!--
<!--
function setDynaList(arrDL){
 var oList1 = document.forms[arrDL[2]].elements[arrDL[1]];
 var oList2 = document.forms[arrDL[4]].elements[arrDL[3]];
 var arrList = arrDL[5];
 
 clearDynaList(oList2);
 
 if (oList1.selectedIndex == -1){
  oList1.selectedIndex = 0;
 }
 populateDynaList(oList2, oList1[oList1.selectedIndex].value, arrList);
 return true;
}
 
function clearDynaList(oList){
 for (var i = oList.options.length; i >= 0; i--){
  oList.options[i] = null;
 }
 
 oList.selectedIndex = -1;
}
function setHiddenField(){
	document.getElementById('nSolFirm').value=this.value;
} 
function populateDynaList(oList, nIndex, aArray){
 oList.onchange=setHiddenField; 
 oList.options.length=0;
 oList.options[oList.options.length] = new Option("Not Specified  ","%");
 for (var i = 0; i < aArray.length; i= i + 3){
  if (aArray[i] == nIndex){
   oList.options[oList.options.length] = new Option(aArray[i + 1], aArray[i + 2]);
  }
 }
 
 oList.selectedIndex = 0;
}
 
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function YY_checkform() { //v4.71
//copyright (c)1998,2002 Yaromat.com
  var a=YY_checkform.arguments,oo=true,v='',s='',err=false,r,o,at,o1,t,i,j,ma,rx,cd,cm,cy,dte,at;
  for (i=1; i<a.length;i=i+4){
    if (a[i+1].charAt(0)=='#'){r=true; a[i+1]=a[i+1].substring(1);}else{r=false}
    o=MM_findObj(a[i].replace(/\[\d+\]/ig,""));
    o1=MM_findObj(a[i+1].replace(/\[\d+\]/ig,""));
    v=o.value;t=a[i+2];
    if (o.type=='text'||o.type=='password'||o.type=='hidden'){
      if (r&&v.length==0){err=true}
      if (v.length>0)
      if (t==1){ //fromto
        ma=a[i+1].split('_');if(isNaN(v)||v<ma[0]/1||v > ma[1]/1){err=true}
      } else if (t==2){
        rx=new RegExp("^[\\w\.=-]+@[\\w\\.-]+\\.[a-zA-Z]{2,4}$");if(!rx.test(v))err=true;
      } else if (t==3){ // date
        ma=a[i+1].split("#");at=v.match(ma[0]);
        if(at){
          cd=(at[ma[1]])?at[ma[1]]:1;cm=at[ma[2]]-1;cy=at[ma[3]];
          dte=new Date(cy,cm,cd);
          if(dte.getFullYear()!=cy||dte.getDate()!=cd||dte.getMonth()!=cm){err=true};
        }else{err=true}
      } else if (t==4){ // time
        ma=a[i+1].split("#");at=v.match(ma[0]);if(!at){err=true}
      } else if (t==5){ // check this 2
            if(o1.length)o1=o1[a[i+1].replace(/(.*\[)|(\].*)/ig,"")];
            if(!o1.checked){err=true}
      } else if (t==6){ // the same
            if(v!=MM_findObj(a[i+1]).value){err=true}
      }
    } else
    if (!o.type&&o.length>0&&o[0].type=='radio'){
          at = a[i].match(/(.*)\[(\d+)\].*/i);
          o2=(o.length>1)?o[at[2]]:o;
      if (t==1&&o2&&o2.checked&&o1&&o1.value.length/1==0){err=true}
      if (t==2){
        oo=false;
        for(j=0;j<o.length;j++){oo=oo||o[j].checked}
        if(!oo){s+='* '+a[i+3]+'\n'}
      }
    } else if (o.type=='checkbox'){
      if((t==1&&o.checked==false)||(t==2&&o.checked&&o1&&o1.value.length/1==0)){err=true}
    } else if (o.type=='select-one'||o.type=='select-multiple'){
      if(t==1&&o.selectedIndex/1==0){err=true}
    }else if (o.type=='textarea'){
      if(v.length<a[i+1]){err=true}
    }
    if (err){s+='* '+a[i+3]+'\n'; err=false}
  }
  if (s!=''){alert('The required information is incomplete or contains errors:\t\t\t\t\t\n\n'+s)}
  document.MM_returnValue = (s=='');
}//-->
</script>
 
 
 
 
<script type="text/javascript">
<!--
 
 
 
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
<link href="solicitors_estateagency_styles.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="p7pm/p7popmenu.js"></script>
<link href="includes/p7pm/p7pmv0.css" rel="stylesheet" type="text/css" />
<style type="text/css">
/*<![CDATA[*/
 
 
 
#scroller {
      width: 100%;
      height: 240px;
      overflow: auto;
      border-top: 0px inset;
      border-right: 0px inset;
      border-bottom: 0px inset;
      border-left: 0px inset;
 }
</style>
 
<script>
 
 
<script>
function RefreshData(sel)
      {
      var entry = sel.options[sel.selectedIndex].value;
      document.location.href="solicitor_estateagency_addviewingappointment2.asp?record=" + entry; + "pRef=" 
      }
</script>
 
<script type="text/javascript">
<!--
function setDynaList(arrDL){
 var oList1 = document.forms[arrDL[2]].elements[arrDL[1]];
 var oList2 = document.forms[arrDL[4]].elements[arrDL[3]];
 var arrList = arrDL[5];
 
 clearDynaList(oList2);
 
 if (oList1.selectedIndex == -1){
  oList1.selectedIndex = 0;
 }
 populateDynaList(oList2, oList1[oList1.selectedIndex].value, arrList);
 return true;
}
 
function clearDynaList(oList){
 for (var i = oList.options.length; i >= 0; i--){
  oList.options[i] = null;
 }
 
 oList.selectedIndex = -1;
}
 
function populateDynaList(oList, nIndex, aArray){
 oList.options.length=0;
 oList.options[oList.options.length] = new Option("Select Solicitor  ","%");
  oList.options[oList.options.length] = new Option("Unknown  ","Unknown");
 oList.options[oList.options.length] = new Option("INFORMAL  ","INFORMAL");
 for (var i = 0; i < aArray.length; i= i + 3){
  if (aArray[i] == nIndex){
   oList.options[oList.options.length] = new Option(aArray[i + 1], aArray[i + 2]);
  }
 }
 
 oList.selectedIndex = 0;
}
 
function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}
 
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
 
function YY_checkform() { //v4.71
//copyright (c)1998,2002 Yaromat.com
  var a=YY_checkform.arguments,oo=true,v='',s='',err=false,r,o,at,o1,t,i,j,ma,rx,cd,cm,cy,dte,at;
  for (i=1; i<a.length;i=i+4){
    if (a[i+1].charAt(0)=='#'){r=true; a[i+1]=a[i+1].substring(1);}else{r=false}
    o=MM_findObj(a[i].replace(/\[\d+\]/ig,""));
    o1=MM_findObj(a[i+1].replace(/\[\d+\]/ig,""));
    v=o.value;t=a[i+2];
    if (o.type=='text'||o.type=='password'||o.type=='hidden'){
      if (r&&v.length==0){err=true}
      if (v.length>0)
      if (t==1){ //fromto
        ma=a[i+1].split('_');if(isNaN(v)||v<ma[0]/1||v > ma[1]/1){err=true}
      } else if (t==2){
        rx=new RegExp("^[\\w\.=-]+@[\\w\\.-]+\\.[a-zA-Z]{2,4}$");if(!rx.test(v))err=true;
      } else if (t==3){ // date
        ma=a[i+1].split("#");at=v.match(ma[0]);
        if(at){
          cd=(at[ma[1]])?at[ma[1]]:1;cm=at[ma[2]]-1;cy=at[ma[3]];
          dte=new Date(cy,cm,cd);
          if(dte.getFullYear()!=cy||dte.getDate()!=cd||dte.getMonth()!=cm){err=true};
        }else{err=true}
      } else if (t==4){ // time
        ma=a[i+1].split("#");at=v.match(ma[0]);if(!at){err=true}
      } else if (t==5){ // check this 2
            if(o1.length)o1=o1[a[i+1].replace(/(.*\[)|(\].*)/ig,"")];
            if(!o1.checked){err=true}
      } else if (t==6){ // the same
            if(v!=MM_findObj(a[i+1]).value){err=true}
      }
    } else
    if (!o.type&&o.length>0&&o[0].type=='radio'){
          at = a[i].match(/(.*)\[(\d+)\].*/i);
          o2=(o.length>1)?o[at[2]]:o;
      if (t==1&&o2&&o2.checked&&o1&&o1.value.length/1==0){err=true}
      if (t==2){
        oo=false;
        for(j=0;j<o.length;j++){oo=oo||o[j].checked}
        if(!oo){s+='* '+a[i+3]+'\n'}
      }
    } else if (o.type=='checkbox'){
      if((t==1&&o.checked==false)||(t==2&&o.checked&&o1&&o1.value.length/1==0)){err=true}
    } else if (o.type=='select-one'||o.type=='select-multiple'){
      if(t==1&&o.selectedIndex/1==0){err=true}
    }else if (o.type=='textarea'){
      if(v.length<a[i+1]){err=true}
    }
    if (err){s+='* '+a[i+3]+'\n'; err=false}
  }
  if (s!=''){alert('The required information is incomplete or contains errors:\t\t\t\t\t\n\n'+s)}
  document.MM_returnValue = (s=='');
}
//-->
</script>
</head>
<body onload="P7_initPM(0,0,1,-20,10)">
<div id ="outerwrapper">
<table width="840" height="75" border="0" cellpadding="0" cellspacing="0" background="../graphics/cms_bg_header.jpg">
    <tr>
      <td><img src="../graphics/menu2/sea_logo.jpg" alt="Solicitor Estate Agency Property Management" width="200" height="75" hspace="0" vspace="0" /></td>
      <td width="640" align="right" valign="bottom"><table width="0" height="70" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td colspan="11"></td>
        </tr>
        <tr>
          <td align="right"><a href="solicitor_estateagency_propertydetails.asp?pRef=<%=(property.Fields.Item("pRef").Value)%>"><img src="../graphics/easi_menu/property_details_active.jpg" alt="Property Details" name="Image12" width="62" height="70" border="0" id="Image12" onmouseover="MM_swapImage('Image12','','../graphics/easi_menu/property_details_rollover.jpg',1)" onmouseout="MM_swapImgRestore()" /></a><a href="solicitor_estateagency_propertydetails.asp"></a></td>
          <td align="right"><a href="solicitor_estateagency_createschedule.asp?pRef=<%=(property.Fields.Item("pRef").Value)%>"><img src="../graphics/easi_menu/checklists_active.jpg" alt="Checklists" width="62" height="70" border="0" id="Image4" onmouseover="MM_swapImage('Image4','','../graphics/easi_menu/checklists_rollover.jpg',1)" onmouseout="MM_swapImgRestore()" /></a></td>
          <td align="right"><a href="solicitor_estateagency_viewinglist.asp?pRef=<%=(property.Fields.Item("pRef").Value)%>"><img src="../graphics/easi_menu/viewing_appts_active.jpg" alt="Viewing Appointments" width="62" height="70" border="0" id="Image21" onmouseover="MM_swapImage('Image21','','../graphics/easi_menu/viewing_appts_rollover.jpg',1)" onmouseout="MM_swapImgRestore()" /></a><a href="solicitor_estateagency_viewinglist.asp?pRef=<%=(property.Fields.Item("pRef").Value)%>"></a></td>
          <td align="right"><img src="../graphics/easi_menu/noi_current.jpg" alt="Notes of Interest" width="62" height="70" border="0" id="Image311" /></td>
          <td align="right"><a href="solicitor_estateagency_surveyslist.asp?pRef=<%=(property.Fields.Item("pRef").Value)%>"><img src="../graphics/easi_menu/surveys_active.jpg" alt="Surveys Instructed" width="62" height="70" border="0" id="Image411" onmouseover="MM_swapImage('Image411','','../graphics/easi_menu/surveys_rollover.jpg',1)" onmouseout="MM_swapImgRestore()" /></a></td>
          <td align="right"><a href="solicitor_estateagency_offerslist.asp?pRef=<%=(property.Fields.Item("pRef").Value)%>"><img src="../graphics/easi_menu/offers_active.jpg" alt="Offers Received" width="62" height="70" border="0" id="Image511" onmouseover="MM_swapImage('Image511','','../graphics/easi_menu/offers_rollover.jpg',1)" onmouseout="MM_swapImgRestore()" /></a></td>
          <td align="right"><a href="solicitor_estateagency_createwindowcard.asp?pRef=<%=(property.Fields.Item("pRef").Value)%>"><img src="../graphics/easi_menu/merge_docs_active.jpg" alt="Merge Documents" name="Image611" width="62" height="70" border="0" id="Image611" onmouseover="MM_swapImage('Image611','','../graphics/easi_menu/merge_docs_rollover.jpg',1)" onmouseout="MM_swapImgRestore()" /></a></td>
          <td align="right"><a href="solicitor_estateagency_pdfupload.asp?pRef=<%=(property.Fields.Item("pRef").Value)%>"><img src="../graphics/easi_menu/upload_active.jpg" alt="Upload Photo/PDF" width="62" height="70" border="0" id="Image5" onmouseover="MM_swapImage('Image5','','../graphics/easi_menu/upload_rollover.jpg',1)" onmouseout="MM_swapImgRestore()" /></a></td>
          <td align="right"><a href="solicitor_estateagency_generalnotes.asp?pRef=<%=(property.Fields.Item("pRef").Value)%>"><img src="../graphics/easi_menu/general_notes_active.jpg" alt="General Notes" width="62" height="70" border="0" id="Image6" onmouseover="MM_swapImage('Image6','','../graphics/easi_menu/general_notes_rollover.jpg',1)" onmouseout="MM_swapImgRestore()" /></a></td>
          <td><a href="solicitor_estateagency_enquiries.asp?pRef=<%=(property.Fields.Item("pRef").Value)%>"><img src="../graphics/easi_menu/enquiries_active.jpg" alt="Enqruiries" width="62" height="70" border="0" id="Image7" onmouseover="MM_swapImage('Image7','','../graphics/easi_menu/enquiries_rollover.jpg',1)" onmouseout="MM_swapImgRestore()" /></a></td>
        </tr>
      </table></td>
    </tr>
  </table>
 
 
<div id="maincontent">
  <table width="100%" height="0" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td height="0" colspan="2" valign="top" background="../graphics/menu_cms_bg.gif"></td>
    </tr>
    <tr>
     <td height="30" colspan="2" valign="middle" id="searchfunction_property"><p align="right">You are logged in as <%=(user.Fields.Item("UserFirstName").Value)%> </a><%=(user.Fields.Item("UserLastName").Value)%></p></td>
    </tr>
    <tr>
      <td width="185" valign="top" bgcolor="#024B8F"><!--#include file="includes/mainnav_easi.asp" --></td>
      <td height="420" valign="top" bgcolor="#FFFFFF"><div class="highlight">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="504"><img src="../graphics/menu/viewingappointments_icon.jpg" alt="Add Viewing Appointment" name="Image1" width="60" height="48" hspace="5" border="0" align="left" id="Image1" />
              <h1>Add Note of Interest </h1>
                <h2 ><%=(property.Fields.Item("pAddress1").Value)%>, <%=(property.Fields.Item("pAddress2").Value)%>, <%=(property.Fields.Item("pTown").Value)%>, <%=(property.Fields.Item("pPostCode").Value)%></h2></td><td width="136" align="right"> </td>
          </tr>
        </table>
      </div>
         <div class="checklist"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td colspan="2" valign="top"><span class="propertydetailsstatus"><%=(property.Fields.Item("pStage").Value)%> <%=(property.Fields.Item("pClosingDate").Value)%> </span></td>
    </tr>
  <tr>
    <td width="54" valign="top"><p class="propertydetailsheading">Price: </p></td>
    <td width="596" valign="middle"> <p><%=(property.Fields.Item("pPriceType").Value)%> <%= FormatCurrency((property.Fields.Item("pPrice").Value), 0, -2, -2, -2) %><span class="propertydetailsheading"> 
        </span></p>      </td>
  </tr>
  
  <tr>
    <td valign="top"><p class="propertydetailsheading">NOI:</p></td>
    <td valign="middle"><p> Notes of Interest taken in Total </p></td>
  </tr>
</table>
 
             
 
            </div>
       <div class="checklist">
             <div id ="formcontainer">
            <form action="<%=MM_editAction%>" method="post" name="form1" id="form1" onsubmit="YY_checkform('document.form1','input_flightdeparture6','#q','0','Please select the Date of the Note of Interest','nSolFirm','q','1','Please select the Solicitor Firm making the Note of Interest','nActingSol','q','1','Please select the Solicitor Name ');return document.MM_returnValue">
              <table width="100%" height="0" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="100%" valign="top">
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
      
      <tr>
        <td width="70%" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
              
              <tr>
                <td height="25" colspan="2">    <h2>Add Note of Interest </h2>                </tr>
              <tr>
                <td height="25"><p class="propertydetailsheading"> Client's Name : 
                </p>
                <td width="73%">  <p>
                    <label><a href="solicitor_estateagency_addaddcontactpop.asp" target="addvendor"></a></label>
                  <%=(addressbook.Fields.Item("cTitle").Value)%><%=(addressbook.Fields.Item("cFirstName").Value)%><%=(addressbook.Fields.Item("cSurName").Value)%></p></td>
                </tr>
              
              
              <tr>
                <td width="27%" height="25"><p class="propertydetailsheading">Address: </p></td>
                <td><p>
                    <% If Not vendorinfo.EOF Or Not vendorinfo.BOF Then %>
                    <%=(vendorinfo.Fields.Item("cAddress1").Value) & " " & (vendorinfo.Fields.Item("cAddress2").Value) & ", " & (vendorinfo.Fields.Item("cTown").Value)%>
                    <% End If %>
                </p></td>
              </tr>
              
              <tr>
                <td height="25"><p class="propertydetailsheading">Date Note Taken: </p></td>
                <td><input name="nDate" type="text" id='input_flightdeparture6' size="12" />
                    <img src="calendarimages/dlcalendar_2.gif" alt="calendar" name="img_flightdeparture6" width="13" height="13" align="middle" id="img_flightdeparture6" />
                    <dlcalendar click_element_id="img_flightdeparture6"
            emptydate_option="true"
            hide_onselection="true"
            input_element_id="input_flightdeparture6"
            tool_tip="Click to choose flight departure date"></dlcalendar></td>
                </tr>
              <tr>
                <td height="25"><p class="propertydetailsheading">Solicitor Firm: </p></td>
                <td><select name="nSolFirm" id="nSolFirm" onchange="MM_callJS('setDynaList(arrDL1)')" TABINDEX=5>
                    <option value="NA">Please Select...</option>
                    <option value="INFORMAL">INFORMAL</option>
                              <%
While (NOT soladdressbook.EOF)
%><option value="<%=(soladdressbook.Fields.Item("cCompany").Value)%>"><%=(soladdressbook.Fields.Item("cCompany").Value)%></option>
                    <%
  soladdressbook.MoveNext()
Wend
If (soladdressbook.CursorType > 0) Then
  soladdressbook.MoveFirst
Else
  soladdressbook.Requery
End If
%>
                  </select> <label class="propertydetailscheck" onclick="MM_openBrWindow('solicitor_estateagency_addaddcontactPOP.asp','addcontact','scrollbars=yes,width=650,height=475')"><img src="../graphics/menu/addcontact_sm.jpg" alt="Add contact" width="20" height="24" align="absbottom" /><a href="solicitor_estateagency_addaddcontactpop.asp" target="addcontact">Add
 Contact</a></label></td>
              </tr>
              
              <tr>
                <td height="25"><p class="propertydetailsheading">Acting Solicitor: </p></td>
                <td><select name="nActingSolcRef" id="nActingSolcRef">
                    <option value="NA">Select Solicitor Firm</option>
                   
                          
                          </select>
                  <input name="nActingSol" type="hidden" id="nActingSol" /></td>
              </tr>
              
              <tr>
                <td height="25" valign="top"><p class="propertydetailsheading">Comments: </p></td>
                <td><textarea name="nComments" cols="40" rows="4" wrap="virtual" id="nComments" onkeyup='countIt()'  ></textarea></td>
              </tr>
              <tr>
                <td><input name="nPref" type="hidden" id="nPref" value="<%=(property.Fields.Item("pRef").Value)%>" />
                  <input name="ncRef" type="hidden" id="ncRef" value="<%=(vendorinfo.Fields.Item("cRef").Value)%>" /></td>
                <td><input name="Add Property" type="submit" class="button" onclick="YY_checkform('form1');return document.MM_returnValue" value="Complete"></td>
              </tr>
              <tr>
                <td> </td>
                <td></td>
              </tr>
            </table></td>
        <td width="30%" valign="top"><div class="viewingappointmentsrights">
          <h2>Notes of Interest Recorded</h2>
         <div id="scroller">
           <% 
While ((Repeat1__numRows <> 0) AND (NOT viewing.EOF)) 
%>
             <table width="90%" border="0" cellspacing="0" cellpadding="0">
               
               <tr>
                 <td><p class="propertydetailslist"><a href="solicitor_estateagency_notesofinterestdetails.asp?pRef=<%=(viewing.Fields.Item("nPref").Value)%>&ncRef=<%=(viewing.Fields.Item("ncRef").Value)%>&ref=<%=(viewing.Fields.Item("ref").Value)%>&sName=<%=(viewing.Fields.Item("nActingSol").Value)%>"><%=(viewing.Fields.Item("nDate").Value)%></a>
                   
                   
                   </p></td>
                          <td><p class="propertydetailslist"> </p></td>
                    </tr>
             </table>
             <% 
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  viewing.MoveNext()
Wend
%>
</div>     
          </td>
      </tr>
    </table>
   <input type="hidden" name="MM_insert" value="form2"></td>
  </tr>
  
  
</table>
        </form></div>
            
 
             
             </div>
        </td>
    </tr>
  </table>
</div>
</div>
<script>
function dl_viewOver(eElement)
{
      eElement.onmouseout = dl_viewOut;
      eElement.style.color = "blue";
}
function dl_viewOut()
{
      this.style.color = "firebrick";
}
function dl_viewSource(eElement)
{
      var eXMP=eElement.nextSibling;
      while((eXMP.nodeType==3)||(eXMP.tagName.toLowerCase()=="br")){eXMP=eXMP.nextSibling};
      if(eXMP.style.display=="block"){eXMP.style.display="none"; eElement.innerHTML="[ View Source ]";}
                                             else{eXMP.style.display="block";eElement.innerHTML="[ Hide Source ]";}
}
</script>
<script type="text/javascript" language="javascript"  src="dlcalendar.js"></script>
 
 
<!--#include file="includes/footer.asp" -->
 
 
 
</body>
</html>
<%
user.Close()
Set user = Nothing
%>
<%
vendoraddress.Close()
Set vendoraddress = Nothing
%>
<%
addressbook.Close()
Set addressbook = Nothing
%>
<%
vendorinfo.Close()
Set vendorinfo = Nothing
%>
<%
soladdressbook.Close()
Set soladdressbook = Nothing
%>
<%
solicitors.Close()
Set solicitors = Nothing
%>
<%
viewing.Close()
Set viewing = Nothing
%>
<%
property.Close()
Set property = Nothing
%>

Open in new window

IF that does not work, change:
function setHiddenField(){
      document.getElementById('nSolFirm').value=this.value;
}

to:
function setHiddenField(){
      document.getElementById('nSolFirm').value=this.options[ this.selectedIndex ].value;
}
ASKER CERTIFIED SOLUTION
Avatar of hielo
hielo
Flag of Wallis and Futuna image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial