display in the correct position

Results 1 to 3 of 3

Thread: display in the correct position

  1. #1
    Join Date
    Dec 1969

    Default display in the correct position

    Hi,<BR>I had a problem in displaying the contents in the right position. <BR>EG:<BR>----------------------------------------------------------------<BR>Name pref1 pref2 pref3 pref4 Dual<BR>----------------------------------------------------------------<BR>xyz 1234 1234 1234 1234 Dual<BR>xch 1234 1234 Dual<BR>der 1234 1234 1234 Dual<BR>----------------------------------------------------------------<BR><BR>Using my asp code i did a course list. If the applicant had 2 applicantions it will display dual in the dual column. My problem here is if the applicant has all the preferences then dual is displayed in the dual column but if he had less than maximum Dual is displaying in pref column.<BR>using asp can we do any thing... if not i need to change my whole code...<BR><BR>Any help is much appreciated.<BR><BR>just in case my code is here:<BR><BR><BR>------------------------------------------------------------------------------------------------------------------------------------------<BR>Names Ref Num CAS P OAS Offer Res Pref 1 Pref 2 Pref 3 Pref 4 Pref 5 Pref 6 Dual <BR>------------------------------------------------------------------------------------------------------------------------------------------<BR>&#060;%<BR><BR>Do While Not RS.EOF<BR> Dim RefNum<BR> HoldApplicRefNumber = RS("APPL_REF_NUM")<BR> RefNum = left(HoldApplicRefNumber, 2)<BR> <BR> If HoldApplicRefNumber &#060;&#062; PreviousApplicRefNumber Then<BR><BR> If PreviousApplicRefNumber &#060;&#062; "" Then<BR> Response.Write vbCrLf<BR> End If<BR> <BR> PreviousApplicRefNumber = HoldApplicRefNumber<BR> <BR> CountOfStudents = CountOfStudents + 1<BR> <BR> Dim HoldGivenNames<BR> HoldGivenNames = Trim(RS("APPL_FAMILY_NAME"))&",&nbsp;"& Trim(RS("APPL_GIVEN_NAME_1"))<BR> If Len(HoldGivenNames) &#062;= 25 then<BR> HoldGivenNames = Left(HoldGivenNames, 25)<BR> Else<BR> Dim HoldGivenLength<BR> HoldGivenLength = Len(HoldGivenNames)<BR> HoldGivenNames = HoldGivenNames & String(25 - HoldGivenLength, " ")<BR> End If<BR><BR> Response.Write HoldGivenNames<BR> Response.Write " "<BR> <BR> Response.Write HoldApplicRefNumber<BR> Response.Write " "<BR> <BR> Dim prior<BR> prior = "" <BR> If RS("APPL_REF_NUM") &#060;&#062; prior Then <BR> prior = RS("APPL_REF_NUM")<BR> <BR> Dim prefcasvalue<BR> <BR> prefcasvalue = RS("PREF_CAS_VALUE")<BR> If prefcasvalue = "N " then<BR> Response.Write "No "<BR> else<BR> Response.Write "Yes "<BR> End if<BR> <BR> Response.Write RS("PREF_PREF_NUMBER")<BR> Response.Write " "<BR> <BR> Response.Write RS("APPL_OAS")<BR> Response.Write " "<BR> <BR> <BR> If RS("PREF_IS_OFFER_IND") = "Y" then<BR> Response.Write RS("PREF_COURSE_CODE") & "&nbsp;"<BR> Else<BR> Response.Write " "<BR> End if <BR> <BR> <BR> Response.Write RS("PREF_OFFER_RESP_CODE") <BR> Response.Write " " <BR> <BR> End if<BR> End If<BR> <BR> <BR>Dim course, title<BR>course = Request.QueryString("Course")<BR>title = trim(RS("PREF_COURSE_TITLE")) %&#062;<BR><BR>&#060;% <BR>&#039;**************************************** ******************************************** <BR>&#039; For displaying the preferences <BR> <BR>Dim RSpref<BR>Dim PrefCourseCode<BR><BR> sql = "SELECT PREF_COURSE_CODE, PREF_REF_NUM FROM " & SatacPreferencesTable<BR> sql = sql & " WHERE PREF_REF_NUM = &#039;" & RS("APPL_REF_NUM") & "&#039;"<BR> sql = sql & " ORDER BY PREF_REF_NUM"<BR><BR>Set RSpref = Server.CreateObject("ADODB.Recordset")<BR>RSpref.A ctiveConnection = Conn<BR>RSpref.CursorType = adOpenForwardOnly<BR>RSpref.Open sql<BR><BR> Do While Not RSpref.EOF<BR> PrefCourseCode = RSpref("PREF_COURSE_CODE")%&#062;<BR> <BR> &#060;%Response.Write PrefCourseCode & "&nbsp;" %&#062;<BR> <BR>&#060;%<BR> RSpref.MoveNext<BR> Loop<BR>%&#062;<BR><BR>&#060;%<BR>RSpref.Close<BR> Set RSpref = Nothing<BR><BR>&#039;***************************** ************************************************** *<BR><BR><BR><BR>&#039;*************************** ************************************************** <BR>&#039;for displaying fact codes<BR><BR><BR>Dim RSfact, factclass<BR><BR> sql = "SELECT * FROM " & SatacFactTable<BR> sql = sql & " WHERE FACT_REF_NUM = &#039;" & RS("APPL_REF_NUM") & "&#039;"<BR> sql = sql & " AND FACT_CODE = &#039;DUALA&#039; "<BR><BR>Set RSfact = Server.CreateObject("ADODB.Recordset")<BR>RSfact.A ctiveConnection = Conn<BR>RSfact.CursorType = adOpenForwardOnly<BR>RSfact.Open sql<BR><BR> Do While Not RSfact.EOF %&#062;<BR><BR>&#060;%<BR>If RSfact("FACT_CODE") = "DUALA" then <BR> Response.Write "DUAL" <BR><BR><BR>End if<BR> RSfact.MoveNext<BR> Loop<BR><BR>RSfact.Close<BR>Set RSfact = Nothing<BR><BR>&#039;***************************** ************************************************<B R><BR><BR><BR>RS.MoveNext<BR>Loop<BR><BR>%&#062;<B R><BR><BR> Total applicants for Course:&#060;%Response.Write course & " - " & title & " = " & CountOfStudents%&#062;<BR>&#060;/pre&#062;<BR>&#060;/font&#062;<BR><BR>&#060;%<BR>End if<BR>RS.Close<BR>Set RS = Nothing<BR>Conn.Close<BR>Set Conn = Nothing <BR>%&#062;<BR>

  2. #2
    Join Date
    Dec 1969

    Default Spaces do NOT work in HTML!

    No matter how many adjacent spaces you have, they are all crunched down to *ONE* space.<BR><BR>You *can* use &amp;nbsp; to avoid that (Non Breaking SPace), but that doesn&#039;t work to space things out right unless you are using a fixed width font (Courier!).<BR><BR>LEARN TO USE TABLES!<BR><BR>If you put each row in &#060;TR&#062;....&#060;/TR&#062; and each item in the row, blank or not, in &#060;TD&#062;...&#060;/TD&#062; then all will be lined up prettily.<BR><BR>That&#039;s what tables are for. Don&#039;t fight HTML, learn to *use* it.<BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default unless you use <pre>

    you&#039;re right, I just thought I&#039;d wade in.<BR><BR>;-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts