By using epub.js. epub file is parsed into iframe.
like
<iframe id="epubjs-view-2d154c70-dc91-4704-bd66-821ad4de4a9f" scrolling="no" sandbox="allow-same-origin" enable-annotation="true" srcdoc="<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops"><head><base href="http://localhost:4343/text/part0003.html" />
<title></title>
</iframe>
How to get the iframe list by code.
I'm trying to display the results parsed by epub.js in turn.js.
Thanks.
Related
We have integrated AMP analytics script with amp-iframe tag. We can't able to use the amp-analytics tag for various reasons. We need an AMP HTML's referrer information in the iframe for identifying the source of traffic to the AMP page. The amp-iframe src will point to our domain/subdomain. When the AMP page loaded from Google CDN it will be in the different domain. Is there any way to get the referrer of the AMP HTML within amp-iframe HTML?
Please find the example AMP HTML structure
<!doctype html>
<html amp>
<head>
<meta charset="utf-8">
<title>Title of the AMP HTML</title>
<link rel="canonical" href="https://www.example1.com/example-content" />
<script custom-element="amp-iframe" src="https://cdn.ampproject.org/v0/amp-iframe-0.1.js" async></script>
<script src="https://cdn.ampproject.org/v0.js" async></script>
</head>
<body>
<amp-iframe class="amp-analytics" width="1" height="1" sandbox="allow-scripts allow-same-origin" frameborder="0" layout="fixed" src="https://iframe.example.com/amp-analytics?query1=value1&query2=value2">
<amp-img src="https://www.example.com/inc/amp/placeholder.png" height="1" width="1" layout="fill" placeholder></amp-img>
</amp-iframe>
<div>Content</div>
</body>
</html>
I am trying to get the referrer information of the AMP HTML inside the iframe https://iframe.example.com/amp-analytics.
Thank you in advance.
I'm embedding a group into a (non-Google) website and getting a blank page.
I've added the code that the 'Manage your Group' gives, which is below.
<iframe id="forum_embed"
src="javascript:void(0)"
scrolling="no"
frameborder="0"
width="900"
height="700">
</iframe>
<script type="text/javascript">
document.getElementById('forum_embed').src =
'https://groups.google.com/forum/embed/?place=forum/the-sophia-club'
+ '&showsearch=true&showpopout=true&showtabs=false'
+ '&parenturl=' + encodeURIComponent(window.location.href);
I have tried removing the &parenturl with no success.
I also tried saving the code on a simple html doc by itself, and it still gives me a blank page.
Here's the code for the single page...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<p>Testing</p>
<iframe id="forum_embed"
src="javascript:void(0)"
scrolling="no"
frameborder="0"
width="900"
height="700">
</iframe>
<script type="text/javascript">
document.getElementById('forum_embed').src =
'https://groups.google.com/forum/embed/?place=forum/the-sophia-club'
+ '&showsearch=true&showpopout=true&showtabs=false'
+ '&parenturl=' + encodeURIComponent(window.location.href);
</script>
</body>
</html>
Any ideas on what is going wrong??
The issue is that your document is xhtml instead of html. The two standards are different and Google doesn't seem to like xhtml.
xhtml seems to be dead unfortunately, so try changing to html5. The only required change should be in the doctype declaration.
Also, the embedding didn't work when I opened the page using my web browser pointing to a local directory. However it did work when I uploaded the page to the web server.
Suppose I have two html files footer.html and main.html. The footer contains a reference to the top of a page as follows:
<!-- footer.html -->
<!doctype html>
<html lang="en">
<head></head>
<body>
<footer>
<small>To top</small>
</footer>
</body>
</html>
The main.html file embeds the footer by using the <object> tag (see note 1) as shown below. There can be several files similar to main.html. Because of this <a href="page#header"> may not be used.
<!-- main.html -->
<!doctype html>
<html lang="en">
<head></head>
<body>
<div id="header">...</div>
<div id="content"> Long content ... </div>
<object id="footer" type="text/html" data="footer.html"></object>
</body>
</html>
Question: Is it possible to refer to the anchor from the footer to main without using javascript, php etc?
Note 1: The <object> tag can be used to embed another html, although without a relation:
You can also use the <object> tag to embed another webpage into your HTML document.
from http://www.w3schools.com/tags/tag_object.asp
The same can be done using <iframe> or <embed> instead of <object>, but the issue remains.
Is it possible to refer to the anchor from the footer to main without using javascript, php etc?
No, it isn't.
If you use a relative URL, then it will be relative to the document that the link appears in (i.e. the footer).
If you use an absolute URL, then you have to specify which document you want to link to the top of (and since multiple documents will embed the footer, you can't do that).
You've ruled out generating the URL programatically with JavaScript.
Thanks to all for the comments and answers. Indeed, this approach seems not to work due to a missing relation between html files. In other words, footer.html cannot refer to the inside of main.html. Instead, I modified the structure, so that the main includes the footer directly and the content is embedded by using an <iframe> as follows:
<!-- main.html -->
<!doctype html>
<html lang="en">
<head></head>
<body>
<div id="header">...</div>
<iframe id="content" name="contentframe" src="content.html"></iframe>
<footer id="footer">
<small>To top</small>
</footer>
</body>
</html>
This solves the issue and works without JS, PHP or the like independently of the page loaded into the <iframe>. That is, it simply jumps to top keeping the contents of the loaded page. Eventually, there is one main and multiple long content pages which are loaded into this main. Tested with FF and IE.
<%# Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm11.aspx.cs" Inherits="omos.WebForm11" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<object data="file:\\\n:\test\abc.wav" style="width: 100px" />
</div>
</form>
</body>
</html>
My ASP page will call the above html page. It work well in IE (the audio player appeared and start to play), but for google chrome, the audio player doesn't appear. The audio file n:\test\abc.wav is stored in another file server (i.e. n drive is not the Web Server). If I store the audio files in the web server, both IE and Google Chrome work fine, but my audio files have to be in another server.
Why IE can work and Google Chrome cannot (same code), why like that? I am headache, any one got Panadol?
Following code should work:
Note: We have checked in IE 10 & latest version. May not support in IE-8/9. Please excuse.
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
var activeobj = 0;
if (window.ActiveXObject) {
document.write("<object data='horse.wav' style='width:400px;' />");
} else {
document.write("<audio controls><source src='horse.mp3' type='audio/mpeg'> Your browser does not support the audio element.</audio>");
}
</script>
</head>
<body>
<div>
</div>
</body>
</html>
I have an .aspx page to display either the BlueDot or ConnectToQuickBooks buttons.
The resultant HTML looks like this, as collected from the IE page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>TrueCommerce to Intuit Connect Page</title>
<script type="text/javascript" src="https://appcenter.intuit.com/Content/IA/intuit.ipp.anywhere.js"></script>
<script type="text/javascript">
intuit.ipp.anywhere.setup({
menuProxy: 'http://localhost:1384/MenuProxy.aspx',
grantUrl: 'http://localhost:1384/OauthGrant.aspx'
});
</script>
</head>
<body>
<div id="blueDotDiv">
<ipp:bluedot></ipp:bluedot>
</div>
</body>
</html>
This code will not display in IE. It will display fine in Chrome and Firefox.
I validated the HTML with W3C Markup Validation Service and only received an error on the tag, which was to be expected.
I am using the following IE Browser
IE Version: 8.0.7601.17514 64-bit Edition
We are using Silverlight and have embedded the ASPX page utilizing the Infragistics HTML Viewer Control - Silverlight xamHtmlViewer. The BlueDot Menu does not appear when called from either inside of the xamHtmlViewer or called directly (though it works both ways in Chrome and Firefox).
Any Ideas?
https://ipp.developer.intuit.com/0010_Intuit_Partner_Platform/0025_Intuit_Anywhere/0060_Reference/Widgets/0010_Connect_Button
To display the Connect to QuickBooks button in IE8, the html xmlns attribute is required, for example:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ipp="">