eWeb rules.


This goes at the top of the page:

<% ' EWEBEDIT START' %>
		<%
		' Place this block at the top of eweb pages..
		If Not Request("page") = "inpage" Then
		%>
<% ' EWEBEDIT END' %>



This goes at the bottom of the page:

<% ' EWEBEDIT START'

		' Place this at the bottom of eweb pages...
		 Else %>
		<% 
		Content = Trim(Replace(Replace(Replace(Replace(Request("Content"), Chr(13), ""), Chr(10), ""), """", "ewebquot;"), "'", "ewebsquot;"))
		New_Content = Trim(Replace(Replace(Replace(Replace(Request("New_Content"), Chr(13), ""), Chr(10), ""), """", "ewebquot;"), "'", "ewebsquot;"))
		Content_Enter = Trim(Replace(Replace(Replace(Replace(Request("New_Content"), Chr(13), ""), Chr(10), ""), "'", "\'"), "script", "\script"))
		%>
		<HTML>
		<STYLE>
BODY {SCROLLBAR-FACE-COLOR: #5e5ebe; SCROLLBAR-HIGHLIGHT-COLOR: #5e5ebe; SCROLLBAR-SHADOW-COLOR: #5e5ebe; SCROLLBAR-3DLIGHT-COLOR: #5e5ebe; SCROLLBAR-ARROW-COLOR:  #6666CC; SCROLLBAR-TRACK-COLOR: #E3E3E3; SCROLLBAR-DARKSHADOW-COLOR: #666666; }
</STYLE>
<head>
		</script>
		</HEAD>
		<BODY>
		<form method="POST" action="<%=Request("URL")%>" name="ewebpost">
		<input type="hidden" name="page" value="inpage">
		<input type="hidden" name="URL" value="<%=Request("URL")%>">
		<input type="hidden" name="New_Content" value="<%=New_Content%>">
		<input type="hidden" name="Content" value="<%=Content%>">
		<input type="hidden" name="Posted" value="True">
		<input type="hidden" name="From" value="<%=Request("From")%>">
		<input type="hidden" name="Title" value="<%=Request("Title")%>">
		<input type="hidden" name="objname" value="<%=Request("objname")%>">
		<script language="javascript">
		var obj = parent.document.getElementById("<%=Request("objname")%>");
		obj.value='<%=Content_Enter%>';
		document.ewebpost.submit();
		</script>
		</form>
		</body>
		</html>
		<% End If %>

<% ' EWEBEDIT END' %>



This is the code chunk for the eweb control:

        <% ' Start of Eweb code chunk
			
			' Variables, modify
			Content =	"Content in eweb"	'Edit Contents
			Title	=	"Title Here"		'Edit Title
			FName	=	"FrameName"			'Frame Object Name
			TName	=	"InputName"			'Input Object Name
			FHeight	=	"200"				'Frame Height
			FWidth	=	"450"				'Frame Width
			FBorder	=	"0"					'Frame Border
			FScroll	=	"no"				'Frame Scrollbar
			
					' Don't modify, start
						From	=	"http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("URL")
						URL		=	"http://www.emagineering.com/eweb/inpage.asp"
						ObjName =	TName
						Content =	Trim(Replace(Replace(Replace(Replace(Content, Chr(13), ""), Chr(10), ""), """", "ewebquot;"), "'", "ewebsquot;"))
					' Don't modify, end

			%>
			<iframe name="<%=FName%>" id="<%=FName%>" width="<%=FWidth%>" height="<%=FHeight%>" frameborder="<%=FBorder%>" scrolling="<%=FScroll%>" application="yes" src="<%=URL%>?URL=<%=URL%>&ObjName=<%=ObjName%>&Content=<%=Content%>&From=<%=From%>&Title=<%=Title%>" overflow="clip"></iframe>
			<input type="hidden" name="<%=TName%>" id="<%=TName%>" value="<%=Content%>">
	
		<% ' End of Eweb code chunk %>





This is the code to retrieve the item and convert all characters back to original, required:

Replace(Replace(Replace(Request.Form("InputName"), "\'", "'"), "'", "''"), "\script", "script")