Sir,
I have an issue with Rad-active I Load control.While uploading the image, it will display sometimes. Sometimes it won't display the image message and show a java script error in IE.The sample code for this application is shown below,
//<![CDATA[
function ILoad1_ValueChanged(controlId, webImage) {
if (webImage) {
var resize = webImage.GetResizeByName("Image2");
var str = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:90px; height:90px;\"><tr><td align=\"center\" valign=\"middle\">";
str += "<a href=\"javascript:void(0);\" onclick=\"Radactive.WebControls.ILoad.ShowImagePreview('<% =this.ILoad1.ClientID %>'); return false;\">";
str += "<img src=\"" + resize.FileUrl_NoCache() + "\" alt=\"\" style=\"border:none;\" />";
str += "</a>";
str += "</td></tr></table>";
document.getElementById("ILoad1_Image2").innerHTML = str;
}
else {
var str = "<table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:90px; height:90px;\"><tr><td align=\"center\" valign=\"middle\">";
str += "<a href=\"javascript:void(0);\" onclick=\"Radactive.WebControls.ILoad.ShowImagePreview('<% =this.ILoad1.ClientID %>'); return false;\">";
str += "<img src=\"../Images/CompanyLogo/noimage.jpg\" height=\"110px\" width=\"90px\" alt=\"\" style=\"border:none;\" />";
str += "</a>";
str += "</td></tr></table>";
document.getElementById("ILoad1_Image2").innerHTML = str;
}
}
var ILoad1_PageLoad_Done = false;
var ILoad1_ControlInitialized_Done = false;
function ILoad1_PageLoad() {
if (ILoad1_PageLoad_Done) {
return;
}
ILoad1_PageLoad_Done = true;
var controlId = "<% =this.ILoad1.ClientID %>";
ILoad1_ValueChanged(controlId, Radactive.WebControls.ILoad.GetValue(controlId));
}
function ILoad1_ControlInitialized(controlId, webImage) {
ILoad1_ControlInitialized_Done = true;
listenEvent(window, "load", ILoad1_PageLoad);
}
//]]>
</script>
<script type="text/javascript">
//<![CDATA[
if (ILoad1_ControlInitialized_Done) {
ILoad1_PageLoad();
}
//]]>
</script>
The screen shot for the error message is attached below. Please reply ASAP.
Thanks in Advance
Anju S Chandran
I have an issue with Rad-active I Load control.While uploading the image, it will display sometimes. Sometimes it won't display the image message and show a java script error in IE.The sample code for this application is shown below,
<script type="text/javascript">//<![CDATA[
function ILoad1_ValueChanged(controlId, webImage) {
if (webImage) {
var resize = webImage.GetResizeByName("Image2");
var str = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:90px; height:90px;\"><tr><td align=\"center\" valign=\"middle\">";
str += "<a href=\"javascript:void(0);\" onclick=\"Radactive.WebControls.ILoad.ShowImagePreview('<% =this.ILoad1.ClientID %>'); return false;\">";
str += "<img src=\"" + resize.FileUrl_NoCache() + "\" alt=\"\" style=\"border:none;\" />";
str += "</a>";
str += "</td></tr></table>";
document.getElementById("ILoad1_Image2").innerHTML = str;
}
else {
var str = "<table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:90px; height:90px;\"><tr><td align=\"center\" valign=\"middle\">";
str += "<a href=\"javascript:void(0);\" onclick=\"Radactive.WebControls.ILoad.ShowImagePreview('<% =this.ILoad1.ClientID %>'); return false;\">";
str += "<img src=\"../Images/CompanyLogo/noimage.jpg\" height=\"110px\" width=\"90px\" alt=\"\" style=\"border:none;\" />";
str += "</a>";
str += "</td></tr></table>";
document.getElementById("ILoad1_Image2").innerHTML = str;
}
}
var ILoad1_PageLoad_Done = false;
var ILoad1_ControlInitialized_Done = false;
function ILoad1_PageLoad() {
if (ILoad1_PageLoad_Done) {
return;
}
ILoad1_PageLoad_Done = true;
var controlId = "<% =this.ILoad1.ClientID %>";
ILoad1_ValueChanged(controlId, Radactive.WebControls.ILoad.GetValue(controlId));
}
function ILoad1_ControlInitialized(controlId, webImage) {
ILoad1_ControlInitialized_Done = true;
listenEvent(window, "load", ILoad1_PageLoad);
}
//]]>
</script>
<script type="text/javascript">
//<![CDATA[
if (ILoad1_ControlInitialized_Done) {
ILoad1_PageLoad();
}
//]]>
</script>
The control creation is like this,
<RAWCIL:ILoad ID="ILoad1" runat="server" Appearance="Button" ForeColor="#0C55B1"
CssClass="button-new" Width="100px" Height="25px"><Configuration ManualTemporaryFolder="False"
OnCompleteBehavior="KeepFilesInTemporaryFolder"
WebPublishedDestinationFolder="True" CutMode="Manual" KeepSourceImage="False"
GenerateIconImage="False" GenerateSelectedImage="True"
GenerateIndexXMLFile="True" InternalCode="" Title="">
<TemporaryFolder Path="" UrlMode="Automatic" ManualUrl=""></TemporaryFolder>
<DestinationFolder Path="" UrlMode="Automatic" ManualUrl=""></DestinationFolder>
<WebImageDefinitions>
<Radactive.WebControls.ILoad.Configuration.WebImageDefinition InternalCode="Default" Title="Default"><SizeConstraint Mode="FreeSize">
<FixedSizeData Size="400, 300"></FixedSizeData>
<FixedAspectRatioSizeData Size="400, 300" LimitedDimension="Width">
<Limits>
<LowLimit Enabled="False" Value="300"></LowLimit>
<HiLimit Enabled="False" Value="400"></HiLimit>
</Limits>
</FixedAspectRatioSizeData>
<FreeSizeData>
<LimitsW>
<LowLimit Enabled="False" Value="300"></LowLimit>
<HiLimit Enabled="False" Value="400"></HiLimit>
</LimitsW>
<LimitsH>
<LowLimit Enabled="False" Value="300"></LowLimit>
<HiLimit Enabled="False" Value="400"></HiLimit>
</LimitsH>
</FreeSizeData>
</SizeConstraint>
<OutputOptions FormatMode="Custom" Format="b96b3cae-0728-11d3-9d7b-0000f81ef32e" JPEGQuality="92" JPEGForceRecompression="False"></OutputOptions>
</Radactive.WebControls.ILoad.Configuration.WebImageDefinition></WebImageDefinitions><WindowsAppearance><ImageUploadWizardWindow WindowTitle="RADactive I-load" TopLogoImageUrl="" ShowWelcomePage="True" ShowSummaryPage="True" WelcomePageText="" ShowImagePreviewBeforeFileUpload="True" ShowSaveButtonDuringImageEdit="True" CropperCanvasColor="White" HTMLCropperCanvasColor="White" AutoZoomCropperView="True"></ImageUploadWizardWindow><PreviewWindow WindowTitle="RADactive I-load - Preview" AllowImageDownload="True" AllowImagePrint="True"></PreviewWindow></WindowsAppearance><InputOptions><UploadableFileSizeLimits><LowLimit Enabled="False" Value="1"></LowLimit><HiLimit Enabled="False" Value="2097152"></HiLimit></UploadableFileSizeLimits><SourceImageSizeLimitsW><LowLimit Enabled="False" Value="300"></LowLimit><HiLimit Enabled="False" Value="400"></HiLimit></SourceImageSizeLimitsW><SourceImageSizeLimitsH><LowLimit Enabled="False" Value="300"></LowLimit><HiLimit Enabled="False" Value="400"></HiLimit></SourceImageSizeLimitsH><FileExtensionValidator DefaultBehavior="AcceptAll" AcceptedFileExtensions="" NotAcceptedFileExtensions=""></FileExtensionValidator></InputOptions><ImageCropperOptions AllowImageResize="True" AllowImageZoom="True" AllowImageRotate="True" AllowImageFlip="True"></ImageCropperOptions></Configuration></RAWCIL:ILoad>
<div style="text-align:middle" id="ILoad1_Image2" class="ILoad_CustomAppearance_DivImage"
onmouseover="this.className='homeimghover'" onmouseout="this.className='ILoad_CustomAppearance_DivImage'">
</div>
The screen shot for the error message is attached below. Please reply ASAP.
Thanks in Advance
Anju S Chandran