Solved

submit without a button

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
bootstrap footer centering and expand problems 7 42
CSS Logo Problem. 2 20
Input box width 6 25
Html5 string 3 20
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
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…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

786 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