Print Page | Close Window

Possible Bug???

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=9228
Printed Date: 07 April 2026 at 6:41pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Possible Bug???
Posted By: engla001
Subject: Possible Bug???
Date Posted: 25 January 2004 at 1:33pm

I am a teacher and I am using Web Wiz Guide as a forum for students to post their essays and response papers online.  I have found a possible bug though when cutting and pasting from MS Word or other applications. 

If you have a document in Word, for example, and it has non-standard margins...when you cut and paste into RTE, instead of wrapping or something, the text outside the standard margin size gets cut off.  Does anyone have any ideas - other than the obvious - to use standard margins.

I have instructed my students to use standard margins but perhaps this is a bug to be fixed?




Replies:
Posted By: WebWiz-Bruce
Date Posted: 25 January 2004 at 1:37pm
This is not a bug, more a incompatbility problem between word and HTML.

Cutting and pasting from word into an RTE will never work 100%.

You are better asking your pupils to cut a paste from notepad, so no wrod formatting that can mess up HTML is caried across.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: dpyers
Date Posted: 25 January 2004 at 4:00pm
I found that if the doc is first saved as a .rtf file (rich text file), it retains more formatting when pasted into rich text textboxes. But like Borg said, it's never 100%. The downside is that .rtf files tend to be huge compared to the same file saved as a .doc

-------------

Lead me not into temptation... I know the short cut, follow me.


Posted By: Bluefrog
Date Posted: 26 January 2004 at 11:08am

For relatively small documents in DOC or RTF, RTF is smaller is it is pure text. DOC has an initial "bloat" size, but that quickly diminishes as documents become larger. Images in a document make RTFs massive, while barely affecting DOC files. Like always, it depends on the content a lot.

I rarely every use DOC or RTF anymore as I find HTML and TXT files much easier to work with and they have fewer compatibility problems (forgetting Netscrap 4.x-). Even for business documents, I use either TXT, HTML, or PDF.

I'd ask your students to use pure text. It is universal (almost) and by far the best choice of formats.

The easiest way is to cut and paste into Notepad (or other simple text editor like vi) and then copy and paste into the forum.

NB: HTML is a pure text format, while RTF is a 'text' format.

 



-------------
http://renegademinds.com/" rel="nofollow - Renegade Minds - Guitar Software http://renegademinds.com/Default.aspx?tabid=65" rel="nofollow - Slow Down Music


Posted By: engla001
Date Posted: 26 January 2004 at 3:43pm

If you cut and paste from Notepad you lose all of the formatting you did in Word.  Doesn't that really defeat the purpose of the RTE? 

The main reason I use Web Wiz is because it allows the cut-and-paste feature.  If I wanted plain text I could use a simple CGI script.

For me, the RTE is crucial because students may have to italicize, underline, or bold in many places throughout the paper.  Doing it in Word first is easier on my students.  If they tried to write these lenghthy  essays in the Post Reply box, they could be there for a while.  If a student's ISP has the disconnect on idle feature, they can get cut off after 30 minutes or so of writing in the Post Reply box.

I know I am using the Web Wiz for purposes other than it was intended for but it serves me well.  It is an awesome program for what we do with it.  It helps me integrate the internet into my teaching and fosters classroom discussion.  I can deal with only working within standard margins.  This program is great.  I have recommended it to many.



Posted By: Mart
Date Posted: 26 January 2004 at 3:47pm
Ask your students to write it into a HTML document then, that should cut and paste fine.


Posted By: WebWiz-Bruce
Date Posted: 26 January 2004 at 4:34pm
Another problem that you may find is that ASP suffers from a 100kb buffer for it's response object.

It is the response object that holds many details such as browser headers, cookies, querystrings, etc. and most importently anything submitted from a form.

This means that if a post is to large it will course the server to crash.

There is nothing in the code to prevent this as forum posts aren't meant to be essays, also as the amount of data in the response object depends on many different things that are effected on a site by site, page by page, baises, there is no way of telling how large a post can be.

It maybe a better option to enable file uploading for your students in posts then get them to upload the word document to the server in the post. Then all you need do is click the link in the post to the uploaded word doc to veiw it.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: thekiwi
Date Posted: 26 January 2004 at 5:13pm

Originally posted by -boRg- -boRg- wrote:

Another problem that you may find is that ASP suffers from a 100kb buffer for it's response object.

It is the response object that holds many details such as browser headers, cookies, querystrings, etc. and most importently anything submitted from a form.

This means that if a post is to large it will course the server to crash.

Hmm .... it will cause the ASP page to fail with an error, but in al the cases where Ive seen this occur (even had some of my own pages do it) Ive never had it cause the server to crash ...

Quote

There is nothing in the code to prevent this as forum posts aren't meant to be essays, also as the amount of data in the response object depends on many different things that are effected on a site by site, page by page, baises, there is no way of telling how large a post can be.

It maybe a better option to enable file uploading for your students in posts then get them to upload the word document to the server in the post. Then all you need do is click the link in the post to the uploaded word doc to veiw it.

You can get past this "limitation" in the HTTP posting by adding the following:

1) Add the following to a page called _largeform.asp


<SCRIPT LANGUAGE=VBScript RUNAT=Server>
'Process of x-www-form-urlencoded POST data

Function GetForm
  'Dictionary which will store source fields.
  Dim FormFields
  Set FormFields = CreateObject("Scripting.Dictionary")

  'If there are some POST source data
  If Request.Totalbytes>0 And _
    Request.ServerVariables("HTTP_CONTENT_TYPE") = _
    "application/x-www-form-urlencoded" Then

    'Read the data
    Dim SourceData
    SourceData = Request.BinaryRead(Request.Totalbytes)

    'Convert source binary data To a string
    SourceData = RSBinaryToString(SourceData)

    'Form fields are separated by "&"
    SourceData = split(SourceData, "&")
    Dim Field, FieldName, FieldContents
 
    For Each Field In SourceData
      'Field name And contents is separated by "="
      Field = split(Field, "=")
      FieldName = URLDecode(Field(0))
      FieldContents = URLDecode(Field(1))
      'Add field To the dictionary
      FormFields.Add FieldName, FieldContents
    Next
  end if'Request.Totalbytes>0
  Set GetForm = FormFields
End Function

Function URLDecode(ByVal What)
'URL decode Function
'2001 Antonin Foller, PSTRUH Software, http://www.pstruh.cz - http://www.pstruh.cz
  Dim Pos, pPos

  'replace + To Space
  What = Replace(What, "+", " ")

  on error resume Next
  Dim Stream: Set Stream = CreateObject("ADODB.Stream")
  If err = 0 Then 'URLDecode using ADODB.Stream, If possible
    on error goto 0
    Stream.Type = 2 'String
    Stream.Open

    'replace all %XX To character
    Pos = InStr(1, What, "%")
    pPos = 1
    Do While Pos > 0
      Stream.WriteText Mid(What, pPos, Pos - pPos) + _
        Chr(CLng("&H" & Mid(What, Pos + 1, 2)))
      pPos = Pos + 3
      Pos = InStr(pPos, What, "%")
    Loop
    Stream.WriteText Mid(What, pPos)

    'Read the text stream
    Stream.Position = 0
    URLDecode = Stream.ReadText

    'Free resources
    Stream.Close
  Else 'URL decode using string concentation
    on error goto 0
    'UfUf, this is a little slow method.
    'Do Not use it For data length over 100k
    Pos = InStr(1, What, "%")
    Do While Pos>0
      What = Left(What, Pos-1) + _
        Chr(Clng("&H" & Mid(What, Pos+1, 2))) + _
        Mid(What, Pos+3)
      Pos = InStr(Pos+1, What, "%")
    Loop
    URLDecode = What
  End If
End Function


Function RSBinaryToString(Binary)
  'Antonin Foller, http://www.pstruh.cz - http://www.pstruh.cz
  'RSBinaryToString converts binary data (VT_UI1 | VT_ARRAY)
  'to a string (BSTR) using ADO recordset
 
  Dim RS, LBinary
  Const adLongVarChar = 201
  Set RS = CreateObject("ADODB.Recordset")
  LBinary = LenB(Binary)
 
  If LBinary>0 Then
    RS.Fields.Append "mBinary", adLongVarChar, LBinary
    RS.Open
    RS.AddNew
      RS("mBinary").AppendChunk Binary
    RS.Update
    RSBinaryToString = RS("mBinary")
  Else
    RSBinaryToString = ""
  End If
End Function
</SCRIPT>

2) Add an include to the top of your page which processes the form submission
<!--#INCLUDE FILE="_largeform.asp"-->

3) Add the following to the DIM area of your page:
Dim FormFields
Set FormFields = GetForm

4) THen use FormFields to get the data into local variables eg:
' Get the form data into variables
sReportTitle= FormFields("ReportTitle")

On a page I had where it was cut and paste from Word (with tables and everything) we often had the error of the post being too large.  Since applying the above we can now post messages which are literally a couple of Mb in size.



-------------
Cheers
TheKiwi
http://www.infobahn.co.nz - Internet Infobahn - website design and hosting


Posted By: engla001
Date Posted: 26 January 2004 at 6:06pm
I've never had the server crash on large postings.  They aren't posting books on here.  I know this program can safely handle 5 - 7 (single spaced) page papers.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net