Forums

This topic is locked

Custom Browse Button

Posted 22 May 2003 10:05:40
1
has voted
22 May 2003 10:05:40 Aqomy FF posted:
Is it possible to use custom image to replace default Browse button in form input file field?

Replies

Replied 22 May 2003 14:13:42
22 May 2003 14:13:42 Jonathan Danylko replied:
Yes, use the Input...Image type.

<pre id=code><font face=courier size=2 id=code>
&lt;script language="JavaScript"&gt;
&lt;!--
function ConfirmProcess(strConfirmMessage, strFormName)
{
if (confirm(strConfirmMessage)){
document.strFormName.submit();
}
}
//--&gt;
&lt;/script&gt;

&lt;form name="myForm" method="post" action="deletecustomer.asp"&gt;
&lt;td align=center valign="middle"&gt;
&lt;input....&gt;
&lt;input....&gt;
&lt;input type="image" value=" Delete " src="images/ks_delete.gif"
alt="delete" onClick="ConfirmProcess('Are you sure you want to
process?', 'myForm')"&gt;
&lt;/td&gt;
&lt;/form&gt;
</font id=code></pre id=code>


L8R,
Vitoman, M CIW D, MMCP
----------------------------------
He conquers who endures. - Persius
Replied 30 Jul 2008 08:53:26
30 Jul 2008 08:53:26 Steve Davis replied:
WRONG - you obviously didn't read the question properly.

Your solution will work for a submit, reset or button but will not work for browse becase you are (obviously) changing the input type from "file" to "image".

In fact, there is no easy or reliable or cross-browser way to do this.

All the best, Steve

Me? I can't even spell ASP!
Replied 19 Aug 2008 19:38:37
19 Aug 2008 19:38:37 satheesh Dominic replied:
I do n't think, it will be possible!
<img src=../images/dmxzone/forum/icon_smile_sad.gif border=0 align=middle>

Reply to this topic