Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
check for files
Amanda_J_0204
Running Teamsite 6.7.2 on Windows 2003
I'm trying to set a template to check to see whether or not an image was successfully saved. At the moment, the template will check correctly the first time a user tries to save: if the image is not saved, it will return an alert saying the image wasn't saved. However, at that point, if the user goes back and saves the image (while keeping the template open - they select and save the image via the template), it does not check the image correctly, and displays the same alert that the image was not saved.
Is there something that would force the template to look at the file list again?
Background: We have a form that allows users to select an image, crop it using a .net application, and then saves the cropped image. The cropping portion works fine; however, we've had issues with getting the .net application to communicate with the template, so, at the moment, the new file name for the cropped image gets saved in the template, regardless of whether or not the user actually saves it. We've been trying to resolve the issue by referencing a .net service to see if the image exists. This should be working fine, but there are issues that would take too long to write out here.
Here is the function:
function checkImage(thisAssetPath) {
var img = new Image();
img.onerror = function() {
alert("the picture " + this.src + " could not be loaded.");
}
img.src="/iw-mount/default/main/myBranch/WORKAREA/Content/" + thisAssetPath;
}
This gets called by:
if (IWDatacapture.getItem(myAsset).getValue() != "") {
thisAssetPath=IWDatacapture.getItem(myAsset.getName() + "/AssetLarge").getValue();
alert(thisAssetPath);
checkImage(thisAssetPath);
Find more posts tagged with
Comments
There are no comments yet