Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Possible Bug???
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Possible Bug???

 Post Reply Post Reply Page  12>
Author
engla001 View Drop Down
Newbie
Newbie


Joined: 25 January 2004
Location: United States
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote engla001 Quote  Post ReplyReply Direct Link To This Post Topic: Possible Bug???
    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?



Edited by engla001
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Bluefrog View Drop Down
Senior Member
Senior Member


Joined: 23 October 2002
Location: Korea, South
Status: Offline
Points: 1701
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bluefrog Quote  Post ReplyReply Direct Link To This Post 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.

 

Back to Top
engla001 View Drop Down
Newbie
Newbie


Joined: 25 January 2004
Location: United States
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote engla001 Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 26 January 2004 at 3:47pm
Ask your students to write it into a HTML document then, that should cut and paste fine.
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
thekiwi View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 23 November 2003
Location: New Zealand
Status: Offline
Points: 392
Post Options Post Options   Thanks (0) Thanks(0)   Quote thekiwi Quote  Post ReplyReply Direct Link To This Post 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
  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
  '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.

Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.