1 Reply Latest reply on Nov 7, 2008 4:49 AM by m_hartnett

    Problem with loading image

    sri harsha namala Level 2
      Hi

      I cant able to load the image my code is so simple whats the problem please help me........

      when me using the image tag its able to load but while using from the script its unable to load why??
      but i want it to be loaded in the same format..........(D:\images\azshear\SHAR-29-10-2006-21.0.jpg),is it possible??
        • 1. Re: Problem with loading image
          m_hartnett Level 3
          You need to use a double slash to escape the source attribute in the function. Unfortunately you cannot use the escape global method because it ignores the slash character.

          img.source="D:\\images\\azshear\\SHAR-29-10-2006-21.0.jpg";

          Another way to code this is to use a forward slash instead of a double back slash.

          img.source="D:/images/azshear/SHAR-29-10-2006-21.0.jpg";

          It works for the Image tag because the image tag will escape the slash character