submit without a button

Posted on 1998-10-12
Last Modified: 2010-04-09
I have the code:
<form method="POST" action="">
  <p><input type="text" name="T1" size="20"></p>
  <p><input type="submit" value="Submit" name="B1"></p>
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.
Question by:donb1
  • 2
LVL 11

Accepted Solution

mouatts earned 50 total points
ID: 1838642
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.


Expert Comment

ID: 1838643
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>


Expert Comment

ID: 1838644
should be


Author Comment

ID: 1838645
The javascript works - Thanks to martinag

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
HTML and CSS for a complex page 20 61
Bootstap Icons 3 44
html coding on my Tumblr blog 1 34
Convert html page to a php post email form automatically? 10 29
Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

920 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

16 Experts available now in Live!

Get 1:1 Help Now