Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New Coder
    Join Date
    Nov 2002
    Posts
    47
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Calling a Browse Dialog without an Input Button

    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.

  • #2
    New Coder
    Join Date
    Aug 2006
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi,

    Have you had any luck with this solution?

    I too am having similar problems....

    Cheers

  • #3
    Regular Coder
    Join Date
    Dec 2006
    Posts
    417
    Thanks
    168
    Thanked 1 Time in 1 Post
    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?

  • #4
    New Coder
    Join Date
    Aug 2006
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi,

    Thanks for the reply....But can you please suggest with some sample code....

    this is what i'm doing...

    <script language="javascript">
    function t()
    {
    document.getElementById('test').click();
    }
    function tt()
    {
    document.getElementById('imgxyz').src = document.getElementById('test').value;

    }
    </script>

    <body MS_POSITIONING="GridLayout">
    <form id="Form1" method="post" runat="server">
    <asp:Button id="Button1" runat="server"
    Text="Button"></asp:Button><INPUT onclick="t();"
    type="button" value="Button"><INPUT type="file" onchange="tt();" id="test"><IMG width="50" height="50" onclick="t();" id="imgxyz"
    alt="" src=""> </form>
    </body>


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

    Please help....

    thanks

    cheers

  • #5
    New Coder
    Join Date
    Aug 2006
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi,

    Can anybody please help me....its urent...

    Thanks

    Regards

  • #6
    New Coder
    Join Date
    Aug 2006
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi,

    ANybody with a solution to my problem......

    please help...its urgent...

    thanks

    regards

  • #7
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    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"
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •