Answered by:
c# web browser click on button

Question
-
hey guys
need help!!
in web game have this
<div id="hmenu" style="left: 217px; top: 234.5px; display: block; ">
<div id="h-orn1"></div>
<div id="h-orn2"></div>
<button onclick="_g("takeitem")">Podnieś</button>
<br>
<button onclick="_g(" walk")"="">Przejdź</button>
<br>
<button onclick="_g("emo&a=angry")" class="last">Złość się</button>
<br></div>
and if i
usewebBrowser1.Document.GetElementById("hero").InvokeMember("click");
open this menu but i want click on "<button onclick="_g(" walk")"="">Przejdź</button>"
and i dont know how do this
broxis.
Answers
-
I don't understand your code.
You call for an element with ID "hero". But there is no such ID in the code that you have provided.
Regarding your issue, you need to have an ID, and then use the invoke.
Noam B.
Do not Forget to Vote as Answer/Helpful, please. It encourages us to help you...- Proposed as answer by Noam B Sunday, January 1, 2012 12:18 PM
- Marked as answer by Dummy yoyo Monday, January 9, 2012 3:50 AM
All replies
-
Hi.. Broxis..Welcomes you to MSDn forums..In your web related queries, post the below forums for getting quick reponseByA Pathfinder..JoSwa
If you find an answer helpful, click Vote as helpful button. If you find an answer to your question, Click mark it as the answer. -
I don't understand your code.
You call for an element with ID "hero". But there is no such ID in the code that you have provided.
Regarding your issue, you need to have an ID, and then use the invoke.
Noam B.
Do not Forget to Vote as Answer/Helpful, please. It encourages us to help you...- Proposed as answer by Noam B Sunday, January 1, 2012 12:18 PM
- Marked as answer by Dummy yoyo Monday, January 9, 2012 3:50 AM