Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

replacement of "input type=submit"

Posted on 1997-11-24
10
Medium Priority
?
240 Views
Last Modified: 2013-12-25
I would like to replace the ugly standard submit button
with an image. The try with

"<input type=image src="button.gif" value="Logout">"

does not works.


<form method=post action="cc.cgi" target="_top">
<input type=hidden name="raum" value="Treffpunkt">
<input type=hidden name="name" value="Renate">
<input type=hidden name="where" value="Logout">
<input type=submit value="Logout">

Thanks for your help

0
Comment
Question by:nadia
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 5

Expert Comment

by:julio011597
ID: 1831336
Try:

<input type=image src="my.gif" name="Logout">

-julio
0
 
LVL 2

Accepted Solution

by:
rigansen earned 400 total points
ID: 1831337
add this to your form:

<form name="theForm" ... >
<input type=image border=0 src="button.gif" onClick="document.theForm.submit()">
</form>

any problem, just leave a comment.

regards, rigansen.
0
 
LVL 5

Expert Comment

by:julio011597
ID: 1831338
As said, expertise on this site has become a joke.
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 2

Expert Comment

by:rigansen
ID: 1831339
It took me about an hour since I saw the question until I replied the answer. If you would have replied your comment as an answer, nothing like this should have ever happened.

I didn't know about your first comment until I got the e-mail due to your second silly comment.

rigansen.
0
 

Author Comment

by:nadia
ID: 1831340
Have tried but does not works because there are 3
submit buttons with the same name but different
values in the form

- <input type=submit name=\"where\" value=\"$send\">

- <input type=submit name=\"where\" value=\"who\">

- <input type=submit name=\"where\" value=\"logout">
0
 
LVL 85

Expert Comment

by:ozo
ID: 1831341
<input type=image src="logout.gif" name="where">
<input type=image src="who.gif" name="where">
0
 
LVL 2

Expert Comment

by:rigansen
ID: 1831342
I'm using Netscape and wasn't sure this could work on IE, that's why I added the onClick() event, thought that way it could work on both for sure...

using ozo's piece of code:

<form method=post action="cc.cgi" target="_top">
<input type=hidden name="raum" value="Treffpunkt">
<input type=hidden name="name" value="Renate">
<input type=hidden name="where" value="Logout">
<input type=image border=0 src="send.gif" name="where">
<input type=image border=0 src="who.gif" name="where">
<input type=image border=0 src="logout.gif" name="where">
</form>

rigansen.
0
 

Author Comment

by:nadia
ID: 1831343
where have I to put the "values"?

(3 different functions with "where")
0
 
LVL 2

Expert Comment

by:rigansen
ID: 1831344
sorry for delay,
if you need the "values" for the cc.cgi, I think that you'll have to create a hidden field, because the type=image are not sent to the cgi.
From my last comment, only the type=hidden will be sent, so try this out:

<html>
<script>
function mySubmit(which)
{
   document.theForm.btnval.value = which;
   document.theForm.submit();
}
</script>
<body>
<form name="theForm" method=post action="cc.cgi" target="_top">
<input type=hidden name="raum" value="Treffpunkt">
<input type=hidden name="name" value="Renate">
<input type=hidden name="where" value="Logout">
<input type=hidden name="btnval" value="">
<a href="javascript:mySubmit('send')"><img src="send.gif" border=0></a>
<a href="javascript:mySubmit('who')"><img src="who.gif" border=0></a>
<a href="javascript:mySubmit('logout')"><img src="logout.gif" border=0></a>
</form>
</body>
</html>

think it's the easier way to do it!!

rigansen.
0
 
LVL 5

Expert Comment

by:julio011597
ID: 1831345
Sorry, but this all may be done with simple HTML... anyway, i won't insist anymore.

Good luck.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

This article will show, step by step, how to integrate R code into a R Sweave document
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Suggested Courses

824 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