Drag and Drop between iFrames - javascript

I'm trying to drag a picture from Picker.html, which is one of the Google APIs, into another iFrame containing a chat app. So, the picture is uploaded into chat and it would be able to be sent.
I know that browser security measures prevent this and I have already tried this solution Drag-Drop elements between parent frame and child iframe.
However I would like to know if there is a different solution using only HTML, CSS, JavaScript, and jQuery. Thank you very much!

Related

dynamically show website on another page with php

I want to make something like an iframe. I can't use iframe or object style html tags. Because the site is responsive, when I reduce the size of the iframe, the site view automatically appears on the mobile screen.
Instead, I tried to display the site on the screen with some php functions such as php curl, but unfortunately the css file of the website I am trying to show interferes with the design of my current site.
How can I do this? Is there an alternative way I can do this? Can I do this with javascript or any web compatible programming language?

How to stop browser open a pdf file?

I am building a website and there is an embed iframe on the page. I found that when users drop a pdf file over the iframe. The browser will close my website and load the pdf. How can I stop browser rendering the pdf file? I know the drop event I can use but this case happens in the iframe. Is there a way for me to handle drop over iframe? My iframe is loading a url which is not the same origin as the parent window.
I don't have control on the iframe I am embedded. What I want is if the iframe doesn't handle drop event then I disable the drop otherwise let iframe to handle it.
This isn't specific to an iframe, it just is what browsers do when you drag a pdf onto them - or most other files they can open, as far as I know. I wouldn't worry about it. If it's fine for every other site, it's probably fine on yours. If a user has complained, just explain it's the browser and there is nothing you can do.
People might try and find hacky ways to disable it, but my recommendation is not to.

SharePoint chat icon embed iframe issue

Trying to embed a chatbot in SharePoint online. We're doing that with an iframe through True Editor Web Part http://prntscr.com/m3br5p
The issue is that even when the bot is folded like in this preview, clicking buttons behind its unfolded are (or scrolling) are not possible
folded: http://prntscr.com/m3brdk
unfolded: http://prntscr.com/m3brxu
We're also experiencing similar issues when trying to lightbox/popup certain things that we want to load. I wish we could have a layer on top of sharepoint where we could just do anything we want (being externally, no need to integrate) while keeping everything behind it in tact.
How should we deal with this?
Have you looked at maybe using a Directline / React application customiser at all?
I found this useful after some re-jigging around and a better solution than using the iframe approach.
https://github.com/MickH3/directline-bot-extension

Invoking javascript from ifram to the whole website

does anybody know how can I expand javascript so that it targets whole website not only the page in iframe it is on. Im currently using a javascript for gallery on my website, so when you click on a picture it pops up enlarged, however since the page with javascript is in an iframe it shows only in the iframe, how can I accomplish the pop up to expand to the whole page?
Thanks in advance.
Iframes can call out to the window which embeds them using simple javascript (see window.frames on http://www.w3schools.com/jsref/prop_win_frames.asp). However, if src of the iframe is on a different domain, then the script can only affect the iframe, due to security policy within the browser.
If you'd like to apply a work-around, there are some solutions like this: Yet Another cross-domain iframe resize Q&A
These solutions tend to break on different browsers and with updates to browsers.
Your best bet is keeping the entire iframe contents within the browser by writing the iframe code yourself (and hosting on your own domain).

Picture viewer that can be called from an iframe?

I'm trying to find a solution for this problem for quite a while now and I think I'm going to flip out :)
So is there a jquery solution for a picture viewer that can be implemented in a facebook app that runs in an iframe.
The problem is (that i can see) that all of them are appending functions on the body element but Facebook is preventing that from happening.

Categories

Resources