0

i have samce probelem
This code works in Internet Explorer. Not in anyother Why?

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="FileUploader.aspx.cs" Inherits="FileUploader" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
    <script type="text/javascript">
        function setImage()
        {
        debugger;
            var filepath=document.getElementById('<%=FileUpload1.ClientID %>');
            var simage=document.getElementById('<%=Image1.ClientID %>');
             var seimage=document.getElementById('<%=Image2.ClientID %>');
             filepath.click();  
            simage.src=filepath.value;
            seimage.src=filepath.value;
           // simage.href=filepath.value+''+simage.nameProp;
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:Image ID="Image1" runat="server" Width="200" Height="200"/>
        <img width="200" id="Image2" height="200" runat="server" />
        
        
    </div>
    <asp:FileUpload ID="FileUpload1" runat="server" onchange="setImage()"  />
    </form>
</body>
</html>

Edited by Ezzaral: Added code tags. Please use them to format any code that you post.

2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by Taywin
0

Old thread... Please create a new post for this. This is different issue even though it looks similar. The original thread was talking purely on JavaScript...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.