Embed doc file in PopupPanel widget problem

1647
10
11-12-2021 12:23 AM
VincenzoLisi
New Contributor II

Hi,

I'm trying to embed a .doc file on PopupPanel widget.

I'm using Microsoft API viewer with code like this:

  <iframe src='https://view.officeapps.live.com/op/embed.aspx?src=https://www.learningaboutelectronics.com/Articles...' width='100%' height='500px' frameborder='0'></iframe>

but it's not correctly working in  Chrome, while it's OK using Firefox.

Any suggestions?

Thanks
Martina

 

0 Kudos
10 Replies
Brian_Wilson
Occasional Contributor III

I am curious if it works in Edge?

0 Kudos
VincenzoLisi
New Contributor II

no it doesn't...

0 Kudos
Brian_Wilson
Occasional Contributor III

Perhaps you can try "embed" instead of iframe, like for example

 <embed src="your url"/>

VincenzoLisi
New Contributor II

I tried.. but it doesn't work too.

Thanks anyway

 

0 Kudos
Brian_Wilson
Occasional Contributor III

Well, you gave me the idea of using embedded content! This could be usable for the project I am doing, I can generate popup content and put it on a web server and then link it from the WABDE popup. Then I can put anything I want in there, I can program it in PYTHON and/or JAVASCRIPT instead of ARCADE wheee who! I looked at how the existing popup is coded and shrank away in horror. 

(Takes deep breath and counts to 3)

I am doing a proof of concept today, when it's working I will post the URL here and ask you to look at it to see if your browsers load it. 

If it does NOT work we have more to go on and I won't publish to the world.

 

Brian_Wilson
Occasional Contributor III

I can go into the popup editor and open the HTML window and put code in it like this.

 

content like this
<embed src="https://webforms.co.clatsop.or.us"></embed>
and below

 

and then when I click on the map to get a popup it works, and it looks like this

 

 

popup.png

That's as expected. I think that web site is visible to the world, you can load the page separately (at least for today) from https://webforms.co.clatsop.or.us

to see the content.

Here's the "conspiracy" part. If I save the map and reload it, the embed code DISAPPEARS.

If I go into the server and manually open the JSON file for the map, I see this.

        "description": "content like this\n\nand below",
 

I can see that the content was stripped out before the file was saved.

NOW if I use a text editor I can put it back in...

        "description": "content like this\n<embed src='https://webforms.co.clatsop.or.us'></embed>\nand below",
 
Can you see the map? I made it public. Right now, it should have the embed tag in there like the screenshot above.
 
This is the URL for the map viewer, (updated 11/18/21 9am to one that's public access )
 
 
VincenzoLisi
New Contributor II

Hi Brian!

I see your post just now...

I can't see your map (it is probably no longer public) and I can't open https://webforms.co.clatsop.or.us

- page 403 forbidden-

I think my problem is the link I want to embed, not the iframe or embed elements, and the fact that I embed it in PopupPanel..


Would you try to embed in yor map my link, using iframe or embed element?

<iframe loading="lazy" src="https://view.officeapps.live.com/op/embed.aspx?src=https://webgis2.ar-tel.it/_test/test.doc" width="100%" height="500px" frameborder="0"></iframe>

this is what I see in firefox.. and it doesn't disappear!!

VincenzoLisi_1-1637256795767.png

 Thanks!!!

 

0 Kudos
Brian_Wilson
Occasional Contributor III

I don't understand why sharing is not working. I made an app from the map and put it here, and it works from my phone so it should be accessible to you now. It has your links embedded instead of my 403 error page

https://delta.co.clatsop.or.us/apps/SurveyPopUpTest 

This is after I edit the JSON file directly, seen in Edge... testing in Firefox... works there and in Chrome...

 

BrianWilson7_0-1637257831298.png

 

On my phone it puts an arrow on the popup and when I click the arrow it opens a new page to show the popup contents. I suppose I've never tried popups on my phone so this is new to me. I'd include screenshots of that but it's too much work!

I was trying to put an iframe into a popup and it just keeps deleting them. Embeds won't save to the map file but work until I do a save. Iframes get wiped as soon as I change between edit modes in the popup editor. This has to be intentional and undocumented?

I am using ArcGIS Enterprise 10.9 and whatever the current versions of Chrome, Firefox, and Edge are.

 

 

VincenzoLisi
New Contributor II

Hi!!

In my map it still doesn't work (Chrome an Edge) and I decide to open the Office viewer from a link directly in a new page, without using iframe object...

 

Thanks!!

 

 

 

 

 

 

0 Kudos