The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Input Type Button
darthvuder
post Oct 17 2014, 11:43 PM
Post #1





Group: Members
Posts: 1
Joined: 17-October 14
Member No.: 21,691



There is website that has an username and password field along with a "login" button as coded below.
I am writing a visual basic program that will auto fill in the username and password field, which now works.
Then, the login button will be clicked automatically. Usually this is called by an element onclick event but as can be seen below, I do not see an onclick definition in the input button declaration.
I am new to HTML and visualbasic but I don't see in this declaration what is called when the button is clicked.
Any help would be appreciated - Collin


<tr valign="bottom">
<td width="250px">
<p>My username is:</p>
<input type="text" name="username"/>
</td>
<td width="250px">
<p>My password is:</p>
<input type="password" name="password"/>
</td>
<td>
<input type="submit" class="button" value="Login" name="login"/>
</td>
</tr>
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
CharlesEF
post Oct 18 2014, 12:10 AM
Post #2


Programming Fanatic
********

Group: Members
Posts: 1,981
Joined: 27-April 13
From: Edinburg, Texas
Member No.: 19,088



Where is the rest of the code? The onsubmit is associated with the <form> tag. You would have to trigger the onsubmit through the <form> element.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Oct 18 2014, 06:01 AM
Post #3


.
********

Group: WDG Moderators
Posts: 9,630
Joined: 10-August 06
Member No.: 7



QUOTE(darthvuder @ Oct 18 2014, 06:43 AM) *

Usually this is called by an element onclick event but as can be seen below, I do not see an onclick definition in the input button declaration.
I am new to HTML and visualbasic but I don't see in this declaration what is called when the button is clicked.

A plain HTML form doesn't need an onclick event or client-side scripting to submit, that's part of the HTML/browser functionality (pressing the Enter key may submit a form too).

I don't know visual basic (or do you mean VBScript?), but in javascript you can use the submit() method to submit a form without clicking any buttons. But first you probably need to detect when the form fields have been filled in, perhaps with the javascript onpaste event.

Also note that only MSIE browsers support client side VBScript.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 28th March 2024 - 11:59 AM