Im currently updating our email sending functionality of our application. The website is written in classic asp and all codes are really a mess. anyway my problem is that our current process is to use the URL to pass variables from page to page, but i've found out that the max limit is about 2000 characters, and one value we need to pass is the text found in a text area. But the value to be pass is more than 2000 characters which create URL error because of the limit. I've tried using session instead to store the value of the text area but when i try to incorporate the code for session in the vbscript for btnsave_onclick sub, i've got a Type Mismatch: Session error. Do you know the cause of this? below is the code im using:
Expand|Select|Wrap|Line Numbers
- Sub btnSave_onclick
- sEventID = frmSave.hdnEventIDNumVal.value
- 'sEBody = escape(CStr(document.getElementById("txtMailBody").outerText)) '--Remove because of URL limit
- sESender = escape(CStr(document.getElementById("txtMailSender").value)) '--[JCD,PIIWR05-FR002]
- Session("SesEmailBody") = escape(CStr(document.getElementById("txtMailBody").outerText)) '--Session to replace URL variable.
- window.location.href = "SaveMemo.asp?EventIDNum=" & sEventID & "&page=" & iPage & "&EmailSender=" & sESender
- '& "&EmailBody=" & sEBody '--Remove because of URL limit
- End Sub
Any suggestion on how to pass the value of the text area (txtMailBody) to savememo.asp?
I would really appreciate a quick response! Thanks!