General information
Category:
COM/DCOM and OLE Automation
>>I am having a problem using DOM to automate the submition of forms through IE5. I am following the article in June in Foxpro Advisor. However, it seems that when I submit to the site I am working with, it doesn't do the same thing as when I actually click on the submit button manually, and the reason I suspect is because in the HTML form it seems that the submit assigns a value to a variable (in this case a variable .finished). I don't know how to replicate this through the submit method since it doesn't seem that the submit method accepts parameters. I am trying oIE.Document.Forms(0).submit. I also thought that perhaps assigning the form variable manually before submiting the form would do the job, but this variable actually has a dot in front of the name, so I don't know how to do that either.
>>
>
>
>Call the button's Click method instead of submitting the form.
>
>oIE.Document.Body.Form1.MySubmitButton.Click()
Actually, the fact that the button name is ".finished" is preventing me from doing a lot of things I would like to. I can do this:
? oIE.Document.forms(0).item(36).name
And it returns:
.finished
However, I cannot do this:
? oIE.Document.forms(0).item(".finished").name
I get OLE error code 0x8002006: unknown name
And of course I cannot do this, which is what I want:
? oIE.Document.forms(0).item(".finished").name
Isn't this some sort of bug? If it lets an object be named .finished (the submit button in this case), shouldn't it let me find it?
I guess I could scan all the items of the form and find the one I need, but I'd rather just be able to jump to the one I need.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only