473,586 Members | 2,566 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

retrieve data from IFrame textbox

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 t
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 lo
but nothing works

mypage.aspx(htm l source
-----------------------------

<iframe id="iFrameAbstr actBody" 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_Cli ck(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles cmdContinue.Cli c
cmdContinue.Att ributes.Add("on Click",
"document.Form1 .txtgetDataFrom IFrameElement.v alue = iFrameAbstractB ody.document.ed itarea.innerHTM L;"
End Su

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
Nov 18 '05 #1
1 4891
I hope this helps... If you are actually going to post the data in the from
then you will need to add the validationReque st="false" otherwise you will
get the unsafe code error.

-Brian K. Williams

***** ASPX *****
<%@ Page language="c#" validateRequest ="false" Codebehind="HTM LEdit.aspx.cs"
AutoEventWireup ="false" Inherits="TestA pp.HTMLEdit" %>
<HTML>
<HEAD>
<title></title>
<meta stuf....
</HEAD>
<body...
<form id="Form1" method="post" runat="server">
<iframe id="iFrameAbstr actBody" 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("txbH TML").value =
document.all.it em("divHTMLArea ").innerHTM L;
}
</script>
</head>
<body>
<div id="divHTMLArea ">
This is <b>some</b> text...
</div>
<label id=lblSubmit onclick=submitH TML()>Submit</label>
</body>
</html>

"Jan Van Steenbergen" <an*******@disc ussions.microso ft.com> wrote in message
news:B2******** *************** ***********@mic rosoft.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(htm l source)
------------------------------

<iframe id="iFrameAbstr actBody" 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_Cli ck(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles cmdContinue.Cli ck cmdContinue.Att ributes.Add("on Click", _
"document.Form1 .txtgetDataFrom IFrameElement.v alue = iFrameAbstractB ody.document.ed itarea.innerHTM L;") 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!

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
7781
by: Richard St?en | last post by:
Hi! We are experiencing a problem with running an .aspx page inside an iframe. The .aspx page is loading perfectly the first time (on load), but when we try to interact/navigate within the .aspx page (press a button/calendar control e.g.) the response is loaded in a new separate browser window. What we want is that the .aspx page is...
1
618
by: Jan Van Steenbergen | last post by:
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 t 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 lo but nothing works
0
988
by: Edge | last post by:
I have two aspx pages. First one, page1.aspx, has an iframe inside. Src attribute of this iframe is pointing to the second page, page2.aspx. In page2.aspx I have a textbox and a dropdownlist. Autoposkback attribute for both the textbox and dropdownlist is set to true. When I open page1.aspx inside Internet Explorer (Ver 6.0) I can see the...
0
411
by: Raju | last post by:
Hi all i am Rajendran I am working as a asp.net programmer. I am frish to this field so please any of u garify my doubt I Create array of Textbox Dynamically and not passible to retrieve data from that textbox to next window in asp .net
0
1787
by: DBxGlock | last post by:
Howdy folks, I have an asp.net webpage that has a table with 2 columns. In the left column is an IFrame. In the right column is a bunch of user controls including a textbox, some buttons, a grid, etc. Here's the problem: when the user clicks a button, the url of the IFrame is set in the codebehind. When the page loads, the body's...
1
2687
by: vHTML | last post by:
hello everyone :) I am trying to make a page which would take a "entered" on search query from the previous page and display results in google with that query in an <iframe> in the results.htm page. So if I enter the word "watches" into a textbox, the google search results would be displayed in an <iframe> in the results.htm page for the...
9
4779
by: Mel | last post by:
I have 10 columns total. 3 of them are invisible. The rest are read- only BoundFields, 3 of which are editable fields using TemplateFields. Upon editing, I want to validate what the user enters against one of those invisible columns. How do I accomplish this? The code below that I attempted just returns an empty string when I try to...
2
1281
by: durga2005 | last post by:
Hi I m using webgrid control I m trying to add a new record using its footer In the footer I placed a button,and one textboxe to insert the new record. when I click the add button,the data in textboxe should be inserted in the database. But I could not retrieve the value of the textbox in the footer. How can I retrieve the data...
2
5907
by: phpachu | last post by:
Hi, I hav created a group of textboxes using a loop and its names are unique and names are assigned using variable ( like <input type=text name=$name1>). Then How can i retrieve the values in that textboxes after a button click with in a loop. Really I cant move from here. Can anyone plz help me.. Part of the my code is given below <html>...
2
3943
by: Manikrag | last post by:
Hi again I am using an AutoCompleteExtender in a user control alone with a textbox and button...On selection from auto selection dropdown or on button click event I am taking the control to next page i.e Searchresult.aspx with the selected textbox value. I am using the same user control on searchresult.aspx page as well. On serchresult, I have...
0
7912
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8202
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7959
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8216
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5710
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3865
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2345
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1449
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.