?
Solved

Cannot format ASP with CSS

Posted on 2004-04-28
10
Medium Priority
?
186 Views
Last Modified: 2006-11-17
Hi

I have code (added at bootom of question) which draws data from a database and perfoms the query and results in the same question. I can format the code OK that is in the body tags but not the code that is in the head tag function

You can view how the page works at http://www.development-server.co.uk/russellhr2/htdocs/

The code for the page is:

<%@ Language = javascript %>
<!--#include file="../_inc/subs.inc"-->
<%
GLOBAL.MDB = "../_database/_records/data.mdb"
setMapping(GLOBAL.MDB)

function getRecordset() {
      var SQL_viewRset = new strSQL(), s="";
    SQL_viewRset.select = "SELECT tJOBS.*, tJOB_DURATIONS.DURATION_TITLE, tJOB_TYPES.JOB_TYPE_TITLE"
      SQL_viewRset.from = "FROM tSECTORS INNER JOIN (tREGIONS INNER JOIN (tJOB_TYPES INNER JOIN (tJOB_DURATIONS INNER JOIN tJOBS ON tJOB_DURATIONS.JOB_DURATION_ID = tJOBS.FK_JOB_DURATION_ID) ON tJOB_TYPES.JOB_TYPE_ID = tJOBS.FK_JOB_TYPE_ID) ON tREGIONS.REGION_ID = tJOBS.FK_REGION_ID) ON tSECTORS.SECTOR_ID = tJOBS.FK_SECTOR_ID"

      if (FF_FK_SECTOR_ID != "-1") {
            if (s!="") s+= " AND "
            s+= "(tJOBS.FK_SECTOR_ID = " + FF_FK_SECTOR_ID + ")"
      }

      if (FF_FK_JOB_DURATION_ID != "-1") {
            if (s!="") s+= " AND "
            s+= "(tJOBS.FK_JOB_DURATION_ID = " + FF_FK_JOB_DURATION_ID + ")"
      }

      if (FF_FK_JOB_TYPE_ID != "-1") {
            if (s!="") s+= " AND "
            s+= "(tJOBS.FK_JOB_TYPE_ID = " + FF_FK_JOB_TYPE_ID + ")"
      }

      if (FF_FK_REGION_ID != "-1") {
            if (s!="") s+= " AND "
            s+= "(tJOBS.FK_REGION_ID = " + FF_FK_REGION_ID + ")"
      }
      
      if (s!="") SQL_viewRset.where = "WHERE (" + s + ")"
      
      s=""
      
      if (FF_ORDERBY != "-1") {
            SQL_viewRset.orderby = "ORDER BY " + FF_ORDERBY
      }
      
      //SQL_viewRset.orderby = "ORDER BY tJOBS.JOB_REFERENCE"
      //PRINT(true,'',SQL_viewRset.SELECT())
      return openRecordset(SQL_viewRset.SELECT())
}

function getRecordset_Sectors() {
      var SQL_viewRset = new strSQL()
    SQL_viewRset.select = "SELECT DISTINCT tSECTORS.SECTOR_ID, tSECTORS.SECTOR_TITLE"
      SQL_viewRset.from = "FROM tSECTORS INNER JOIN tJOBS ON tSECTORS.SECTOR_ID = tJOBS.FK_SECTOR_ID"
      SQL_viewRset.orderby = "ORDER BY tSECTORS.SECTOR_TITLE"
      return openRecordset(SQL_viewRset.SELECT())
}

function getRecordset_Regions() {
      var SQL_viewRset = new strSQL()
    SQL_viewRset.select = "SELECT DISTINCT tREGIONS.REGION_ID, tREGIONS.REGION_TITLE"
      SQL_viewRset.from = "FROM tREGIONS INNER JOIN tJOBS ON tREGIONS.REGION_ID = tJOBS.FK_REGION_ID"
      SQL_viewRset.orderby = "ORDER BY tREGIONS.REGION_TITLE"
      return openRecordset(SQL_viewRset.SELECT())
}

function getRecordset_Job_Types() {
      var SQL_viewRset = new strSQL()
    SQL_viewRset.select = "SELECT DISTINCT tJOB_TYPES.JOB_TYPE_ID, tJOB_TYPES.JOB_TYPE_TITLE"
      SQL_viewRset.from = "FROM tJOB_TYPES INNER JOIN tJOBS ON tJOB_TYPES.JOB_TYPE_ID = tJOBS.FK_JOB_TYPE_ID"
      SQL_viewRset.orderby = "ORDER BY tJOB_TYPES.JOB_TYPE_TITLE"
      return openRecordset(SQL_viewRset.SELECT())
}

function getRecordset_Job_Duration() {
      var SQL_viewRset = new strSQL()
    SQL_viewRset.select = "SELECT DISTINCT tJOB_DURATIONS.JOB_DURATION_ID, tJOB_DURATIONS.DURATION_TITLE"
      SQL_viewRset.from = "FROM tJOB_DURATIONS INNER JOIN tJOBS ON tJOB_DURATIONS.JOB_DURATION_ID = tJOBS.FK_JOB_DURATION_ID"
      SQL_viewRset.orderby = "ORDER BY tJOB_DURATIONS.DURATION_TITLE"
      return openRecordset(SQL_viewRset.SELECT())
}

function getHTML_Records() {
      var s=""
      
      if (rR.Recordcount>0) {
            rR.MoveFirst()
            s+="<table border=1 cellspacing=0 cellpadding=2 width=280>\n"
            s+="<tr><td><b>Location</b></td> <td><b>Title</b></td> <td><b>Details</b></td> <td><b>Type</b></td><td><b>Salary</b></td> <td></td></tr>\n"
            while (!rR.Eof) {
                  //00456, ABERDEEN, Chef ,  Large Hotel - City Centre, £20,000k, Contact: Anne Agent
                  s+="<tr>"
                  s+="<td>" + rR("JOB_LOCATION") + "</td>"
                  s+="<td>" + rR("JOB_TITLE") + "</td>"
                  s+="<td>" + rR("JOB_DESC_SHORT") + "</td>"
                  s+="<td>" + rR("JOB_TYPE_TITLE") + "</td>"
                  s+="<td>" + rR("SALARY") + "</td>"
                  s+="<td>[ <a href='###' onclick='goPopupMore(" + rR("JOB_ID") + ")'>more details</a> ]</td>"
                  s+="</tr>\n"
                  rR.MoveNext()
            }
            s+="</table>\n"
      } else {
            s="No records found, try again."
      }
      
      return s
}
function getHTML_Sectors(FK_SECTOR_ID,formName) {
      var s='', fSec = rSec.Fields;
      if (rSec.Recordcount>0) {
            rSec.MoveFirst()
            s+='<select name="FK_SECTOR_ID" style="width:100;" !onchange="CheckUserSearch(document.forms.' + formName + ')">\n'
            s+='<option value="-1">Select All\n'
            while (!rSec.Eof) {
                  if (FK_SECTOR_ID == fSec("SECTOR_ID").value) {
                        s+='<option value="' + fSec("SECTOR_ID") + '" selected>' + fSec("SECTOR_TITLE") + '\n'
                  } else {
                        s+='<option value="' + fSec("SECTOR_ID") + '">' + fSec("SECTOR_TITLE") + '\n'
                  }
                  rSec.MoveNext()
            }
            s+='</select>\n'
      }
      return s
}

function getHTML_Job_Type(FK_JOB_TYPE_ID,formName) {
      var s='', fJT = rJT.Fields;
      if (rJT.Recordcount>0) {
            rJT.MoveFirst()
            s+='<select name="FK_JOB_TYPE_ID" style="width:100;" !onchange="CheckUserSearch(document.forms.' + formName + ')">\n'
            s+='<option value="-1">Select All\n'
            while (!rJT.Eof) {
                  if (FK_JOB_TYPE_ID == fJT("JOB_TYPE_ID").value) {
                        s+='<option value="' + fJT("JOB_TYPE_ID") + '" selected>' + fJT("JOB_TYPE_TITLE") + '\n'
                  } else {
                        s+='<option value="' + fJT("JOB_TYPE_ID") + '">' + fJT("JOB_TYPE_TITLE") + '\n'
                  }
                  rJT.MoveNext()
            }
            s+='</select>\n'
      }
      return s
}

function getHTML_Job_Duration(FK_JOB_DURATION_ID,formName) {
      var s='', fJD = rJD.Fields;
      if (rJD.Recordcount>0) {
            rJD.MoveFirst()
            s+='<select name="FK_JOB_DURATION_ID" style="width:100;" !onchange="CheckUserSearch(document.forms.' + formName + ')">\n'
            s+='<option value="-1">Select All\n'
            while (!rJD.Eof) {
                  if (FK_JOB_DURATION_ID == fJD("JOB_DURATION_ID").value) {
                        s+='<option value="' + fJD("JOB_DURATION_ID") + '" selected>' + fJD("DURATION_TITLE") + '\n'
                  } else {
                        s+='<option value="' + fJD("JOB_DURATION_ID") + '">' + fJD("DURATION_TITLE") + '\n'
                  }
                  rJD.MoveNext()
            }
            s+='</select>\n'
      }
      return s
}

function getHTML_Regions(FK_REGION_ID,formName) {
      var s='', fReg = rReg.Fields;
      if (rReg.Recordcount>0) {
            rReg.MoveFirst()
            s+='<select name="FK_REGION_ID" style="width:100;" !onchange="CheckUserSearch(document.forms.' + formName + ')">\n'
            s+='<option value="-1">Select All\n'
            while (!rReg.Eof) {
                  if (FK_REGION_ID == fReg("REGION_ID").value) {
                        s+='<option value="' + fReg("REGION_ID") + '" selected>' + fReg("REGION_TITLE") + '\n'
                  } else {
                        s+='<option value="' + fReg("REGION_ID") + '">' + fReg("REGION_TITLE") + '\n'
                  }
                  rReg.MoveNext()
            }
            s+='</select>\n'
      }
      return s
}

//main
var      rR, rReg, rSec, rJT, rJD, bGotForm = false, bGotQueryForm = false;

bGotForm = getFormVars()
if ((typeof(FF_bDO_SEARCH)!="undefined") || (typeof(FF_bDO_ORDER)!="undefined")) bGotQueryForm = true

if (bGotForm) rR = getRecordset()
rReg = getRecordset_Regions()
rSec = getRecordset_Sectors()
rJT = getRecordset_Job_Types()
rJD = getRecordset_Job_Duration()
%>
<html>
<head>
      <title>Russell</title>
      <LINK REL=STYLESHEET  HREF="_css/common.css" TYPE="text/css">
<script language="javascript" src="_javascript/commonV1_2.js"></script>
<script language="javascript">
function resetSearch() {
      var myform = document.forms.search
      myform.FK_SECTOR_ID.selectedIndex=0
      //myform.FK_JOB_DURATION_ID.selectedIndex=0
      //myform.FK_JOB_TYPE_ID.selectedIndex=0
      myform.FK_REGION_ID.selectedIndex=0
      myform.ORDERBY.selectedIndex=0
}

function goPopupMore(iJobID) {
      var mypopup = new winPopup()
      mypopup.sFileName = 'morepopup.asp?iJobID=' + iJobID
      mypopup.sWindowName = 'More'
      mypopup.iWidth = 660
      mypopup.iHeight = 500
      mypopup.bMenubar = true
      mypopup.bLocation = false
      mypopup.bToolbar = false
      mypopup.bStatus = false
      mypopup.Open()
}
</script>
</head>

<body bgcolor="#ffffff">
<div style="position:absolute;left:10;top:30;">
<table border=0 cellspacing=0 cellpadding=0>
<tr>
      <td valign="top">SEARCH<br>
      <form action="index.asp" method="post" name="search">
      <input type="hidden" name="FK_JOB_TYPE_ID" value="-1">
      <input type="hidden" name="FK_JOB_DURATION_ID" value="-1">
      <table border=1 cellspacing=0 cellpadding=0 width=280>
      <tr><td colspan="5"><select name="ORDERBY"><option value="-1">Order By...<option value="tJOBS.JOB_TITLE" <%if (bGotForm && (FF_ORDERBY=="tJOBS.JOB_TITLE")) PRINT(false,'','selected')%>>Job Title<option value="tJOBS.SALARY" <%if (bGotForm && (FF_ORDERBY=="tJOBS.SALARY")) PRINT(false,'','selected')%>>Salary<option value="tJOBS.JOB_LOCATION" <%if (bGotForm && (FF_ORDERBY=="tJOBS.JOB_LOCATION")) PRINT(false,'','selected')%>>Location</select></td></tr>
      <tr valign="middle">
      <td>Sector:</td>
      <td><%if (bGotForm) {var iFK_SECTOR_ID=FF_FK_SECTOR_ID} else {var iFK_SECTOR_ID=-1} ;PRINT(false,"",getHTML_Sectors(iFK_SECTOR_ID,""))%></td>
      <!--td>Job Duration:</td>
      <td><%if (bGotForm) {var iFK_JOB_DURATION_ID=FF_FK_JOB_DURATION_ID} else {var iFK_FK_JOB_DURATION_ID=-1} ;PRINT(false,"",getHTML_Job_Duration(iFK_JOB_DURATION_ID,""))%></td>
      <td>Job Type:</td>
      <td><%if (bGotForm) {var iFK_JOB_TYPE_ID=FF_FK_JOB_TYPE_ID} else {var iFK_FK_JOB_TYPE_ID=-1} ;PRINT(false,"",getHTML_Job_Type(iFK_JOB_TYPE_ID,""))%></td-->
      <td>Region:</td>
      <td><%if (bGotForm) {var iFK_REGION_ID=FF_FK_REGION_ID} else {var iFK_FK_REGION_ID=-1} ;PRINT(false,"",getHTML_Regions(iFK_REGION_ID,""))%></td>
      <td><input type="submit" value="Go Search">&nbsp;<input type="button" value="Reset" onclick="resetSearch()"></td>
      </tr>
      </table>
      </form>
      </td>
      
      </tr>
      <tr>

<%
if (bGotForm) {
%>
      <td valign="top"><%=getHTML_Records()%></td>
<%
} else {
%>
      <td valign="top">Select from search and press button, or just press button for all jobs</td>
<%
}
%>
</tr>

<tr>
<td>
<hr>
<a href="events.asp?iTypeID=1">Events</a><br><a href="events.asp?iTypeID=2">News</a></td>
<td></td>
<td></td>
</tr>
</table>



</div>
</body>
</html>
<%
closeRsets()
%>
0
Comment
Question by:fusionless
  • 6
  • 4
10 Comments
 
LVL 7

Expert Comment

by:chisholmd
ID: 10945968
I have re-read your post a few times and I can't figure out what you are having trouble with.

What exactly is not happeneing the way you want or what error are you getting?

You mention CSS is your reference to the style sheet not working?

Please post what the problem is.
0
 

Author Comment

by:fusionless
ID: 10946647
i am sorry my post is not clear. The problem I face is more apparant when I format the table in the body tags. If you run the script from the page http://www.development-server.co.uk/russellhr2/htdocs/vacancies_copy.asp you can see that initially the fonts and page colour are formatted but loose all of this when the results are returned from the database.

Thanks
0
 
LVL 7

Expert Comment

by:chisholmd
ID: 10946772
tables don't inherit from body so if you have style assigned to body assign it to table as well

0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 

Author Comment

by:fusionless
ID: 10946879
Hi there,

I think I have realised this, I have tried to attribute classes to everything possible in the the head tag, with no luck.

My current code looks like this:


<%@ Language = javascript %>
<!--#include file="../_inc/subs.inc"-->
<%
GLOBAL.MDB = "../_private/_data/data.mdb"
setMapping(GLOBAL.MDB)

function getRecordset() {
      var SQL_viewRset = new strSQL(), s="";
    SQL_viewRset.select = "SELECT tJOBS.*, tJOB_DURATIONS.DURATION_TITLE, tJOB_TYPES.JOB_TYPE_TITLE"
      SQL_viewRset.from = "FROM tSECTORS INNER JOIN (tREGIONS INNER JOIN (tJOB_TYPES INNER JOIN (tJOB_DURATIONS INNER JOIN tJOBS ON tJOB_DURATIONS.JOB_DURATION_ID = tJOBS.FK_JOB_DURATION_ID) ON tJOB_TYPES.JOB_TYPE_ID = tJOBS.FK_JOB_TYPE_ID) ON tREGIONS.REGION_ID = tJOBS.FK_REGION_ID) ON tSECTORS.SECTOR_ID = tJOBS.FK_SECTOR_ID"

      if (FF_FK_SECTOR_ID != "-1") {
            if (s!="") s+= " AND "
            s+= "(tJOBS.FK_SECTOR_ID = " + FF_FK_SECTOR_ID + ")"
      }

      if (FF_FK_JOB_DURATION_ID != "-1") {
            if (s!="") s+= " AND "
            s+= "(tJOBS.FK_JOB_DURATION_ID = " + FF_FK_JOB_DURATION_ID + ")"
      }

      if (FF_FK_JOB_TYPE_ID != "-1") {
            if (s!="") s+= " AND "
            s+= "(tJOBS.FK_JOB_TYPE_ID = " + FF_FK_JOB_TYPE_ID + ")"
      }

      if (FF_FK_REGION_ID != "-1") {
            if (s!="") s+= " AND "
            s+= "(tJOBS.FK_REGION_ID = " + FF_FK_REGION_ID + ")"
      }
      
      if (s!="") SQL_viewRset.where = "WHERE (" + s + ")"
      
      s=""
      
      if (FF_ORDERBY != "-1") {
            SQL_viewRset.orderby = "ORDER BY " + FF_ORDERBY
      }
      
      //SQL_viewRset.orderby = "ORDER BY tJOBS.JOB_REFERENCE"
      //PRINT(true,'',SQL_viewRset.SELECT())
      return openRecordset(SQL_viewRset.SELECT())
}

function getRecordset_Sectors() {
      var SQL_viewRset = new strSQL()
    SQL_viewRset.select = "SELECT DISTINCT tSECTORS.SECTOR_ID, tSECTORS.SECTOR_TITLE"
      SQL_viewRset.from = "FROM tSECTORS INNER JOIN tJOBS ON tSECTORS.SECTOR_ID = tJOBS.FK_SECTOR_ID"
      SQL_viewRset.orderby = "ORDER BY tSECTORS.SECTOR_TITLE"
      return openRecordset(SQL_viewRset.SELECT())
}

function getRecordset_Regions() {
      var SQL_viewRset = new strSQL()
    SQL_viewRset.select = "SELECT DISTINCT tREGIONS.REGION_ID, tREGIONS.REGION_TITLE"
      SQL_viewRset.from = "FROM tREGIONS INNER JOIN tJOBS ON tREGIONS.REGION_ID = tJOBS.FK_REGION_ID"
      SQL_viewRset.orderby = "ORDER BY tREGIONS.REGION_TITLE"
      return openRecordset(SQL_viewRset.SELECT())
}

function getRecordset_Job_Types() {
      var SQL_viewRset = new strSQL()
    SQL_viewRset.select = "SELECT DISTINCT tJOB_TYPES.JOB_TYPE_ID, tJOB_TYPES.JOB_TYPE_TITLE"
      SQL_viewRset.from = "FROM tJOB_TYPES INNER JOIN tJOBS ON tJOB_TYPES.JOB_TYPE_ID = tJOBS.FK_JOB_TYPE_ID"
      SQL_viewRset.orderby = "ORDER BY tJOB_TYPES.JOB_TYPE_TITLE"
      return openRecordset(SQL_viewRset.SELECT())
}

function getRecordset_Job_Duration() {
      var SQL_viewRset = new strSQL()
    SQL_viewRset.select = "SELECT DISTINCT tJOB_DURATIONS.JOB_DURATION_ID, tJOB_DURATIONS.DURATION_TITLE"
      SQL_viewRset.from = "FROM tJOB_DURATIONS INNER JOIN tJOBS ON tJOB_DURATIONS.JOB_DURATION_ID = tJOBS.FK_JOB_DURATION_ID"
      SQL_viewRset.orderby = "ORDER BY tJOB_DURATIONS.DURATION_TITLE"
      return openRecordset(SQL_viewRset.SELECT())
}

function getHTML_Records() {
      var s=""
      
      if (rR.Recordcount>0) {
            rR.MoveFirst()
            s+="<table border=1 cellspacing=0 cellpadding=2 width=280 class=dropdown1>\n"
            s+="<tr><td class=dropdown1><b>Location</b></td> <td class=dropdown1><b>Title</b></td> <td class=dropdown1><b>Details</b></td> <td class=dropdown1><b>Type</b></td><td class=dropdown1><b>Salary</b></td> <td></td></tr>\n"
            while (!rR.Eof) {
                  //00456, ABERDEEN, Chef ,  Large Hotel - City Centre, £20,000k, Contact: Anne Agent
                  s+="<tr class=dropdown1>"
                  s+="<td class=dropdown1>" + rR("JOB_LOCATION") + "</td>"
                  s+="<td class=dropdown1>" + rR("JOB_TITLE") + "</td>"
                  s+="<td class=dropdown1>" + rR("JOB_DESC_SHORT") + "</td>"
                  s+="<td class=dropdown1>" + rR("JOB_TYPE_TITLE") + "</td>"
                  s+="<td class=dropdown1>" + rR("SALARY") + "</td>"
                  s+="<td class=dropdown1>[ <a href='###' onclick='goPopupMore(" + rR("JOB_ID") + ")'>more details</a> ]</td>"
                  s+="</tr>\n"
                  rR.MoveNext()
            }
            s+="</table>\n"
      } else {
            s="No records found, try again."
      }
      
      return s
}
function getHTML_Sectors(FK_SECTOR_ID,formName) {
      var s='', fSec = rSec.Fields;
      if (rSec.Recordcount>0) {
            rSec.MoveFirst()
            s+='<select class=dropdown1  name="FK_SECTOR_ID" style="width:100;" !onchange="CheckUserSearch(document.forms.' + formName + ')">\n'
            s+='<option value="-1">Select All\n'
            while (!rSec.Eof) {
                  if (FK_SECTOR_ID == fSec("SECTOR_ID").value) {
                        s+='<option value="' + fSec("SECTOR_ID") + '" selected>' + fSec("SECTOR_TITLE") + '\n'
                  } else {
                        s+='<option value="' + fSec("SECTOR_ID") + '">' + fSec("SECTOR_TITLE") + '\n'
                  }
                  rSec.MoveNext()
            }
            s+='</select>\n'
      }
      return s
}

function getHTML_Job_Type(FK_JOB_TYPE_ID,formName) {
      var s='', fJT = rJT.Fields;
      if (rJT.Recordcount>0) {
            rJT.MoveFirst()
            s+='<select class=dropdown1  name="FK_JOB_TYPE_ID" style="width:100;" !onchange="CheckUserSearch(document.forms.' + formName + ')">\n'
            s+='<option value="-1">Select All\n'
            while (!rJT.Eof) {
                  if (FK_JOB_TYPE_ID == fJT("JOB_TYPE_ID").value) {
                        s+='<option value="' + fJT("JOB_TYPE_ID") + '" selected>' + fJT("JOB_TYPE_TITLE") + '\n'
                  } else {
                        s+='<option value="' + fJT("JOB_TYPE_ID") + '">' + fJT("JOB_TYPE_TITLE") + '\n'
                  }
                  rJT.MoveNext()
            }
            s+='</select>\n'
      }
      return s
}

function getHTML_Job_Duration(FK_JOB_DURATION_ID,formName) {
      var s='', fJD = rJD.Fields;
      if (rJD.Recordcount>0) {
            rJD.MoveFirst()
            s+='<select class=dropdown1  name="FK_JOB_DURATION_ID" style="width:100;" !onchange="CheckUserSearch(document.forms.' + formName + ')">\n'
            s+='<option value="-1">Select All\n'
            while (!rJD.Eof) {
                  if (FK_JOB_DURATION_ID == fJD("JOB_DURATION_ID").value) {
                        s+='<option class=dropdown1 value="' + fJD("JOB_DURATION_ID") + '" selected>' + fJD("DURATION_TITLE") + '\n'
                  } else {
                        s+='<option class=dropdown1 value="' + fJD("JOB_DURATION_ID") + '">' + fJD("DURATION_TITLE") + '\n'
                  }
                  rJD.MoveNext()
            }
            s+='</select>\n'
      }
      return s
}

function getHTML_Regions(FK_REGION_ID,formName) {
      var s='', fReg = rReg.Fields;
      if (rReg.Recordcount>0) {
            rReg.MoveFirst()
            s+='<select class=dropdown1 name="FK_REGION_ID" style="width:100;" !onchange="CheckUserSearch(document.forms.' + formName + ')">\n'
            s+='<option value="-1">Select All\n'
            while (!rReg.Eof) {
                  if (FK_REGION_ID == fReg("REGION_ID").value) {
                        s+='<option class=dropdown1 value="' + fReg("REGION_ID") + '" selected>' + fReg("REGION_TITLE") + '\n'
                  } else {
                        s+='<option class=dropdown1 value="' + fReg("REGION_ID") + '">' + fReg("REGION_TITLE") + '\n'
                  }
                  rReg.MoveNext()
            }
            s+='</select>\n'
      }
      return s
}

//main
var      rR, rReg, rSec, rJT, rJD, bGotForm = false, bGotQueryForm = false;

bGotForm = getFormVars()
if ((typeof(FF_bDO_SEARCH)!="undefined") || (typeof(FF_bDO_ORDER)!="undefined")) bGotQueryForm = true

if (bGotForm) rR = getRecordset()
rReg = getRecordset_Regions()
rSec = getRecordset_Sectors()
rJT = getRecordset_Job_Types()
rJD = getRecordset_Job_Duration()
%>
<html>
<head>
<LINK REL=STYLESHEET  HREF="_css/common.css" TYPE="text/css">
<script language="javascript" src="_javascript/commonV1_2.js"></script>
<script language="javascript">
function resetSearch() {
      var myform = document.forms.search
      myform.FK_SECTOR_ID.selectedIndex=0
      //myform.FK_JOB_DURATION_ID.selectedIndex=0
      //myform.FK_JOB_TYPE_ID.selectedIndex=0
      myform.FK_REGION_ID.selectedIndex=0
      myform.ORDERBY.selectedIndex=0
}

function goPopupMore(iJobID) {
      var mypopup = new winPopup()
      mypopup.sFileName = 'morepopup.asp?iJobID=' + iJobID
      mypopup.sWindowName = 'More'
      mypopup.iWidth = 660
      mypopup.iHeight = 500
      mypopup.bMenubar = true
      mypopup.bLocation = false
      mypopup.bToolbar = false
      mypopup.bStatus = false
      mypopup.Open()
}
</script>
<!--#include file="../copy_include2.txt"--->
      <title>Untitled</title>
</head>

<body bgcolor="#FFEFE5">

<div id="divControl" style="top: 0px; left: 300px">
  <table border="0" cellpadding="0" cellspacing="0" width="25" bgcolor="#F1D8D4">
<tr>
<td>
<img src="../scroll_bar/spacer.gif" width="2" height="290" border="0">
</td>
</tr>
<tr><td>
<table border="0" cellpadding="0" cellspacing="0" width="25">
    <!-- fwtable fwsrc="sub_template.png" fwbase="candidates_scroll.gif" fwstyle="Dreamweaver" fwdocid = "742308039" fwnested="0" -->
    <tr>
      <td><img src="../scroll_bar/spacer.gif" width="2" height="1" border="0"></td>
      <td><img src="../scroll_bar/spacer.gif" width="1" height="1" border="0"></td>
      <td><img src="../scroll_bar/spacer.gif" width="17" height="1" border="0"></td>
      <td><img src="../scroll_bar/spacer.gif" width="2" height="1" border="0"></td>
      <td><img src="../scroll_bar/spacer.gif" width="3" height="1" border="0"></td>
      <td><img src="../scroll_bar/spacer.gif" width="1" height="1" border="0"></td>
    </tr>
    <tr>
      <td colspan="5"><img name="candidates_scroll_r1_c1" src="../scroll_bar/candidates_scroll_r1_c1.gif" width="25" height="1" border="0"></td>
      <td><img src="../scroll_bar/spacer.gif" width="1" height="1" border="0"></td>
    </tr>
    <tr>
      <td rowspan="2"><img name="candidates_scroll_r2_c1" src="../scroll_bar/candidates_scroll_r2_c1.gif" width="2" height="29" border="0"></td>
            <td colspan="3"><a href="#" onmouseover="scroll(3)" onmouseout="noScroll()"><img name="candidates_scroll_r2_c2" src="../scroll_bar/candidates_scroll_r2_c2.gif" width="20" height="13" border="0"></a></td>
      <td rowspan="2"><img name="candidates_scroll_r2_c5" src="../scroll_bar/candidates_scroll_r2_c5.gif" width="3" height="29" border="0"></td>
      <td><img src="../scroll_bar/spacer.gif" width="1" height="13" border="0"></td>
    </tr>
    <tr>
      <td><img name="candidates_scroll_r3_c2" src="../scroll_bar/candidates_scroll_r3_c2.gif" width="1" height="16" border="0"></td>
            <td><a href="#" onmouseover="scroll(-3)" onmouseout="noScroll()"><img name="candidates_scroll_r3_c3" src="../scroll_bar/candidates_scroll_r3_c3.gif" width="17" height="16" border="0"></a></td>
      <td><img name="candidates_scroll_r3_c4" src="../scroll_bar/candidates_scroll_r3_c4.gif" width="2" height="16" border="0"></td>
      <td><img src="../scroll_bar/spacer.gif" width="1" height="16" border="0"></td>
    </tr>
  </table>
      </td>
      </tr>
      <tr>
<td>
<img src="../scroll_bar/spacer.gif" width="2" height="10" border="0">
</td>
</tr>
      </table>
</div>
<div id="divCont" class="dropdown1">
  <div id="divScroll1" > 
    <table border=0 cellspacing=0 cellpadding=0 class=dropdown1>
      <tr>
        <td valign="top">SEARCH
          <form action="index.asp" method="post" name="search">
            <input type="hidden" name="FK_JOB_TYPE_ID" value="-1">
            <input type="hidden" name="FK_JOB_DURATION_ID" value="-1">
            <table border=0 cellspacing=0 cellpadding=2 width=280 class=dropdown1>
              <tr>
                <td class=dropdown1> </td>
                <td class=dropdown1>
                  <select class=dropdown1 name="ORDERBY">
                    <option value="-1">Order By...
                    <option value="tJOBS.JOB_TITLE" <%if (bGotForm && (FF_ORDERBY=="tJOBS.JOB_TITLE")) PRINT(false,'','selected')%>>Job
                    Title
                    <option value="tJOBS.SALARY" <%if (bGotForm && (FF_ORDERBY=="tJOBS.SALARY")) PRINT(false,'','selected')%>>Salary
                    <option value="tJOBS.JOB_LOCATION" <%if (bGotForm && (FF_ORDERBY=="tJOBS.JOB_LOCATION")) PRINT(false,'','selected')%>>Location
                  </select>
                </td>
              </tr>
              <tr valign="middle">
                <td class=dropdown1>Sector:</td>
                <td class=dropdown1>
                  <%if (bGotForm) {var iFK_SECTOR_ID=FF_FK_SECTOR_ID} else {var iFK_SECTOR_ID=-1} ;PRINT(false,"",getHTML_Sectors(iFK_SECTOR_ID,""))%>
                </td>
                <!--td>Job Duration:</td>
      <td><%if (bGotForm) {var iFK_JOB_DURATION_ID=FF_FK_JOB_DURATION_ID} else {var iFK_FK_JOB_DURATION_ID=-1} ;PRINT(false,"",getHTML_Job_Duration(iFK_JOB_DURATION_ID,""))%></td>
      <td>Job Type:</td>
      <td><%if (bGotForm) {var iFK_JOB_TYPE_ID=FF_FK_JOB_TYPE_ID} else {var iFK_FK_JOB_TYPE_ID=-1} ;PRINT(false,"",getHTML_Job_Type(iFK_JOB_TYPE_ID,""))%></td-->
      </tr>
      <tr>
                <td class=dropdown1>Region:</td>
                <td class=dropdown1>
                 <span class=dropdown1> <%if (bGotForm) {var iFK_REGION_ID=FF_FK_REGION_ID} else {var iFK_FK_REGION_ID=-1} ;PRINT(false,"",getHTML_Regions(iFK_REGION_ID,""))%></span>
                </td>
              </tr>
              <tr>
                <td></td>
                <td>
                  <input type="submit" value="Go Search" class=dropdown1 >
                  &nbsp;
                  <!---input type="button" value="Reset" onclick="resetSearch()"--->
                </td>
              </tr>
            </table>
          </form>
        </td>
      </tr>
      <tr>
        <%
if (bGotForm) {
%>
        <td valign="top" class="dropdown1"><%=getHTML_Records()%></td>
        <%
} else {
%>
        <td valign="top" class="dropdown1">Select from search and press button, or just press button
          for all jobs</td>
        <%
}
%>
      </tr>
      <tr>
        <td>
          <hr>
          <a href="events.asp?iTypeID=1">Events</a><br>
          <a href="events.asp?iTypeID=2">News</a></td>
        <td></td>
        <td></td>
      </tr>
    </table>
  </div>
  <div id="divScroll2" class="clScroll"> </div>
  <div id="divScroll3" class="clScroll"> <br>
  </div>
  <div id="divScroll4" class="clScroll"> </div>
</div>



</body>
</html>
<%
closeRsets()
%>
0
 
LVL 7

Expert Comment

by:chisholmd
ID: 10946956
So I am looking at

http://www.development-server.co.uk/russellhr2/htdocs/index.asp

whatis it about the style you don't like?
0
 
LVL 7

Expert Comment

by:chisholmd
ID: 10946962
When I look at that pages source, I don't see any classes or styles applied to the table or any of it's cells.
0
 

Author Comment

by:fusionless
ID: 10947002
When the results arte returned the format of the page should stay as the one before (search panel etc.) I have done a view source and agree with you that there are no styles attributed to the tables. The question is why not? If you look at the page code posted above I seem to have attibuted the style dropdown1 to lots of elements with no luck.

Help
0
 
LVL 7

Expert Comment

by:chisholmd
ID: 10950398
I just checked your link and it looks like you solved it. Why was it not writing your style attrib's?  Something simply like the file not uploading?
0
 

Author Comment

by:fusionless
ID: 10959745
it was my stupidity, I had renamed the page but not the process form name and so it was calling the original unformatted page, you live and learn.
0
 
LVL 7

Accepted Solution

by:
chisholmd earned 500 total points
ID: 10960952
true true there have been times that I have wasted half an hour before figureing out that I was editing one file but uploading another and could figure out why my function wasn't working :)
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
There is a wide range of advantages associated with the use of ASP.NET. This is why this programming framework is used to create excellent enterprise-class websites, technologies, and web applications.
Planning to migrate your EDB file(s) to a new or an existing Outlook PST file? This video will guide you how to convert EDB file(s) to PST. Besides this, it also describes, how one can easily search any item(s) from multiple folders or mailboxes…
The video provides a quick and easy steps to migrate MBOX file to well known Outlook PST and Office 365. Besides this, it also supports and migrates more than 20 email clients of MBOX which include AppleMail, Opera, Thunderbird and SeaMonkey effortl…

601 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question