473,804 Members | 2,747 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Reading data from table cell or IFRAME


Folks,

I have a cell in a table that has an IFRAME - The IFRAME is empty (ie it
has no source tag) but it does have a name (myFrame) and id (also called
myFrame).

I can write data to the frame, but cannot append to it - I know I could
put a textarea form box in there, however that is my least prefered
route in part because I have such little control over the display of the
contents that appears inside a <textarea> are box.

Thus... if I write data to using:

document.getEle mentById('myFra me').innerHTML= "<font size=+1
color=yellow>&p ound;"+tmp0+"</font>";

How can I append to the data already existing in the box - I gather I
would have to first read the contents, then append my new data, then
re-write to it but I'm not so sure on how I could do this...

All help, via the newsgroup would be much appreciated,
thanks in advance,
randell d.
Jul 20 '05 #1
1 2352
Reply Via Newsgroup wrote:

Folks,

I have a cell in a table that has an IFRAME - The IFRAME is empty (ie it
has no source tag) but it does have a name (myFrame) and id (also called
myFrame).

I can write data to the frame, but cannot append to it - I know I could
put a textarea form box in there, however that is my least prefered
route in part because I have such little control over the display of the
contents that appears inside a <textarea> are box.

Thus... if I write data to using:

document.getEle mentById('myFra me').innerHTML= "<font size=+1
color=yellow>&p ound;"+tmp0+"</font>";

How can I append to the data already existing in the box - I gather I
would have to first read the contents, then append my new data, then
re-write to it but I'm not so sure on how I could do this...

All help, via the newsgroup would be much appreciated,
thanks in advance,


myVar = document.getEle mentById('myDiv ').innerHTML;
document.getEle mentById('myDiv ').innerHTML = myVar + newHTML;

or simply set it at one time:

document.getEle mentById('myDiv ').innerHTML =
document.getEle mentById('myDiv ').innerHTML + newHTML;

or simpler:

document.getEle mentById('myDiv ').innerHTML += newHTML;

Used with a div tag though. Not sure why you are using an IFrame tag
when it doesn't actually work that way. You have to document.write to an
IFrame, not change its innerHTML property.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javas cript FAQ - http://jibbering.com/faq/
Jul 20 '05 #2

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

Similar topics

3
4883
by: Bootstrap bill | last post by:
I have an iframe embedded in a single cell table. I'd like to resize the table and iframe to match any changes made to window size. Is this possible? -- "It's easy enough to be pleasant, when life hums along like a song. But the man worth while is the man who can smile when everything goes dead wrong.".
2
2988
by: David Bradbury | last post by:
I currently have an iframe on a webpage into which users can insert content. They can further customise the text as I've included buttons such as Bold, Italic, Bullet point etc. This is done along the lines of <td><div class="cbtn" onClick="cmdExec('bold',idContent)" onmouseover="button_over(this);" onmouseout="button_out(this);" onmousedown="button_down(this);" onmouseup="button_up(this);"> <img hspace="1" vspace=1 align=absmiddle...
8
1471
by: Rose Chambers | last post by:
How can I insert preformatted text from a file on the web server into a table's cell? And then swapped the text in response to an onClick event. Something like this......... <table> <tr><td> <img name="swap_grph" src="http://www.mydomain.com/graphs/piechart1.jpg"> </tr></td><tr><td>
1
2651
by: cotton_gear | last post by:
Hello, Fiest of all let me thank this group for so quick in responding to any postings. I am using a javascript based utility from a site to sort the columns of the table. But, for some strange reason it is not working on colmuns containg checkboxes, text-boxes (or, any user input fileds). For checkbox column, the values are lost when clicked on the column title to sort. I tried a lot to modify but couldnt achive what I wanted.
6
18858
by: Paul | last post by:
I was wondering if anyone has had an issue where using vba code to read an excel file and import the data into an access table some records are not imported from the excel file. It seems looking at the data in the excel file that if the first character in the excel file cell is numeric it will read and write only numeric values only. If I sort the coloumn in the excel file and the first character in the cell read is alphanumeric then only...
1
12341
by: Jeronimo Bertran | last post by:
I am creating a table and inserting an iframe inside a cell for which the width depends on the screen size. The table has 7 columns and the fourth column is resized depeding on the screen size... here is my complete definition. <table style="HEIGHT: 472px" cellSpacing="0" cellPadding="0" width="100%" border="0"> <tr height="1">
1
2596
by: j7.henry | last post by:
I am trying to pull specific data that is in a comma delimited file into a web page. So if my comma delimited file looks like: Name,Address,Zip Fred,123 Elm,66666 Mike,23 Jump,11111 I would like to be able to read this data and put each row into a variable? so I could display the values in a web page where I want.
5
2110
by: prasanta | last post by:
Hello, I have a xml file. when i am trying to load through XPathDocument and try to get XPathNodeIterator its not working . my xml is loking like <?xml version="1.0" ?> <?mso-application progid="Excel.Sheet"?> <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
7
2455
by: SteveM | last post by:
I am sure this is an easy question, but being relatively new to ASP.NET programming, I can not quite grasp what I need to accomplish what I need to do. What I have is a word document that is rendered as a page (or actualy a part of a page) that is editiable. To do this I let the user download the document, edit it and then upload it back to the site. Then at Page_Open, I convert the .doc file to an html and render it back to the page......
0
9711
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10594
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10343
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10331
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 most users, this new feature is actually very convenient. If you want to control the update process,...
1
7631
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5667
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4306
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
2
3831
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3001
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.