Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
BrAiNumbc  
#1 Posted : Tuesday, March 17, 2015 6:36:54 AM(UTC)
BrAiNumbc

Rank: Member

Groups: Member
Joined: 2/12/2004(UTC)
Posts: 24

Was thanked: 1 time(s) in 1 post(s)
I've got an ASP.NET 4.5 web page with some ImageUploaderFlash controls on it.

These uploaders are all initially, programmatically set to be invisible. They're inside the ContentTemplate tag of an Updatepanel. Something on the page triggers the partial postback to make the uploaders visible and then suddenly in FIREFOX (IE is fine) the uploaders are just regular FileDialog BROWSE buttons. Ew.

Actually there are 4 updatepanels, each with 1 uploder in them. If the page loads and even ONE of these uploaders are initially set to visible, then when I'm doing partial postbacks on other parts of the page and the uploaders are told to become visible, they're fine, but INITIALLY when the page loads if there are NO (zero) uploaders initially invisible, then when they're told to become visible, they're just fileupload boxes

It's as if an image uploader MUST exist on the initial page loading. If there isn't a single uploader visible, but a partial postback renders HTML that includes the uploader then it just becomes a regular upload button.

I managed a "workaround" where at the bottom of the page I put an ImageUploaderFlash control inside a DIV where the style="visibility: hidden" so that technically there is always at least one ImageUploaderFlash control rendered when the page loads.., that way when one of the other uploaders is made visible through a postback that udates the HTML, whatever is supposed to be initialized will already be initialized.

it's annoying, but it works.

I figured I would post it here for two reasons

1) Hopefully this will be fixed with a future release or maybe Aurigma knows something else I can do so I don't have to create this "dummy uploader".

2) If someone else runs into this problem, it will help.

Dmitri  
#2 Posted : Wednesday, March 18, 2015 1:42:34 AM(UTC)
Dmitri

Rank: Advanced Member

Groups: Member
Joined: 6/10/2013(UTC)
Posts: 34

Was thanked: 1 time(s) in 1 post(s)
Do you use ASP.NET controls?

The first thing I would suggest is to try to insert the uploader using a JavaScript API instead of the ASP.NET control. Like this:

Code:
  <script type="text/javascript" src="Scripts/aurigma.imageuploaderflash.js">  </script>
    <script type="text/javascript" src="Scripts/aurigma.htmluploader.control.js">  </script>
    <link rel="stylesheet" type="text/css" href="Scripts/css/aurigma.htmluploader.control.css" />
    <script type="text/javascript">
        var u = $au.imageUploaderFlash({
            id: 'Uploader1',
            width: '650px',
            height: '480px',
            licenseKey: 'XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXXX',
            converters: [
                { mode: '*.*=SourceFile' }
            ], 
            uploadSettings: {
                actionUrl: 'Upload.aspx',
                redirectUrl: 'Catalog.aspx'
            }
        });
        
        u.writeHtml();
    </script>

Edited by user Wednesday, March 18, 2015 1:43:24 AM(UTC)  | Reason: Not specified

Best regards,

Dmitri Vorobyov

BrAiNumbc  
#3 Posted : Wednesday, March 18, 2015 5:44:49 AM(UTC)
BrAiNumbc

Rank: Member

Groups: Member
Joined: 2/12/2004(UTC)
Posts: 24

Was thanked: 1 time(s) in 1 post(s)
I do use the ASP.NET controls.

In the future if I have to create a similar page I'll try using the JavaScript API. I'm worried that I'll run into the same problem though: This script being inside an updatepanel, the html/javacsript won't be rendered at all at first, but only visible on a partial postback within the page, so when whatever object the script is wrapped around (a div with a runat="server" property) becomes visible, then it's supposed to appear, it will just be a FileDialog control again

I would just go ALL javascript for the hiding and showing of things inside the page, but then I wouldn't be using the UpdatePanel control which is just so slick and easy to use.

Originally Posted by: Dmitri Go to Quoted Post
Do you use ASP.NET controls?

The first thing I would suggest is to try to insert the uploader using a JavaScript API instead of the ASP.NET control. Like this:

Code:
  <script type="text/javascript" src="Scripts/aurigma.imageuploaderflash.js">  </script>
    <script type="text/javascript" src="Scripts/aurigma.htmluploader.control.js">  </script>
    <link rel="stylesheet" type="text/css" href="Scripts/css/aurigma.htmluploader.control.css" />
    <script type="text/javascript">
        var u = $au.imageUploaderFlash({
            id: 'Uploader1',
            width: '650px',
            height: '480px',
            licenseKey: 'XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXXX',
            converters: [
                { mode: '*.*=SourceFile' }
            ], 
            uploadSettings: {
                actionUrl: 'Upload.aspx',
                redirectUrl: 'Catalog.aspx'
            }
        });
        
        u.writeHtml();
    </script>

Edited by user Wednesday, March 18, 2015 5:46:13 AM(UTC)  | Reason: Not specified

Dmitri  
#4 Posted : Thursday, March 19, 2015 1:37:22 AM(UTC)
Dmitri

Rank: Advanced Member

Groups: Member
Joined: 6/10/2013(UTC)
Posts: 34

Was thanked: 1 time(s) in 1 post(s)
I suspect the similar effect may occur if the browser does not apply CSS styles (which may happen because they are loaded later than the entire page). Try to include the uploader's CSS file statically:

<link rel="stylesheet" type="text/css" href="../aurigma/last/fh/css/aurigma.htmluploader.control.css" />

This file can be found in the Scripts folder of the Upload Suite SDK.

Edited by user Thursday, March 19, 2015 1:37:59 AM(UTC)  | Reason: Not specified

Best regards,

Dmitri Vorobyov

Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.