Solved

replacement of "input type=submit"

Posted on 1997-11-24
10
225 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 100 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
 
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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 84

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Introduction This tutorial will give you a fast look what you can do with WhizBase. I expect you already know how to work with HTML at least, and that you understand the basics of the internet and how the internet works. WhizBase is a server-s…
It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
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…

911 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

20 Experts available now in Live!

Get 1:1 Help Now