Re: object existance in IE DOM

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: name (nospam_at_user.com)
Date: 07/31/04


Date: Sat, 31 Jul 2004 02:33:28 -0400

object is an overwritter for particular

ms active x instances.

================

do not use 'object' generally.

"TxITGuy" <txitguy.nospam@earthlink.net> wrote in message
news:749FE793-2F46-4322-9522-928834EDE737@microsoft.com...
> I'm having a very confusing issue with Internet Explorer's DOM and a
JScript function I wrote. The function is writing data to a form multiline
text box in another window, and then submitting the form periodically.
>
> Since the form fields are unavailable for a brief period each time it is
submitted, I test for the existence of the field prior to writing to it. I
also don't want to overwrite anything that was previously written to the
field, so after testing for it's existance, I check to see if it has an
assigned value. The code flow looks like this:
>
> if (object) {
> if (object.value) {
> object.value += strTempStorage + appended_data;
> strTempStorage = '';
> } else {
> object.value = strTempStorage + appended_data;
> strTempStorage = '';}
> } else {
> strTempStorage += appended_data; }
>
> When the form is loaded, the first test reports that the object exists (as
it should) and the second test correctly reports the state of the field
(empty, occupied). Now it gets weird ...
>
> When the script gets to the line writing to the field, Internet Explorer
reports an "object doesn't support this property or method" error ... but
still successfully writes the new value. What is going on here? It seems
as if different parts of IE are disagreeing as to whether or not the form
field even exists.
>
> The form field in question, by the way, resides in an IFRAME contained in
a "visibility: hidden" DIV. The page containing the form field loads from
the same domain as the containing page, so I shouldn't be hitting any
security controls.
>
> Thanks.



Relevant Pages

  • Drug companies monitor internet chat for adverse reaction reports
    ... Drug companies monitor web chat for adverse reaction reports ... Drug companies are harvesting comments posted on the internet ... UK based internet consultancy, said this week that at least one ...
    (sci.med)
  • Re: sci.lang is not meant for religious propaganda
    ... I'll now pull a Franz. ... In 1996/97, when the Internet was about to become popular here, I had ... Writing enabled people to communicate across time, ... the Internet will allow them to communicate across space. ...
    (sci.lang)
  • Re: Question regarding newsgroups - re writing
    ... populate the Internet with special interest groups. ... I have led writing classes and have some general background knowledge of submitting etc., but not up-to-date on Internet publishing. ... I will bet you have a thousand stories in your head based on what you have seen, heard, experienced. ... Being hampered by facts would ...
    (soc.retirement)
  • Re: Error message in XP "0x7c911669" Nightmare!
    ... A useful programme is Autoruns. ... Empty your Recycle Bin and Remove Temporary Internet Files. ... Volume fragmentation ... It is difficult to see what is going on as the Reports are scattered ...
    (microsoft.public.windowsxp.perform_maintain)
  • Re: Error message in XP "0x7c911669" Nightmare!
    ... Given the limited RAM I would ... to Empty your Recycle Bin and Remove Temporary Internet Files. ... Volume fragmentation ... It is difficult to see what is going on as the Reports are ...
    (microsoft.public.windowsxp.perform_maintain)