小编sab*_*ari的帖子

图像上传部分中的跨浏览器图像预览在ie8中不起作用

我网站上传图片部分的图片预览在IE8 +浏览器中不起作用.但在IE7和IE6中工作正常.我使用下面的代码进行图像预览功能. JS:

var loadImageFile = (function () {
    if (window.FileReader) {
        var oPreviewImg = null, oFReader = new window.FileReader(),
            rFilter = /^(?:image\/bmp|image\/cis\-cod|image\/gif|image\/ief|image\/jpeg|image\/jpeg|image\/jpeg|image\/pipeg|image\/png|image\/svg\+xml|image\/tiff|image\/x\-cmu\-raster|image\/x\-cmx|image\/x\-icon|image\/x\-portable\-anymap|image\/x\-portable\-bitmap|image\/x\-portable\-graymap|image\/x\-portable\-pixmap|image\/x\-rgb|image\/x\-xbitmap|image\/x\-xpixmap|image\/x\-xwindowdump)$/i;

        oFReader.onload = function (oFREvent) {
            if (!oPreviewImg) {
                var newPreview = document.getElementById("imagePreview");
                oPreviewImg = new Image();
                oPreviewImg.style.width = (newPreview.offsetWidth).toString() + "px";
                oPreviewImg.style.height = (newPreview.offsetHeight).toString() + "px";
                newPreview.appendChild(oPreviewImg);
            }
            oPreviewImg.src = oFREvent.target.result;
        };

        return function () {
            var aFiles = document.getElementById("imageInput").files;
            if (aFiles.length === 0) { return; }
            if (!rFilter.test(aFiles[0].type)) { alert("You must select a valid image file!"); …
Run Code Online (Sandbox Code Playgroud)

javascript upload internet-explorer image cross-browser

6
推荐指数
1
解决办法
5118
查看次数

将产品添加到亚马逊卖家中心时如何添加价格和数量详细信息使用亚马逊MWS?

我正在使用亚马逊MWS Feeds API将产品添加到亚马逊卖家中央商店.当我使用亚马逊的Feeds API Section Reference中的示例时,产品无需价格即可添加到商店.我添加了以下用于向亚马逊卖家中央商店添加产品的代码.

<?xml version="1.0" encoding="iso-8859-1"?>
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
    <Header>
        <DocumentVersion>1.01</DocumentVersion>
        <MerchantIdentifier>M_EXAMPLE_123456</MerchantIdentifier>
    </Header>
  <MessageType>Product</MessageType>
  <PurgeAndReplace>false</PurgeAndReplace>
  <Message>
    <MessageID>1</MessageID>
    <OperationType>Update</OperationType>
    <Product>
        <SKU>TEST1234</SKU>
        <StandardProductID>
          <Type>ASIN</Type>
          <Value>B0EXAMPLEG</Value>
        </StandardProductID>
        <ProductTaxCode>A_GEN_NOTAX</ProductTaxCode>
        <DescriptionData>
          <Title>Example Product Title</Title>
          <Brand>Example Product Brand</Brand>
          <Description>This is an example product description.</Description>
          <MSRP currency="USD">25.19</MSRP>
          <Manufacturer>Example Product Manufacturer</Manufacturer>
          <ItemType>example-item-type</ItemType>
        </DescriptionData>
        <ProductData>
          <Health>
            <ProductType>
              <HealthMisc>
                <Ingredients>Example Ingredients</Ingredients>
                <Directions>Example Directions</Directions>
              </HealthMisc>
            </ProductType>
          </Health>
        </ProductData>
    </Product>
  </Message>
</AmazonEnvelope>
Run Code Online (Sandbox Code Playgroud)

有谁知道这个问题并告诉我如何修复它以及如何在上面的代码中添加数量?我使用了来自Amazon Feed API参考的代码.

php amazon amazon-web-services amazon-mws

5
推荐指数
1
解决办法
2408
查看次数

我们应该在亚马逊MWS PHP SDK中的APPLICATION_NAME和APPLICATION_VERSION字段中输入什么?

我不知道我应该在amazon MWS PHP库的下面的字段中输入什么

define('APPLICATION_NAME', '<Your Application Name>');  
define('APPLICATION_VERSION', '<Your Application Version or Build Number>'); 
Run Code Online (Sandbox Code Playgroud)

如果有人知道亚马逊MWS中的应用程序名称和版本,请说明应用程序名称和版本.

php amazon-web-services amazon-mws

2
推荐指数
1
解决办法
3551
查看次数