Day 29

I am having issues...  I am working to modify code to open a variable controlled settings window...
#CodingPhase #TheCodingWay #365CodingPhaseChallenge

**********

<!DOCTYPE html>
<html>
<head>
<title>Email Vault - Main</title>
<meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<button id="lovedOnes" onclick="createLovedOnes()">Set the number of recipient addresses needed</button>

<button id="test" onclick="PopupCenter()">Testset the number of recipient addresses needed</button>

<div id="tester">text</div>

<script>

function PopupCenter(url, title, w, h) {
// Fixes dual-screen position Most browsers Firefox
var dualScreenLeft = window.screenLeft != undefined ? window.screenLeft : window.screenX;
var dualScreenTop = window.screenTop != undefined ? window.screenTop : window.screenY;

var width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width;
var height = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : screen.height;

var left = ((width / 2) - (w / 2)) + dualScreenLeft;
var top = ((height / 2) - (h / 2)) + dualScreenTop;
var newWindow = window.open(url, title, 'scrollbars=yes, width=' + w + ', height=' + h + ', top=' + top + ', left=' + left);

// Puts focus on the newWindow
if (window.focus) {
newWindow.focus();
}
// <div>text123</div>
}
function createLovedOnes()
{
var heading = document.getElementById("tester");
heading.innerHTML = 'You Clicked Me Three!'
// document.getElementById('tester').innerHTML = 'changed text';
}
</script>
</body>
</html>

Comments

Popular posts from this blog

Day 1

Day 365 + 1

Day 365 + 2