10-18-2006, 07:58 PM
A little explanation of what Im trying to do. Say a user on a particular site has an image as their avatar. Now when they edit their profile they have the option to change that image.
Is it possible to call the Browse dialog (so they can choose a new local file to use as their avatar) without using the "Browse" input button? Ideally they would be able to click the existing image and that would act as the Browse button.
Is there a way to call that Browse action without using a form and input button?
Thanks in advance for any insight.
02-19-2007, 04:27 PM
Have you had any luck with this solution?
I too am having similar problems....
02-19-2007, 05:08 PM
why don't you want to do this in the first place? is it just for aesthetics?
if it is there are lots of ways to do it..
how about having a pop-up division that display the browse dialog?
02-19-2007, 07:51 PM
Thanks for the reply....But can you please suggest with some sample code....
this is what i'm doing...
document.getElementById('imgxyz').src = document.getElementById('test').value;
<form id="Form1" method="post" runat="server">
<asp:Button id="Button1" runat="server"
type="button" value="Button"><INPUT type="file" onchange="tt();" id="test"><IMG width="50" height="50" onclick="t();" id="imgxyz"
alt="" src=""> </form>
Now what i want is that when i click the image ......i call the Input File CLick event so that the dialog box opens up for me to select the image.....it works great in IE...but not in Firefox.....
02-20-2007, 08:59 AM
Can anybody please help me....its urent...
02-21-2007, 12:24 PM
ANybody with a solution to my problem......
please help...its urgent...
02-21-2007, 03:03 PM
There isn't one. You can't call the browse dialog box without the input with type="file". Maybe this will help
CSS2/DOM - Styling an input type="file" (http://www.quirksmode.org/dom/inputfile.html)