withSolutions   Script Sample Showcase
 
Skip Navigation Links.  

<%

    sub display_note(Note)

    '****************************************

    ' Ok, this function will just fix a     *

    ' display problem for those individuals *

    ' who dont like to use the return button*

    ' at the end of the textarea line, you  *

    ' know, the ones that just keep typing  *

    ' forever and letting the test autowrap *

    '****************************************

    Dim chrCounter

    Dim chrValue

    Dim idxCounter

 

    '****************************************

    ' Initialize our counters               *

    '****************************************

    chrCounter = 1

    idxCounter = 1

 

    '****************************************

    ' Split the Notes data on a CrLF boundry*

    '****************************************

    'Note = rsIssue("NoteData")

 

    '****************************************

    ' is there a CrLf and data in Note?     *

    '****************************************

    if (InStr(Note, vbcrlf) = 0) and (len(Note) > 0) then

        '*****************************************

        ' no CrLF write the note manually        *

        '*****************************************

        while idxCounter <= len(Note)

            chrValue = mid(Note, idxCounter, 1)

            if (chrCounter >= 50) and (chrValue = " ") then

                Response.Write "<br>" & vbcrlf

                chrCounter = 1

                idxCounter = idxCounter + 1

            'elseif (chrCounter >= 50) and (chrValue <> " ") then

      '          Response.Write chrValue

      '          idxCounter = idxCounter + 1

      '          chrCounter = chrCounter + 1

            else

                Response.Write chrValue

                idxCounter = idxCounter + 1

                chrCounter = chrCounter + 1

            end if

        wend

    else

        response.write "<pre>" & Note & "</pre>" & vbcrlf

    end if

 

    end sub

%>