IE 10 Beta - window.showModalDialog ignores dialogHeight and dialogWidth when opening window which has framset in it - internet-explorer-10

Note: Issue occurs only with IE 10 Beta release
Scenario:
a.html has showModalDialog to open b.html:
window.showModalDialog(b.html, self, 'dialogHeight=800px;dialogWidth=900px');
b.html has frameset in it :
<%# Page Language="vb" AutoEventWireup="false" Codebehind="somefile.aspx.vb">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN">
<HTML>
<HEAD>
Some Title
</TITLE>
</HEAD>
<frameset rows="40px,*" border="0" frameSpacing="0" frameBorder="0">
<frame src="myfile.aspx" noresize height="100%" width="100%" scrolling="no">
</frameset>
</HTML>
Issue:
When I try to open b.html using window.showModalDialog from a.html, the popup appears in a small window though I gave dialogHeight and dialogWidth. This happens only with IE10. I am using beta version. Please help.

I have been able to work around the issue by specifying a document compatibility mode in the framesest page:
<meta http-equiv="x-ua-compatible" content="IE=7" >

Related

How to stop site from stealing content with frames

I run a pretty large site and I have just discovered a hack Lithuanian site has 100% copied my site and all content via frames. I was able to prevent it in htaccess using
Header append X-FRAME-OPTIONS "SAMEORIGIN"
This got the job done in Firefox, Safari, and IE, but not Chrome. I've also blocked their site's IP address but that did nothing. Also contacted their host but nothing yet.
When I view source this is what it shows:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head>
<title>Hi I Steal Other Site's Content</title>
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="generator" content="ORT - Ovh Redirect Technology">
<meta name="url" content="https://example.com/page">
<meta name="robots" content="all">
</head>
<frameset rows="100%,0" frameborder=no border=0>
<frame name="ORT" src="https://example.com/page">
<frame name="NONE" src="" scrolling="no" noresize>
<noframes>
<body>Click here<hr></body>
</noframes>
</frameset>
</html>
Any idea why it's not working in Chrome?
This worked
<script type="text/javascript">
if(document.referrer.indexOf("http://example.com/") != -1) {
window.location = "http://www.youtube.com/watch?v=oHg5SJYRHA0?autoplay=1";
}
</script>

watir: content of frame.body is not updated (is there any refresh method)

Hi I am using watir for cucumber test of PHP project.
Unfortunately page is always make from two frames.
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=7">
<title>Rothschild - Olomouc</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250">
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/skripty.js"></script>
</head>
<frameset cols="183,*" frameborder="NO" border="0" framespacing="0" rows="*">
<frame name="leftFrame" scrolling="AUTO" noresize src="">
<frame name="mainFrame" src="getuser.php">
</frameset>
<noframes>
<body id=body bgcolor="#FFFFFF" text="#000000">
</body>
</noframes>
</html>
leftFrame is menu,
mainFrame is main page content.
I use
if headless
#browser = Watir::Browser.new :phantomjs #headless
else
require 'watir-webdriver'
#browser = Watir::Browser.new :ie #non headless,IExplorer
end
main_content= #browser.frame(:name, "mainFrame").body
to get content of main part of page.
It works almost every time.
But now I get to situation when doubleclicking on TR
<tr class="subTable dealer_1" onDblClick="window.location.href='detail_dealer.php?id=207'">
<td><a name="a207"></a></td>
<td> Lama Mirek</td>
<td> Ústí n. Orlicí</td>
<td></td>
</tr>
get me to page detail_dealer.php?id=207 (in mainFrame of course)
but
#browser.frame(:name, "mainFrame").body
gives me previous table (with doubleclicking rows).
When I try to debug it with PRY
pry:> #browser.frame(:name, "mainFrame").body => content of desired detail page
It looks like watir needs a time to "reload" content of body. Is there some method to do "refresh" or "wait until new content is loaded"?
This happens with both drivers watir-webdriver and phantomjs.
Watir has a number of methods for waiting.
You will need find an element that only exists after clicking on the tr element. Then call one of the wait methods. For example:
browser.element.wait_until_present
Alternatively, you can also wait for an element to be removed after the tr is clicked:
browser.element.wait_while_present

links in a pdf open in a new window/tab

I have a PDF with HTML like the following embedded into it:
<!DOCTYPE html>
<html lang="en-US">
<body>
<embed src="a.pdf" width="800px" height="1050px">
</body>
</html>
a.pdf cointains links inside like "https://www.google.com.ph/"
I want it so that when the user clicks on the links in the PDF, it will open in a new tab or window?
Do i need Javascript or some other language?
Try using an iframe for this. It requires PDF support in the browser of course, which is not universal, so you may want to also offer a download link of some kind.
<!DOCTYPE html>
<html lang="en-US">
<body>
<iframe src="a.pdf" width="800px" height="1050px"></iframe>
</body>
</html>

IE11 Edge mode is not working by default (Included meta tags and doctype)

I'm working on webpage that was built to run on IE7, and now i'm in the process of upgrading the page to run in IE11 Edge mode by default.
What i've did in the page is that i added
<!DOCTYPE html>
I also added this
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>Test Image Request</title>
<style type="text/css">
.auto-expand{overflow-y:visible}
</style>
</head>
Now whenever i open the page, the Emulation Panel in IE11 Developer mode says its rendering in IE7!
What did i miss?
Solved! there was <script> before <head>, moved it after <head> and now eveything works fine.

Embed tag inside video tag is not working. HTML5 Video fallback is not working

HTML5 Video tag fallback is not working for me. Embed tag without Video tag works fine.
Below code doesn't work.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
<title>Video Demo</title>
</head>
<body>
<video width="549" height="309" controls autoplay>
<source src="small.3gp" type="video/3gpp">
<div>
No Movie
<embed width="549" height="309" autoplay="true" type="video/quicktime" src="small.3gp">
</div>
</video>
</body>
</html>
Below code works.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
<title>Video Demo</title>
</head>
<body>
<embed width="549" height="309" autoplay="true" type="video/quicktime" src="small.3gp">
</body>
</html>
I need to create a video player which can run any kind of video file and fallback to quick time if its not supported by native. Mp4 format works fine as its supported in native browser (Chrome , IE and FF also as decoder is already there).
I am testing fallback for other than Mp4. like 3gp in this case.
I have seen code examples of Video for everybody, videojs, diveintohtml5/video, but not able to execute the the above code.
Any help would be appreciated.