0

I create quick view for my site but its shows below error in ipad/iphone

magento XMLHttpRequest cannot load . No 'Access-Control-Allow-Origin' header is present on the requested resource.  is therefore not allowed access.

i use
<a href="#" data-fancybox-type="ajax" onclick="QuickView('<?php echo Mage::getUrl('index/view/id/'.$_product->getId());?>');return false;" title="<?php echo $this->__('Quick View') ?>" class="button detail-bnt"><span><?php echo $this->__('Quick View') ?></span></a>

12
  • please contact to extension support they are solve your problem
    – Keyul Shah
    Sep 19, 2014 at 8:03
  • its own extension...
    – Vishal
    Sep 19, 2014 at 8:26
  • ohooo then you have to update the code
    – Keyul Shah
    Sep 19, 2014 at 8:38
  • 1
    This question appears to be off-topic because it is about third party extension
    – Dexter
    Sep 19, 2014 at 8:39
  • Any idea about error?
    – Vishal
    Sep 19, 2014 at 8:44

2 Answers 2

1

There have Two right answer:

1) No 'Access-Control-Allow-Origin' header is present on the requested resource

2) No Access-Control-Allow-Origin header is present on the requested resource

Instead of using setHeader method I have used addHeader.

response.addHeader("Access-Control-Allow-Origin", "*");

response.addHeader("Access-Control-Allow-Origin", "http://www.example.com");

On your site this was working enter image description here

0

The error means: You need to add an Access-Control-Allow-Origin HTTP Header.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.