Re: object existance in IE DOM
From: name (nospam_at_user.com)
Date: 07/31/04
- Next message: Bjorn: "how to determine the position of PROMPT?"
- Previous message: name: "Re: How to assign a value from a js-script to a command prompt environment variable ?"
- In reply to: TxITGuy: "object existance in IE DOM"
- Next in thread: Dave Methvin: "Re: object existance in IE DOM"
- Messages sorted by: [ date ] [ thread ]
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.
- Next message: Bjorn: "how to determine the position of PROMPT?"
- Previous message: name: "Re: How to assign a value from a js-script to a command prompt environment variable ?"
- In reply to: TxITGuy: "object existance in IE DOM"
- Next in thread: Dave Methvin: "Re: object existance in IE DOM"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|