Discussion Locked

Auto Form Fill Out

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I'm trying to write a script to automatically fill out a form on our intranet website that would require it to also push the submit button. Can anyone point me in the right direction? I would prefer to use VB script or Java Script.

3 replies

by jltholozan

To my understanding, you are trying to fill a web page and submit it.
Usually this is to automate browsing through a web site with data coming from another application (either web or windows though this is mainly windows app).
If this is what you are looking for, the best approach may be to send HTTP request to your webserver directly from your second application and then analyze the answer by parsing the HTTP response.
Depending on your tool/language you may use some Microsoft ActiveX or other API.

Otherwise you can starting from the browser ActiveX, move to the DOM ActiveX. At this point you can parse using ActiveX technology the page, change the value of some fields and finish with sending a submit event.

by bes1124

I'm speculating that you are building the form as the page is loaded. Let's suppose that the form id is "Form1". In the body tag, you can call a function when the page is loaded:

You could do some form validation, and at the end of the function, you could do a "submit":
Form1.submit();

by apotheon

This sounds like a scam meant to harvest data from users or get malware downloaded to their systems. That being the case, I recommend you use ActiveX, both because people with ActiveX running are likely to be vulnerable to this sort of thing and because my computer isn't running Windows, so I won't be vulnerable to this crap.

This discussion is closed to new replies.