Fill inputs on external iframe - reactjs

I want to autofill textboxes on website when the iframe is loaded, it should fill in the input text forms.
(my app and the iframe are not in the same domain)
i want to know if there's a solution to make this feasible

If you have control over both origins, then you can use the window.postMessage API to communicate between the iframe and the parent page.
If you do not have control over both origins, I don't think you can do that because of the same-origin policy.

Related

Trying to serve responsive custom code through DFP

We're trying to serve simple markup - a thumbnail, image, and some text - through DFP. This markup needs to be fluid - it's one member of a responsive grid on our website.
Assuming we can't avoid the iframe, is there a way we can get the iframe to be set at 100% width? That would probably do it.
The issues we're having is that we're forced to define an ad unit size, and that seems to dictate the dimensions of the iframe.
You can't have the control over the iframe, the best solution would be to extract the content of the iframe and append it to the parent using javascript. This way you will be able to use your websites responsive grid and class.
Sorry Mathieu but you are wrong. DFP uses friendly iFrames and you can change the width or height if you use your own creative template. We have many custom templates defined in DFP for our masthead variations that can expand, collapse, destroy ad unit's iframe.

Facebook Canvas App using Angular JS

I want to create an application on Facebook and I will host it on our server to be used from Facebook Canvas.
I was thinking of creating the web app with Angular.JS but one of my friends told me that my web app must be drawn inside a <canvas> html tag or I will not have the full functionality of Facebook integration.
So this is my question, do I have to draw my elements inside a <canvas>? or I can use other html tags with some basic animation?
No, you do NOT need to use HTML5 Canvas. There are "Canvas Apps", but there is no relation to HTML5 Canvas. Please check out the docs for more information: https://developers.facebook.com/docs
There are only a few things that are not possible without a Canvas App. For example, you can only use Notifications with a Canvas App, or you can only use invitable_friends in a gane with Canvas implementation. DonĀ“t worry about those before reading the docs.

How to get codenameone web browser component input controls references?

Does anybody know how can we get the form controls references in a web page that loaded in the CodeNameOne Web browser component?
I want to load a web page in CodeNameOne web browser component, then read or change the value of form input controls (For example TextBoxes) in the java code after pressing the submit button.
Regards,
Kasra
Its not an ideal way to work and would reduce the portability of your application. You can look at the JSObject class that represents a bridge between the JavaScript and Java sides.

Responsive web site with Magnolia

I want to display some magnolia responsive page in a mobile app through a webview.
In this case I want to hide some section (branding and footer). Is it possible to hide some of these section by passing some parameter to the http url?
To hide some sections, you can configure variation of the template rendering that section for mobile channel and have the template render nothing for mobile channel.
To force mobile channel on desktop you can append ?mgnlChannel=smartphone to the url.

Extjs window/iframe getBody mask/unmask

I have a gridpanel with some buttons for each row in the panel. When clicking the buttons, a new Ext.window pops up loading a remote url . Since the remote URL is opened in an iframe, I cannot use Ext.getBody().mask in the parent grid and Ext.getBody().unmask in the iframe, because these are two different pages. The reason I want to do it like this (Ext.getBody().mask in the parent page, and the unmask in the iframe) is because the url loaded in the iframe has a lot of js and images being loaded in the section. Therefore if i use the mask and unmask in the iframe, it will still take a lot of time to load whats in the iframe header, until it gets to the point where I can use the Ext.getBody().mask
My question is: can Ext.getBody().unmask() be used somehow on the parent window? (to hide the mask opened from the parent)?
Thanks,
Dan
try running window.parent.Ext.getBody().unmask() from the iframe.
I assume your iframe has the same origin as the parent.

Resources