Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

submit without a button

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
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.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
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…

856 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