Solved

replacement of "input type=submit"

Posted on 1997-11-24
10
223 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
Comment Utility
Try:

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

-julio
0
 
LVL 2

Accepted Solution

by:
rigansen earned 100 total points
Comment Utility
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
Comment Utility
As said, expertise on this site has become a joke.
0
 
LVL 2

Expert Comment

by:rigansen
Comment Utility
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
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 84

Expert Comment

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

Expert Comment

by:rigansen
Comment Utility
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
Comment Utility
where have I to put the "values"?

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

Expert Comment

by:rigansen
Comment Utility
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
Comment Utility
Sorry, but this all may be done with simple HTML... anyway, i won't insist anymore.

Good luck.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
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…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

762 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

13 Experts available now in Live!

Get 1:1 Help Now