Forums

IMPORTANT: We have migrated to new forum engine. Some passwords were reset during migration. If you cannot log in now, try to restore password. If you still cannot login or have any other problems with new forum, please email to support@aurigma.com.
Welcome Guest Search | Active Topics | Members

Image uploader will not install on Firefox - No errors just freezes Options
stewsterl
Posted: Wednesday, January 30, 2008 10:17:09 AM
Rank: Member
Groups: Member

Joined: 1/14/2008
Posts: 17
Points: 51
Does anyone know why my image uploader code causes firefox not to install?

A test page with an example of the issue can be found here.

http://www.cplanet.com/Content_Forms/ImagesTest.aspx

My code is as follows:

<script type="text/javascript">
//Create JavaScript object that will embed Image Uploader to the page.
//var noofimages = document.getElementById("HiddenFieldUploadCount").value;

var iu = new ImageUploaderWriter("ImageUploader1", 650, 250);
//var noofimages = <%=MaxFileCount%>

//For ActiveX control full path to CAB file (including file name) should be specified.
iu.activeXControlCodeBase = "../Content_Forms/imageuploader/ImageUploader5.cab";
iu.activeXControlVersion = "5,0,15,0";

//For Java applet only path to directory with JAR files should be specified (without file name).
iu.javaAppletJarFileName = "ImageUploader5.jar";
iu.javaAppletCodeBase = "../Content_Forms/imageuploader/";
iu.javaAppletCached = true;
iu.javaAppletVersion = "5.0.15.0";
iu.showNonemptyResponse = "off";

//Configure License Keys
iu.addParam("LicenseKey", "71050-10000-9C668-ACC40-57469;72050-10000-02229-C2DEF-C0586");



//check if user has imageuploader installed
if (!iu.getActiveXInstalled()) {
alert("Image Uploader is not installed.");
}

//Debug window
iu.addParam("ShowDebugWindow", "true");

//Configure file uplaod restrictions.
var message = 'There is maximum of 25 images per gallery. You can only upload ' + <%=MaxFileCount%> + ' more image(s)';
iu.addParam("FileMask", "*.jpg;*.jpeg;*.jpe;*.bmp;*.gif");
iu.addParam("MessageMaxFileCountExceededText", message);
iu.addParam("MaxFileCount", "2" );
iu.addParam("MaxFileSize", "4000000");
iu.addParam("MessageMaxFileSizeExceededText", "The file [Name] cannot be selected. This file size exceeds the limit ([Limit] KB).");


//Configure appearance.
iu.addParam("PaneLayout", "ThreePanes");
iu.addParam("FolderView", "Thumbnails");

iu.addParam("BackgroundColor", "#eff1f9");
iu.addParam("ShowUploadListButtons", "true");
iu.addParam("ButtonRemoveFromUploadListText", "");
iu.addParam("ButtonRemoveAllFromUploadListText", "");

iu.addParam("ShowDescriptions", "false");
iu.addParam("ShowButtons", "false");
iu.addParam("AllowRotate", "true");
iu.addParam("UploadSourceFile", "false");

//Hide standard upload pane.
iu.addParam("FolderPaneHeight", "-1");

//used for thumbnails
iu.addParam("UploadThumbnail1FitMode", "Fit");
iu.addParam("UploadThumbnail1Width", "125");
iu.addParam("UploadThumbnail1Height", "125");
iu.addParam("UploadThumbnail1JpegQuality", "70");

//used for full sized image
iu.addParam("UploadThumbnail2FitMode", "Fit");
iu.addParam("UploadThumbnail2Width", "1024");
iu.addParam("UploadThumbnail2Height", "768");
iu.addParam("UploadThumbnail2JpegQuality", "70");

//Configure URL files are uploaded to.
iu.addParam("Action", "uploadTest.aspx");


//Add event handlers.
iu.addEventListener("UploadFileCountChange", "ImageUploader_UploadFileCountChange");
iu.addEventListener("BeforeUpload", "beforeUploadHandler");
iu.addEventListener("AfterUpload", "ImageUploader_AfterUpload");
iu.fullPageLoadListenerName = "fullPageLoad";

function ImageUploader_AfterUpload(){

showimages();
}

function beforeUploadHandler() {

var galleryid = document.getElementById("HiddenFieldGalleryId").value;
getImageUploader("ImageUploader1").AddField("GalleryId", document.getElementById("HiddenFieldGalleryId").value);
ImageUploader_BeforeUpload();
}

//Tell Image Uploader writer object to generate all necessary HTML code to embed
//Image Uploader to the page.
iu.writeHtml();
</script>
George Ulyanov
Posted: Wednesday, January 30, 2008 8:37:36 PM
Rank: Advanced Member
Groups: Member

Joined: 7/26/2006
Posts: 198
Points: -4,086
Location: Solar System, Sun-3 (Earth/Terra), Eurasia Contine
Hello,

Please, check the script problems before (you can use Internet Explorer for this, just switch Script Debugging mode on in it).

Regards,
George Ulyanov.

Software Developer, Aurigma Development Department.
stewsterl
Posted: Thursday, January 31, 2008 11:46:36 AM
Rank: Member
Groups: Member

Joined: 1/14/2008
Posts: 17
Points: 51
I figured out why it is crashing and I think it is a bug with the image uploader.

Here is the senerio:

If you add any Javascript in the head or form tags using <%= %> it will crash the image uploader Java version (Firefox)

I tested this by simply adding the following code in the head tags to your BasicDemo.


<script type="text/javascript">

function ConfigureDialog()
{

var ispostback = <%= LCase(Page.IsPostBack) %>;
if (ispostback == false)
{
alert('inside');

}
}
</script>

<body onload="ConfigureDialog()">
Alex Makhov
Posted: Friday, February 15, 2008 9:59:01 PM

Rank: Advanced Member
Groups: Administration , Member

Joined: 8/3/2003
Posts: 996
Points: 1
Hello,

Actually, I see another problem here. Image Uploader embedding script (iuembed.js) uses Body.OnLoad for its internal needs thus you cannot attach to this event directly. You could use fullPageLoadListenerName variable of ImageUploaderWriter. Here is the example code:
Code:
var iu = new ImageUploaderWirter(…)

iu.fullPageLoadListenerName = "ConfigureDialog";
iu. writeHtml();

ConfigureDialog function will be called right after both page (Body.OnLoad) and Image Uploader completely initialized.


Sincerely yours,
Alex Makhov.

Not in Aurigma any more. But still with my clients. Want to know the last news about Image Uploader? Visit my blog on Aurigma Blogs.
stewsterl
Posted: Tuesday, February 19, 2008 12:11:20 PM
Rank: Member
Groups: Member

Joined: 1/14/2008
Posts: 17
Points: 51
Thank you!

This was the issue... It finally works now.
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.

Main Forum RSS : RSS

YAFVision Theme Created by Jaben Cargman (Tiny Gecko)
Yet Another Forum.net version 1.9.1.6 running under Cuyahoga.
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.