I have developed a site using cakephp 2.x.
I want to show cakephp site in another site using iframe.
When I use Iframe code in normal site, Iframe displaying blank content with provided styles.
Below is the Iframe code
<iframe
src='http://mycakephpsite.com/'
width='600' height='800'
frameborder='1'
scrolling='yes'
align='bottom'
style='border:1px #68293c dotted;'>
</iframe>
Please let me know where I am doing mistake.
Thanks in advance.
This iframe works for me:
<iframe
sandbox="allow-scripts allow-forms allow-same-origin"
src="http://www.mycakephpsite.com/">
</iframe>
I think you may have an issue with your web server headers, check your X-Frame-Options option
https://developer.mozilla.org/en-US/docs/Web/HTTP/X-Frame-Options
Related
Referring to the image below, I need to display an external website on the right side of the screen when the link 'All chats' is clicked.
,
I tried to use window.location to achieve it but this is redirecting my site to the new site.
<RouteAuthenticated path={match.path} component={() => { window.location = 'https://www.google.com/'; return null; }} />
How can I get this done?
You can use iframes in the same way you can in standard HTML. Note that most website block being displayed in an iframe in other websites due to XSS vulnerabilities.
<iframe id="iFrameExample"
title="iFrame Example"
src="https://example.com">
</iframe>
One way around this is to use the sandbox attribute for iframes. See here for the different sandbox properties but they often will break functionality of the site. Other issues you may run into are iframe breakers which are basically unavoidable unless you have access to the code of the 3rd party website.
Yes, via iFrames it is possible to load webpages inside of other web pages.Window.location will not help you to do this. You have to use iFrames.
I was browsing ionic themes and I found a plugin on their pages which showcase their mobile application based on Ionic.
Script
I was wondering where does this script come from and if there is a possibility to do the same on a website to showcase the demo ?
Actually, you don't need any special script to do this.
Just put www folder to your web server and put <iframe> on your website like this to showcase your app demo:
<iframe src="http://www.example.com/myapp/" width="320" height="568"></iframe>
I have a PHP site and want my visitors check mobile-friendly tool via Google.
https://www.google.com/webmasters/tools/mobile-friendly/
Is it possible embed this tool on my site? Or any solution?
I had the very same question and eventually came up with the following solution
<iframe src="https://www.google.com/webmasters/tools/mobile-friendly/" width="600" height="500"> <p>Your browser does not support iframes.</p> </iframe>
This works fairly well but ironically the iframe is not responsive enough to all devices!! Looking for code to make the iframe auto respond and would appreciate any ideas..
I'm using ionic framework and got the error of "This video contains content from Vevo. It is restricted from playback on certain sites. Watch yon YouTube".
To reproduce my problem technically, try to post below code into your hybrid app and see the result in the android phone.
<iframe width="560" height="315" src="http://www.youtube.com/embed/09R8_2nJtjg" frameborder="0" allowfullscreen></iframe>
If you doesn't white-list the domain that you access outside the application will be blocked for security reason . In the case of Intel xdk please add the domain name in white-list as https:///
Click to view the screen shot
I am developing a basic mobile site in asp.NET and C# and am having problems rendering .aspx pages on certain mobile phone browsers.
I tried Stackoverflow.Mobi on a nokia looking for good examples for coding mobile sites.
As soon as I redirect to another page I receive the error "File Format Unknown."
As soon as i use the button_click event to transfer to another page the "File Format Unknown." shows up on the mobile divice.
I have tried the following as suggested fixes from numerous forums but without any luck.
Setting Page contentype : ContentType="text/html"
Server.Transfer
Response.ContentType = "application/xhtml+xml";
Response.Redirect("Test.aspx");
Posting to the Full URL www.XXXX.com/test.aspx
One of the phones i am having problems with is a Nokia 6300
Any suggestions?
Normaly this is a problem with doc-type, because asp.net changes it to wap/application. I will recommend you use Fiddler for checking http headers. Normaly,Page directive ContentType should solve it
<%# Page Language="C#" ... ContentType="text/html" %>
But you have set :-S
Make sure your html passes w3c validation. I know Blackberry device will have trouble displaying pages where the Html does not validate according to the doctype.