Re: [variable1] has no properties
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: [variable1] has no properties

From: David <dkbat6@hotmail.com>
Date: Wed Jul 20 2005 - 03:52:22 CEST

ASM Wrote:
> David wrote:
>> I am getting a Javascript error from Firefox 1.0.5 when I try to
>> reference a table within a window that has just been opened and written
>> to. I get the Javascript error "cartTable has no properties" where
>> cartTable is the variable I assigned the table reference to.
>>
>> cartTable=winDVDCart.document.getElementById("cartTable")
>
> what is exactly this 'winDVDCart' ?
> if a name of frame (or iframe) :
>
> cartTable=parent.winDVDCart.document.getElementById("cartTable")
>
> if self main window name :
> cartTable=document.getElementById("cartTable")
>
>

winDVDCart is the handle to the window that was opened

>> while (!winDVDCart.document.getElementById("cartTable")) {}
>
> probably if you insert your JS and its code
> after </table> the 1st way would run.
>

This is not possible unless I insert a call to this function from a <script>
tag that is located after the </table>. This is all dynamic and thus part
of a big long string that gets written to the window when it is open.
Without explaining all the details, I'll suffice it to say that this is not
a desirable way of doing, though it is possible, it is a method I would
prefer to save as a last resort.

Any other ideas?
Received on Tue Oct 18 02:58:33 2005