cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
972
Views
0
Helpful
2
Replies

iFrame src path has "/gadgets/" added to it??

I have entered a very unfriendly alternate universe.  Can someone tell me why this is happening?

I have a gadget in which I'm trying to get inter-frame messaging (using postMessage()) working, but the path to the placeholder page I put into the HTML file's <iframe> is being mangled by Finesse into something that is then unable to be found (even after I added the paths on the gadget server and tested them successfully in a browser).  This halts all gadget functionality.

The body of my HTML page is:

<body>

  <button onclick="finesse.gadgets.Collusion.sendMockCall()" >On Call Begin</button><br/>


  <div id="collusion">

    <!-- setting this to an actual HTML page to get the contentWindow created, which will hopefully just be reused with new src -->

    <iframe id='internalpage' src="blank.html"></iframe>

  </div>


</body>


The error I get when Finesse loads the gadget is a Cisco-branded page (although it cannot find its own logo) with the following info on it:


type: Status report

message: /gadgets/blank.html

description: The requested resource (/gadgets/blank.html) is not available.


I have put this file into a 'gadgets/' folder in as many places on the web server as I can think of, and all of them return valid content in the browser, but none of them are found by Finesse.  Why is Finesse adding this spurious path to my filename?

2 Replies 2

Sascha Monteiro
Level 6
Level 6

Hi Christopher,

Is this body in your gadget xml?

I think the main purpose of an iframe in a gadget is to embed a page from an external webserver,

I think Finesse doesn't touch iframe src url's as it does with script and style src tags.

Is there a reason you can't just put the code from the blank.html in the gadget directly?

You talk about inter frame  messaging, will you have 2 iframes that need to communicate with each other?

I prefer to host my gadget on an external server, this gives us full control over it, and I don't use an iframe, it's already in one

That said, have you tried to use this as src="/3rdpartygadget/<my gadget dir>/blank.html" if you are using uccx hosted gadgets?

Hi Christopher,

Since gadgets are mini websites within the container, the behavior if the iframe is not exactly the same as a typical page. So, I would suggest using the absolute URL for the src of the blank.html in the iframe.

I copied your body from your post to my xml and was able to reproduce your issue. When I used an absolute URL to the blank.html, it worked correctly.

Thanx,

Denise

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: