After complete the Ajax request I am getting a popup. I need below text in html format but it is showing as it is. I need link text with html format.

Mage::app()->getResponse()->setHeader('Content-Type', 'text/html')->setBody('Please click here <a href="#">link</a> to run the import process');
  • Please share the ajax code that you are using, also check the dataType parameter in your ajax request, if it's not set then set it to dataType:"html" Commented Dec 8, 2016 at 13:39
  • I am not using any ajax code. I am using observer in magento and after complete the request I want to send the message in html format in popup
    – Jack
    Commented Dec 9, 2016 at 4:30

1 Answer 1


generally popups dont support links and html. You will have to send the response to trigger a js function and in that js function , using the returned response, you can either show some popup OR populate the desired html in a preset div OR add a styled popup control that supports html and show your desired html content in it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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