Submitting a Form Without a Submit Button

Submitting a Form Without a Submit Button

Question:

How can I submit a form in ASP without a user clicking on a button? I tried:

nameofform.submit()

but I get the error:

Microsoft VBScript runtime error '800a01a8' Object required: ''

Answer:

Your code is correct, however, it needs to be run as Client side JavaScript code, not Server Side VB Script code. You will still need to figure out an event when the form will be submitted (even though it does not have a submit button). This event could be the loading of the page, the filling of a text box, the clicking of a check box, or so on. In the code for any of these events, call your function that in turn calls the .submit method of the form.

For example, if your form name is called ‘info’, then you could place code in the Window Onload event as follows:


Now when the page finishes loading, it kicks off the submit of the form also.

Share the Post:
Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular

XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved

AI is revolutionizing fraud detection

How AI is Revolutionizing Fraud Detection

Artificial intelligence – commonly known as AI – means a form of technology with multiple uses. As a result, it has become extremely valuable to a number of businesses across

AI innovation

Companies Leading AI Innovation in 2023

Artificial intelligence (AI) has been transforming industries and revolutionizing business operations. AI’s potential to enhance efficiency and productivity has become crucial to many businesses. As we move into 2023, several