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

Notification

Icon
Error

Options
Go to last post Go to first unread
stewsterl  
#1 Posted : Friday, February 1, 2008 3:19:28 AM(UTC)
stewsterl

Rank: Member

Groups: Member
Joined: 1/14/2008(UTC)
Posts: 18

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.

Code:
<script type="text/javascript">
function ConfigureDialog()
{

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

<body onload="ConfigureDialog()"> 



Is there a fix for this?

Edited by user Monday, February 11, 2008 4:10:39 PM(UTC)  | Reason: Not specified

Fedor  
#2 Posted : Monday, February 11, 2008 4:11:13 PM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,660

Thanks: 5 times
Was thanked: 76 time(s) in 74 post(s)
What exact error do you receive?
Best regards,
Fedor Skvortsov
stewsterl  
#3 Posted : Tuesday, February 12, 2008 10:46:40 PM(UTC)
stewsterl

Rank: Member

Groups: Member
Joined: 1/14/2008(UTC)
Posts: 18

I dont get an error it just freezes up the browser. It starts to open and then gets bogged down then freezes.
Andrew  
#4 Posted : Wednesday, February 13, 2008 4:01:07 PM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
Joined: 8/2/2003(UTC)
Posts: 876

Thanks: 2 times
Was thanked: 27 time(s) in 27 post(s)
In fact my opinion that it cannot happen because of <%=%> syntax even in theory. When the browser loads the page, it does not see these tags at all, it sees what server inserted as a result of ASP.NET expression you specify there.

So if the problem exist, it may depend on:

1. Actual value returned by LCase(Page.IsPostBack) expression. At first time load it is always "false", but probably you get garbage or empty value if ASP.NET does not work properly (although it is very unlikely). If possible, try to check what actual HTML the browser opens up.

2. The fact that alert dialog appears during Java applet initialization. This is modal dialog, and probably it prevents the applet to be created successfully until it is opened. If it crashes for you after this alert appears, try to see whether there is any correlation between crash and the moment when it appears or closed.

I just tried to reproduce the problem but was not able to do this. It just displays alert "inside" and applet loads up.

I tested Image Uploader Java 5.0.40, Firefox 2.0.0.12, Windows XP. I used the following code:

Code:

<%@ Page Language="VB" %>
<!--BEGIN-->
<!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>
	<title>Aurigma Image Uploader - Basic Demo</title>

	<script type="text/javascript" src="../iuembed.js"></script>

	<link href="style.css" type="text/css" rel="stylesheet" />
<script type="text/javascript">
function ConfigureDialog()
{

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

</head>

<body onload="ConfigureDialog()">
	<!-- text block omitted for brevity -->
	
	<script type="text/javascript">
//<![CDATA[
//Create JavaScript object that will embed Image Uploader to the page.
var iu = new ImageUploaderWriter("ImageUploader1", 650, 400);

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

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

iu.showNonemptyResponse = "off";

// params are omitted for brevity - but they are the same as in Basic Demo

iu.writeHtml();
//]]>
	</script>

</body>
</html>
<!--END-->


If you still have the problem, could you post the following information:

1. Image Uploader version you use.
2. Firefox version.
3. OS.
4. Java console output if possible. You can open the console window before the browser get freezed and make a screenshot if it freezes as well.
5. Additional details if available (see the beginning of this post).

Edited by user Wednesday, February 13, 2008 4:04:01 PM(UTC)  | Reason: Not specified

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.