R
ryguy7272
Hello experts. Last week I got some GREAT help from Peter Schleif.
Thanks! Learned a ton!!
I have a question different from my original post, so I’m starting a
new thread specifically for this.
Basically, I’m entering data into a few HTML-based ComboBoxes, and
this stuff works fine. I’m also navigating from a pageA (first page)
to a pageB second page. I’m copying data from a sheet into a TextBox
in a web page. This seems to work (data goes from sheet to TextBox),
but when I look closely, I notice a small exclamation mark and a small
yellow triangle . . . there is an error on this page. Basically, when
I go from pageA to pageB, I noticed an error message, described below:
windows opener document is null or is not an object
As I alluded to above, I seem to be able to copy/paste data from the
Sheet into the TextBox named "pasteProfitCenter", but the next snippet
of code fails:
Set itm = ie.document.getElementsByTagName("input")
For Each oHTML_Element In ie.document.getElementsByTagName("input")
If oHTML_Element.Type = "button" And _
oHTML_Element.Value Like "*Validate-->*" Then
oHTML_Element.Click:
Next
That's when I noticed the error: windows opener document is null or
is not an object
Since web pages are stateless, I think this pageB is looking for
information from pageA, but not seeing it, and this is why I can't
find this element: oHTML_Element.Value Like "*Validate-->*"
I KNOW THAT 'VALIDATE' ELEMENT IS IN THAT PAGEB!! But, Excel keeps
telling me it is NOT there. I Googled around for a couple days, and
did some research on this error, but didn’t find anything helpful.
Here is the structure on the page:
<td class="moap-td-form-obj">
<textarea name="pasteProfitCenter" id="pasteProfitCenter"
onfocus="javascript:selAll();" rows="8" cols="40">
<input onclick="javascript:validateProfitCenter();" type="button"
value="Validate-->"/>
Again, haven't found much about dealing with that error message. Has
anyone ever experienced this before?
It's weird that pageB can accept the list/array from the sheet,
because pageB is referenced this way:
Set itm = ie.document.getElementById("pasteProfitCenter")
In the next step, I'm trying to reference the pageB using a similar
concept:
Set itm = ie.document.getElementsByTagName("input")
For Each oHTML_Element In ie.document.getElementsByTagName("input")
If oHTML_Element.Type = "button" And _
oHTML_Element.Value Like "*Validate-->*" Then
oHTML_Element.Click:
Next
I think I’m out of ideas right now, but I don’t want to give up on
this. Does anyone know of a way to do this? I’m a little out of my
comfort zone with some of this stuff. I told a guy at work I’d help
him with a project he is working on, but now I’m stuck!!
Thanks! Learned a ton!!
I have a question different from my original post, so I’m starting a
new thread specifically for this.
Basically, I’m entering data into a few HTML-based ComboBoxes, and
this stuff works fine. I’m also navigating from a pageA (first page)
to a pageB second page. I’m copying data from a sheet into a TextBox
in a web page. This seems to work (data goes from sheet to TextBox),
but when I look closely, I notice a small exclamation mark and a small
yellow triangle . . . there is an error on this page. Basically, when
I go from pageA to pageB, I noticed an error message, described below:
windows opener document is null or is not an object
As I alluded to above, I seem to be able to copy/paste data from the
Sheet into the TextBox named "pasteProfitCenter", but the next snippet
of code fails:
Set itm = ie.document.getElementsByTagName("input")
For Each oHTML_Element In ie.document.getElementsByTagName("input")
If oHTML_Element.Type = "button" And _
oHTML_Element.Value Like "*Validate-->*" Then
oHTML_Element.Click:
Next
That's when I noticed the error: windows opener document is null or
is not an object
Since web pages are stateless, I think this pageB is looking for
information from pageA, but not seeing it, and this is why I can't
find this element: oHTML_Element.Value Like "*Validate-->*"
I KNOW THAT 'VALIDATE' ELEMENT IS IN THAT PAGEB!! But, Excel keeps
telling me it is NOT there. I Googled around for a couple days, and
did some research on this error, but didn’t find anything helpful.
Here is the structure on the page:
<td class="moap-td-form-obj">
<textarea name="pasteProfitCenter" id="pasteProfitCenter"
onfocus="javascript:selAll();" rows="8" cols="40">
<input onclick="javascript:validateProfitCenter();" type="button"
value="Validate-->"/>
Again, haven't found much about dealing with that error message. Has
anyone ever experienced this before?
It's weird that pageB can accept the list/array from the sheet,
because pageB is referenced this way:
Set itm = ie.document.getElementById("pasteProfitCenter")
In the next step, I'm trying to reference the pageB using a similar
concept:
Set itm = ie.document.getElementsByTagName("input")
For Each oHTML_Element In ie.document.getElementsByTagName("input")
If oHTML_Element.Type = "button" And _
oHTML_Element.Value Like "*Validate-->*" Then
oHTML_Element.Click:
Next
I think I’m out of ideas right now, but I don’t want to give up on
this. Does anyone know of a way to do this? I’m a little out of my
comfort zone with some of this stuff. I told a guy at work I’d help
him with a project he is working on, but now I’m stuck!!