Solved

submit without a button

Posted on 1998-10-12
4
129 Views
Last Modified: 2010-04-09
I have the code:
<form method="POST" action="http://www.abc.com/cgi-bin/aa.pl">
  <p><input type="text" name="T1" size="20"></p>
  <p><input type="submit" value="Submit" name="B1"></p>
</form>
This puts a button in with the name submit in it.  Is there a way to have only a text submit without a button?  If so, please give the code.
0
Comment
Question by:donb1
  • 2
4 Comments
 
LVL 11

Accepted Solution

by:
mouatts earned 50 total points
Comment Utility
In theory you could but an <A onclick=document.form[0].submit()">Click here</a>

But the onlick does work on Netscape on Wintel(and maybe IE I cant remember)

The other alternative is to use <INPUT TYPE="IMAGE" SRC="x.jpg"> Where x.jpg is an image file that contains an image of the text that you want.


0
 
LVL 4

Expert Comment

by:martinag
Comment Utility
Almost correct...You can use an link and make it work in both IE and Netscape:
<A HREF="javascript:document.form[0].submit()">Click here</a>

Martin
0
 
LVL 4

Expert Comment

by:martinag
Comment Utility
form[0]
should be
forms[0]

Martin
0
 

Author Comment

by:donb1
Comment Utility
The javascript works - Thanks to martinag
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now