I hope this helps... If you are actually going to post the data in the from
then you will need to add the validationRequest="false" otherwise you will
get the unsafe code error.
-Brian K. Williams
***** ASPX *****
<%@ Page language="c#" validateRequest="false" Codebehind="HTMLEdit.aspx.cs"
AutoEventWireup="false" Inherits="TestApp.HTMLEdit" %>
<HTML>
<HEAD>
<title></title>
<meta stuf....
</HEAD>
<body...
<form id="Form1" method="post" runat="server">
<iframe id="iFrameAbstractBody" style="Z-INDEX: 101; LEFT: 24px; WIDTH:
800px; POSITION: absolute; TOP: 112px; HEIGHT: 680px"
src="HTMLEditor.htm" frameBorder="no" width="800" height="700"></iframe>
<asp:TextBox id="txbHTML" style="Z-INDEX: 102; LEFT: 32px; POSITION:
absolute; TOP: 16px" runat="server"
Width="592px" Height="56px"></asp:TextBox>
</form>
</body>
</HTML>
***** HTML With Web Editor *****
<html>
<head>
<title></title>
<meta stuf...
<script>
function submitHTML()
{
parent.document.all.item("txbHTML").value =
document.all.item("divHTMLArea").innerHTML;
}
</script>
</head>
<body>
<div id="divHTMLArea">
This is <b>some</b> text...
</div>
<label id=lblSubmit onclick=submitHTML()>Submit</label>
</body>
</html>
"Jan Van Steenbergen" <an*******@discussions.microsoft.com> wrote in message
news:B2**********************************@microsof t.com...
Hi all,
i'm having a little problem.
I have a aspx file with a iFrame defined!
The iframe is loaded with a html webeditor.
After editing data in the webeditor textbox, i want to
get the data to a hidden field in the aspx file.
What is the best way todo this?
Is it possible to add some sample code because a i have tried a lot
but nothing works?
mypage.aspx(html source)
------------------------------
<iframe id="iFrameAbstractBody" style="Z-INDEX: 103; LEFT: 24px; WIDTH:
800px; POSITION: absolute; TOP: 112px; HEIGHT: 680px" src="../Editor/htmlEditor/hostHtmlEditor.HTML" frameBorder="no"
width="800" height="700"></iframe> here i have the iframe added!!
mypage.aspx(vb source)
----------------------------
Private Sub cmdContinue_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles cmdContinue.Click cmdContinue.Attributes.Add("onClick", _
"document.Form1.txtgetDataFromIFrameElement.va lue =
iFrameAbstractBody.document.editarea.innerHTML;") End Sub
Here i have a button that should bring the data to de aspx hidden field!
Whats wrong here?
Or am i wrong?
Thanxs in advance!