Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

Is it possible to provide iframe in spModal?

Sathwik1
Tera Guru

In portal, I had a sentence.. when I clicked on it..a popUp needs to open ... in that I want to show some website.. ex: w3 schools website... so what should I need to write?

HTML

<div>
  <p ng-click="c.clck()">Click here to open Popup</p>
</div>

Client controller

api.controller=function(spModal) {
  /* widget controller */
  var c = this;
    
     c.clck= function () {
        spModal.alert('How do you feel today?').then(function (answer) {   // In this line what should I write?
        });
     }
};

 

@Mohith Devatte @Ankur Bawiskar  In PopUp I need to show w3schools website

17 REPLIES 17

Ankur Bawiskar
Tera Patron

Hi,

which form is this? catalog or normal form?

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Ankur,

It's a widget..

harshkumbhani
Tera Contributor

Hi @Sathwik1 

You get a blank screen because the website uses the X-Frame-Options security header to prevent its content from being loaded within an iframe, a practice often implemented to mitigate general security risks.

Refer to this stackoverflow link for more information: 

https://stackoverflow.com/questions/7289139/why-are-iframes-considered-dangerous-and-a-security-risk