Solved

Dynamically updating the contents of a Table from another Frame.

Posted on 2007-04-07
3
226 Views
Last Modified: 2010-04-16
I have a frameset containing two frames.
"Left" contains a series of images in a table (one image per cell).
"Right" contains one larger image in one cell of a table and associated text in another cell.
I am able to use "onClick" for each of the images in "Left" to update the source image (and Alt) of the first cell in "Right" (using "parent.right.document.MainPic") , but also need to update the text in the second cell.
I am having trouble finding out howI can reference the appropriate cell in the "Right" frame from "Left".
0
Comment
Question by:Waratah
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 15

Expert Comment

by:stanscott2
ID: 18870708
Let's assume that there's only one table in the right frame:

var tbl = parent.right.document.getElementsByTagName("table")[0];
tbl.rows(0).cells(1).innerText = "My new text";
0
 

Author Comment

by:Waratah
ID: 18872172
Previewing the frameset generates an error message relating to "tbl"  - Null or does not exist.
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 125 total points
ID: 18872723
you better use a named tag in your cells, for example in your second cell:

  <td><div id="mytext">text</div></td>

then you can access it like:

  parent.right.document.getElementById('mytext').innerHTML='new text';
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Jquery Calculation 3 43
Open new WPF windows - powershell 4 41
How does this modal gets closed? 6 42
Submit button if clicked twice submits twice 1 25
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question