| | Discussion and Rate this Resource Overall Rating: 4.3 | alfa on Dec 18, 2001 at 8:38:05 AM | Rating: 5 | | fgdfgd | | abhijit74 on Jul 25, 2001 at 3:43:40 AM | No Rating | A simple article. I guess most of us knew this stuff already. | | chipple on Jul 22, 2001 at 11:05:42 PM | Rating: 4 | I'd just like to clarify the following little mistake. The article's source is fine but &, < and > in the second Array were rendered while they shouldn't have been. function toNoHTML(str)
Dim aTemp,iLen,iCnt,aChar,iChar,aReplace
' Characters to find
aChar = Array("&","<",">")
' Replace with
aReplace = Array("&","<",">")
for iChar = 0 to 2 ' update to match uBound in aChar array
aTemp = split(str,aChar(iChar))
iLen = ubound(aTemp)
str = ""
for iCnt = 0 to iLen-1
str = str & aTemp(iCnt) & aReplace(iChar)
next
str = str & aTemp(iCnt)
next
toNoHTML = str
end function
| | Cees on Jul 18, 2001 at 12:34:57 PM | No Rating | Thanks Chris, But I have changed
aChar = Array("&","<",">","</textarea>") ' Replace with aReplace = Array("&","<",">","</textarea>")
and now the problem is over.
Thanks Chirs, and be welcom ! | | ChrisGibbon on Jul 16, 2001 at 1:35:46 AM | Rating: 4 | Hey Cees.
You could get round the problem of including a textarea in the page by using an iframe to hold it insted of the main page. Create a page which will fit in with your style and only contains a textarea. As you can position an Iframe like an image hopefully the user would not be any the wiser you were using a separate window.
<iframe scrolling="no" width="100%" height="200" frameborder="0" name="iframeID" id="iframeID" src="textarea.htm"> <a href="noiframes.htm">If you can see this message then iframes don't work on your browser. Use this link to a input page set up for you.</a> </iframe>
You can then reference the text area value by -
iframeID.iframeFormName.TextAreaName.value
Although I know that if you have to build a separate page outside of the editor it really negates the point but once you make the textarea page you can use it as much as you like with different iframes in the page with various ID's as you can reference them separatly.
iframe1.blah
iframe2.blah
Hope this helps.
Chris |
More Ratings/ Comments
To rate and comment on a resource, you must first logon.
If you are not registered, please register yourself to become a member of the SiteExperts.community.
|