Pretty Dumb Question![Solved]

Posts 1–13 of 13 · Page 1 of 1
Pretty Dumb Question![Solved]
I have a dumb question. But I need the answer..

I've made a program that should login to a site. But, when I want my program to press the Log in button, it don't work :s

Here's the code:

Code:
wb.Document.All("Logg inn!").InvokeMember("Click")
"Logg inn!" is the value. Else there is just "submit" (input type), that didn't work either.. I've done this once before, then it worked with "Logg inn!"

Can I use another code?

btw. WB is short for webbrowser...

Anyone have any clue?
Webbrowser1.Document.GetElementByID("ID").InvokeMe mber("Click")
Quote Originally Posted by Blubb1337 View Post
Webbrowser1.Document.GetElementByID("ID").InvokeMe mber("Click")
Not working :/

Quote Originally Posted by DoubleDutch View Post
Yup pretty dumb
Write me the code so I can see that you ain't dumb too then? we don't need two dumb people on the forum!

Edit...

Sorry for doubblepost....!


Someone have the answer...? I need it much..
I'm not a big coder, in fact am just a beginner but I think you sould replace the ("id") with the button you want to click Id, I think if it was to submit reply has i'm doing now the code would be:

Code:
Webbrowser1.Document.GetElementByID("vB_Editor_001_save").InvokeMember("Click")
Give it a try and tellme if it worked!
Quote Originally Posted by omanel View Post
I'm not a big coder, in fact am just a beginner but I think you sould replace the ("id") with the button you want to click Id, I think if it was to submit reply has i'm doing now the code would be:

Code:
Webbrowser1.Document.GetElementByID("vB_Editor_001_save").InvokeMember("Click")
Give it a try and tellme if it worked!

I know that.. But ty.

All the code I can use is:

Code:
<div style="margin:0px auto; width:100px; text-align:center"><input type="submit" value="Logg inn!"></div>
<input type="submit" value="Logg inn!">
That's all the code for the button.. No ID, and value and input type didn't work.
It's a pretty common error Mister Dutch.
If the "A Typical" Does Not Work

Above Posts plus these below

Code:
WebBrowser1.Document.All("input").InvokeMember("click")

WebBrowser1.Document.All("input").InvokeMember("submit")
then try

[php]
WebBrowser1.Document.Forms(0).submit

or

WebBrowser1.Document.Forms(1).submit

[/php]

Most websites have a series of "forms" or sections, and each form it's own objects, using the above DOM you can select a form and "Submit it"

typically if it is a simple page there are only 1 or 2 forms, 0 is the first form, 1 the second, and so on.

One of these will most deff. work.


Quote Originally Posted by NextGen1 View Post
If the "A Typical" Does Not Work

Above Posts plus these below

Code:
WebBrowser1.Document.All("input").InvokeMember("click")

WebBrowser1.Document.All("input").InvokeMember("submit")
then try

[php]
WebBrowser1.Document.Forms(0).submit

or

WebBrowser1.Document.Forms(1).submit

[/php]

Most websites have a series of "forms" or sections, and each form it's own objects, using the above DOM you can select a form and "Submit it"

typically if it is a simple page there are only 1 or 2 forms, 0 is the first form, 1 the second, and so on.

One of these will most deff. work.


Did not work.. :/


I HAVE THE SOLUTION !!

I'll post the code here:

Code:
For Each el As HtmlElement In wb.Document.GetElementsByTagName("input")
            If el.GetAttribute("Value") = "Logg inn!" Then
                el.InvokeMember("Click")
            End If
        Next
There we go, that did work!

This thread can be marked as solved
Quote Originally Posted by Prfction View Post
Did not work.. :/


I HAVE THE SOLUTION !!

I'll post the code here:

Code:
For Each el As HtmlElement In wb.Document.GetElementsByTagName("input")
            If el.GetAttribute("Value") = "Logg inn!" Then
                el.InvokeMember("Click")
            End If
        Next
There we go, that did work!

This thread can be marked as solved
PM me the site and i can help you
___________

Dang forgot... Solved hehe
Quote Originally Posted by qddW$#%^jtyjtyj View Post
PM me the site and i can help you
He said the problem is already solved !!
Quote Originally Posted by Hassan View Post
He said the problem is already solved !!
look at my post
Just a note, which site? cause forms always works........
Posts 1–13 of 13 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us