web browser question
how would I direct a web browser control to set focus to a specific button on a web page?
For example, to click the "Sign In" button a login page using API.
Any ideas would be very helpful. :confused:
Thanks
[236 byte] By [
freqsoft] at [2007-11-11 10:14:41]

# 2 Re: web browser question
There isn't a single script out there to scan a webpage for button with a specific caption or window handle and execute a keypress on it? :SICK:
# 4 Re: web browser question
yeah thats what i mean, scan the page, using a javascript or something similar, dont use the vb6 form to find it. that way when the browser loads it automatically runs all the code for the page as well ;)
# 5 Re: web browser question
I've done similiar modifying yahoo java-chat environments. Saving the original chat page and modifying it so it's still functional + some added scripts.
What's a good javascript to allocate window focus to textboxes in html forms?
# 6 Re: web browser question
I've made a pretty big break-thru, but I'd still like to know how to do it in visual basic, so I can affect a page without having to edit it.
Is there a visual basic version of this javascript:
function placeFocus() {
if (document.forms.length > 0) {
var field = document.forms[0];
for (i = 0; i < field.length; i++) {
if ((field.elements[i].type == "text") || (field.elements[i].type == "textarea") || (field.elements[i].type.toString().charAt(0) == "s")) {
document.forms[0].elements[i].focus();
break;
}
}
}
}