J
jbonifacejr
I would like to be able to create HTML anchor tags, set their
innerHTML values, and be able to click on them later in a process. For
example, I want to set the innerHTML values for three links. When the
first page loads, I want to click the first link, Link1, then wait for
page 2 to load, click Link2, etc.
I am using the mshtml and have the following lines...
mshtml.HTMLAnchorElement lnkYourAcctOrders;
mshtml.HTMLAnchorElementClass lnkYourAcctShipAddy;
mshtml.HTMLAnchorElementClass lnkYourAcctPmtInfo;
When I try to set the values I get an error telling me the objects
have not been instantiated, so I added the following lines before
trying to set the innerHTML...
lnkYourAcctOrders = new mshtml.HTMLAnchorElement();
lnkYourAcctShipAddy = new mshtml.HTMLAnchorElementClass();
lnkYourAcctPmtInfo = new mshtml.HTMLAnchorElementClass();
I realize that I have two different things above, the
mshtml.HTMLAnchorElement and the mshtml.HTMLAnchorElementClass. I have
this because I was trying to make either one work. I couldn't.
I know that I could load the page, and then put all the links in a
collection, and then click on the one that has an innerHTML matching
what I want. I was hoping to avoid that and simply be able to click on
the link I build, if it exists on the page.
Does anyone know how I would go about this?
Thanks in advance for your help.
innerHTML values, and be able to click on them later in a process. For
example, I want to set the innerHTML values for three links. When the
first page loads, I want to click the first link, Link1, then wait for
page 2 to load, click Link2, etc.
I am using the mshtml and have the following lines...
mshtml.HTMLAnchorElement lnkYourAcctOrders;
mshtml.HTMLAnchorElementClass lnkYourAcctShipAddy;
mshtml.HTMLAnchorElementClass lnkYourAcctPmtInfo;
When I try to set the values I get an error telling me the objects
have not been instantiated, so I added the following lines before
trying to set the innerHTML...
lnkYourAcctOrders = new mshtml.HTMLAnchorElement();
lnkYourAcctShipAddy = new mshtml.HTMLAnchorElementClass();
lnkYourAcctPmtInfo = new mshtml.HTMLAnchorElementClass();
I realize that I have two different things above, the
mshtml.HTMLAnchorElement and the mshtml.HTMLAnchorElementClass. I have
this because I was trying to make either one work. I couldn't.
I know that I could load the page, and then put all the links in a
collection, and then click on the one that has an innerHTML matching
what I want. I was hoping to avoid that and simply be able to click on
the link I build, if it exists on the page.
Does anyone know how I would go about this?
Thanks in advance for your help.