Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8406467
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:07:05+00:00 2026-06-09T23:07:05+00:00

I have the following code for a webpage; <div class=toolbox> <div class=toolboxNest align=left> <div

  • 0

I have the following code for a webpage;

<div class="toolbox">
<div class="toolboxNest" align="left">
<div class="clear"> </div>
<div class="gap"> </div>
<label for="j_username">
<input id="j_username" type="text" name="j_username">
<div class="clear"> </div>
<div class="gap"> </div>
<label for="j_password">
<input id="j_password" type="password" name="j_password">
</div>
<div class="clear"></div>
<div class="gap"></div>
<div align="center">
<input class="formButtonGreen" type="submit" value="Login">
</div>
<div class="clear"></div>
<div class="gap"></div>
<div class="infoText">

I am able to click and enter text for the username and password, but I cant work out how to press the submit button, if it were just an element then that would be fine, but it’s in a class and I’m unsure how to do it.

This is my code…

var x = webBrowser1.Document.All.GetElementsByName("j_username");
  x[0].InnerText = "xxxxx";
  var y = webBrowser1.Document.All.GetElementsByName("j_password");
  y[0].InnerText = "xxxxxxxx";

//This part is not working....
 var s = webBrowser1.Document.GetElementById("formButtonGreen");
  s[0].InvokeMember("click");

Any one got any ideas?

Please note: I don’t own the website so can’t make changes to code behind webpage…

Thanks,

David

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T23:07:06+00:00Added an answer on June 9, 2026 at 11:07 pm

    You should try using .Document.Body.GetElementsByTagName("input") which should help you get the button element and later you can use InvokeMember("click") on that element.

    This will return a collection of matching elements, so if there are more than one you will have to identify it from the attributes by looping over it and then trigger for the one you need.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code on a webpage: <div id=emails> <ul> <li>email1</li> <li>email2</li> </ul>
I have the following code in my webpage - the map div is not
I have the following HTML code: <div id=Activity class=rep_tb0 style=width: 100%> <div class=rep_tr0 style=width:
I have following code <div id=main> <div id=one> </div> <div id=two> </div> <div id=three>
I have the following code: <a class=button href=javascript:ShowHide('elaborate_1') style=font-size:24px; padding:0 10px; margin-left:10px;>COLLAPSE</a> <div id=elaborate_1
I have the following html: <div class=canvas red> <div> <div class=canvas blue> <div> has
The following code below launches a float-in div when my webpage loads, however I
I have written a HTML page which has following code. <div id=adsListContainer style=margin: 5px;>
I have the following code which formats a table on a webpage like this:
The following page code have a problem that when i minimize the webpage the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.