Solved

replacement of "input type=submit"

Posted on 1997-11-24
10
228 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
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 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
The viewer will learn how to count occurrences of each item in an array.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

808 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