Solved

submit without a button

Posted on 1998-10-12
4
140 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
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.


0
 
LVL 4

Expert Comment

by:martinag
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>

Martin
0
 
LVL 4

Expert Comment

by:martinag
ID: 1838644
form[0]
should be
forms[0]

Martin
0
 

Author Comment

by:donb1
ID: 1838645
The javascript works - Thanks to martinag
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

730 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