[Javascript] <OBJECT> dereferencing

David T. Lovering dlovering at gazos.com
Tue Mar 11 09:48:53 CST 2003


I have a problem in which a table containing rows of object declarations each points to a "DATA=filename" reference of "TYPE=text/html".  Each individual <filename> so invoked contains a form with an embedded table containing the usual sorts of labels,
<input> identifiers, etc.  To illustrate:

Top-document:

  <html>
  <title>bogus</title>
  </html>
  <body>
  <fieldset id='myFieldSetName_00'>
    <div id='myDivName_00'>
      <table id='myMasterTable_00'>
        <tbody>
        <tr><td><object id='myStuff_00' data='file_00.html' type='text/html'></td></tr>
      </table>
    </div>
  </fieldset>
  <fieldset id='myFieldSetName_01'>
    <div id='myDivName_01'>
      <table id='myMasterTable_01'>
        <tbody>
        <tr><td><object id='myStuff_01' data='file_01.html' type='text/html'></td></tr>
      </table>
    </div>
  </fieldset>
  ... more fieldsets of the same variety
  </body>
</html>

... and each of the files so referenced by the object declarations are of the following architecture:

file_00:
<html>
  <head>
    <title>file_00.html</title>
  </head>
  <body>
    <form name='my_form_00'>
      <table id='my_table_00'>
        ... usual sorts of fields and such ...
      </table>
    </form>
  </body>
</html>

My problem is that is necessary for me to access objects between these lower-level forms.  When the enquiry is initiated at the top-level HTML file it can be done in any number of ways, for example:

tablePointer = document.getElementById('myMasterTable_##');
childForm = tablePointer.rows[0].cells[0].children[0].object.documentElement.document.forms[0];

 From here, each of the subelements can be manipulated directly, for example:

  childForm.field1.value = 37;  (and so on)

HOWEVER (!!!), when going back 'uphill' from the bottom-level file_## constructs, I have difficulty climbing beyond the OBJECT specifier back into the parent document.  By running various diagnostics and listing all the apparent
properties/objects associated with each element, there is no clear "punch-through" to the top layer.  In desperation I've even tried using 'window.opener' redirection (figuring that even in the same window, the window is its own window.opener entity), but
such ploys have availed me nothing.

HELP! I need a clean way to transparently share values, etc. between elements at the bottom level (within each of the file_## constructs) using standard JavaScript/JScript tools.  If it is helpful, consider that I'm using vanilla IE6-style object definitions.

-- Dave Lovering
-- dlovering at gazos.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dlovering.vcf
Type: text/x-vcard
Size: 304 bytes
Desc: Card for David T. Lovering
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20030311/d6300b31/attachment.vcf>


More information about the Javascript mailing list