xref: /webtrees/public/ckeditor-4.15.1-custom/plugins/wsc/dialogs/ciframe.html (revision b43e8d2bb2c20432b6d427f0f5d9a32679a9aa4f)
1*b43e8d2bSGreg Roach<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2*b43e8d2bSGreg Roach<!--
3*b43e8d2bSGreg RoachCopyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
4*b43e8d2bSGreg RoachFor licensing, see LICENSE.html or http://ckeditor.com/license
5*b43e8d2bSGreg Roach-->
6*b43e8d2bSGreg Roach<html>
7*b43e8d2bSGreg Roach<head>
8*b43e8d2bSGreg Roach	<title></title>
9*b43e8d2bSGreg Roach	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
10*b43e8d2bSGreg Roach	<script type="text/javascript">
11*b43e8d2bSGreg Roach
12*b43e8d2bSGreg Roachfunction gup( name )
13*b43e8d2bSGreg Roach{
14*b43e8d2bSGreg Roach	name = name.replace( /[\[]/, '\\\[' ).replace( /[\]]/, '\\\]' ) ;
15*b43e8d2bSGreg Roach	var regexS = '[\\?&]' + name + '=([^&#]*)' ;
16*b43e8d2bSGreg Roach	var regex = new RegExp( regexS ) ;
17*b43e8d2bSGreg Roach	var results = regex.exec( window.location.href ) ;
18*b43e8d2bSGreg Roach
19*b43e8d2bSGreg Roach	if ( results )
20*b43e8d2bSGreg Roach		return results[ 1 ] ;
21*b43e8d2bSGreg Roach	else
22*b43e8d2bSGreg Roach		return '' ;
23*b43e8d2bSGreg Roach}
24*b43e8d2bSGreg Roach
25*b43e8d2bSGreg Roachvar interval;
26*b43e8d2bSGreg Roach
27*b43e8d2bSGreg Roachfunction sendData2Master()
28*b43e8d2bSGreg Roach{
29*b43e8d2bSGreg Roach	var destination = window.parent.parent ;
30*b43e8d2bSGreg Roach	try
31*b43e8d2bSGreg Roach	{
32*b43e8d2bSGreg Roach		if ( destination.XDTMaster )
33*b43e8d2bSGreg Roach		{
34*b43e8d2bSGreg Roach			var t = destination.XDTMaster.read( [ gup( 'cmd' ), gup( 'data' ) ] ) ;
35*b43e8d2bSGreg Roach			window.clearInterval( interval ) ;
36*b43e8d2bSGreg Roach		}
37*b43e8d2bSGreg Roach	}
38*b43e8d2bSGreg Roach	catch (e) {}
39*b43e8d2bSGreg Roach}
40*b43e8d2bSGreg Roach
41*b43e8d2bSGreg Roachfunction OnMessage (event) {
42*b43e8d2bSGreg Roach	        var message = event.data;
43*b43e8d2bSGreg Roach	        var destination = window.parent.parent;
44*b43e8d2bSGreg Roach	        destination.XDTMaster.read( [ 'end', message, 'fpm' ] ) ;
45*b43e8d2bSGreg Roach}
46*b43e8d2bSGreg Roach
47*b43e8d2bSGreg Roachfunction listenPostMessage() {
48*b43e8d2bSGreg Roach    if (window.addEventListener) { // all browsers except IE before version 9
49*b43e8d2bSGreg Roach            window.addEventListener ("message", OnMessage, false);
50*b43e8d2bSGreg Roach    }else {
51*b43e8d2bSGreg Roach            if (window.attachEvent) { // IE before version 9
52*b43e8d2bSGreg Roach                        window.attachEvent("onmessage", OnMessage);
53*b43e8d2bSGreg Roach                }
54*b43e8d2bSGreg Roach        }
55*b43e8d2bSGreg Roach}
56*b43e8d2bSGreg Roach
57*b43e8d2bSGreg Roachfunction onLoad()
58*b43e8d2bSGreg Roach{
59*b43e8d2bSGreg Roach	interval = window.setInterval( sendData2Master, 100 );
60*b43e8d2bSGreg Roach	listenPostMessage();
61*b43e8d2bSGreg Roach}
62*b43e8d2bSGreg Roach
63*b43e8d2bSGreg Roach</script>
64*b43e8d2bSGreg Roach</head>
65*b43e8d2bSGreg Roach<body onload="onLoad()"><p></p></body>
66*b43e8d2bSGreg Roach</html>
67