I would like to embed an web page into another web page. Since due to some issues I cannot use a iFrame. I tried with tag. But it gives some weird problems in IE. The links inside the embedded web pages does not open up in the full body of the window in IE. Is there any solutions to it??
I'm also looking for some ajax based solutions, but I'm not sure whether it will work as my target page is having lots of external javascript files as well as CSS.
Any solutions or ideas will be of great help.
You can save both pages with extension .php and where you want the document inside the other document add this code:
<?php include("myOtherDocument.php"); ?>
(The document you are adding should only have the code that belongs there, do not repeat the body tags, head, html, doctype etc...)
You also cannot see the results without using your local server or uploading to a server.
Related
I am working on a custom email webapp for my company. I have browsed the web and can't find an exact answer. Maybe I don't know what to "google" for exactly. I have never done anything email related.
In our database we are saving emails as a string. It contains everything.
<DOCTYPE><head><body><style> etc. How would I go about displaying this in my webapp.
I tried just pasting the HTML in a <div> inside one of my components but the styles would not load properly.
How would I go about reading/parsing the raw HTML in the string to then display it in my webapp. Is there a nuget package anyone recommends.
I am using Blazor on .net core 5.
As you may have found, putting an email HTML body into an existing web page will almost result in CSS pollution as the HTML may have styles (or may use styles from the web page).
My solution to this was to load and display the email HTML inside an <iframe> tag as this isolates the email from the page very effectively. The URL for the IFRAME is separate view on the server, which just returns the raw email HTML (remember to add security to this if needed in your app).
There are probably better ways to do this in CSS now without having to resort to IFRAME.
I am looking to embed a HTML5 file on a webpage and keep its source hidden.
Originally, I used an iframe, however, anyone could go directly into the webpage's source code and copy the iframe's src, and then paste it as a webaddress, and be taken directly to the non-embedded version. The embedded version is important to me for the site's layout.
Is there a way for me to disable access to the iframe's src file (which I seriously doubt as then the iframe presumably wouldn't work), or do you have a recommended alternative?
Thank you
The short answer is no. This is not possible.
Even if there was a possibility to prevent the browser from displaying the source code, it would still be possible to view the raw HTML code by just sending a raw HTTP request.
The only possibility is to just not sending the HTML-Code. But without HTML, no content is displayed. The browser can only display any content based on the HTML code.
I am using wix.com to make sites,I was making a site for a company and i tried to embbed a the facebook page html of that company into one of the site pages but it doesnt fully load!it stops after viewing the n.o of likes.
I tried to embbed the website directly but the Facebook page doesnt load at all! so I thought of copying the code and adding it in the wix site
Here is a screen shot
The contents are dynamically loaded by using ajax requests to facebook's server.
You copied the code and added it to your site. But since your domain name is different, facebook will prevent Cross Origin Requests and so you will get a 405 Error and the content will not be provided to you. That is the problem there.
I am trying to include a file (that's in html) inside of my HTML code. When i test it by opening it in my browser i can view the text fine, however when I upload it it does not appear. In chrome nothing appears and in IE it says that this content cannot be displayed.
<p><object src="resume-kylerschnaible.html"><embed src="resume-kylerschnaible.html" height="1300px"></embed></object></p>
http://jsfiddle.net/rd7yqo6m/
HTML isn't really the tool of choice for including files, there are countless security settings that are dependent upon browser and server configuration so these kind of include methods are generally seen as unreliable. I would suggest moving to php or asp.net if you need this kind of functionality. Failing that you might find that the iframe method is slightly more flexible.
<iframe src="resume-kylerschnaible.html"></iframe>
I have been trying to embed an iframe to a wiki page that I'm working on based on wikimedia but not the actual wikipedia without any luck.
I've also tried googling on this topic, but have been fruitless. Will appreciate any advice on this pls.
Thks.
There's the easy way and the slightly harder way.
The easy way assumes you don't have a publicly editable wiki (i.e. non-logged in users cannot edit and creating an account is not automatic).
If that's the case, simply set $wgRawHtml to true and you will be able to input any arbitrary HTML into your pages by wrapping it inside the <html> tag.
Here's an example:
This is '''wikitext'''.
<html>
This is <em>HTML</em>.
</html>
Now, if you have a publicly editable wiki you most definitely don't want users to be able to add any and all HTML to your wiki. In that case you can use the Verbatim extension. This will embed the contents of a page in the MediaWiki namespace as-is, preserving any HTML markup.
For example:
<verbatim>Foo</verbatim>
Would embed the contents of MediaWiki:Foo.
Hope that helps.
I suggest you use the IDisplay extension.
The iDisplay extension allows MediaWiki pages to embed external web pages. It also allows setting an option to put a blocking page in front of it, so you prevent loading the page until the user wants to load the page.
It's implemented with an <iframe>.