<html>
<head>
<script type='text/javascript'>
// design_javascript_popups.html
// Alert, Confirm, Prompt
// RJM Programming
// March, 2021
var bvsnp="position: absolute; top: ";
var bvsn="-2";
var bvsns="70px; left: 2%; opacity: 0.9; display: block; z-index: 56; width: 48%; background-color: rgba(255, 165, 0, 0.8); border: 2px solid red;";
var pnum=1;
var lastfi=false;
var xpnum=1;
var allowed=true;

var evalspare='';

var gpopname='';
var xlist=[];
var evallist=[];

var v1=location.search.split('val1=')[1] ? decodeURIComponent(location.search.split('val1=')[1].split('&')[0]) : '';

if (1 == 2 && document.URL.indexOf('nojwin') != -1) { // || navigator.userAgent.match(/iPhone|iPad/i)) {
var prompt = function(zwords, defwords){
var vcancel='';
var vok='';
var ansis=location.search.split('val' + pnum + '=')[1] ? decodeURIComponent(decodeURIComponent(location.search.split('val' + pnum + '=')[1].split('&')[0]).replace(/\+/g,' ')) : '';
if (document.URL.indexOf('val' + pnum + '=') == -1) ansis=null;
if (document.URL.indexOf('val' + pnum + '=') != -1 && pnum == eval(-1 + xpnum)) {
vcancel=location.search.split('Cancel=')[1] ? location.search.split('Cancel=')[1].split('&')[0] : '';
vok=location.search.split('OK=')[1] ? location.search.split('OK=')[1].split('&')[0] : '';
}
if (vcancel != '') {
pnum++;
return null;
} else if (vok != '') {
pnum++;
return ansis;
} else if (document.getElementById('val' + pnum)) {
allowed=false;
lastfi=true;
document.getElementById('safariform').style.display='block';
document.getElementById('prompt').value=zwords.replace(/\<br\>/g,String.fromCharCode(10));
document.getElementById('val' + pnum).value=defwords.replace(/\<br\>/g,String.fromCharCode(10));
document.getElementById('hval' + pnum).value=encodeURIComponent(defwords);
if (zwords.split(String.fromCharCode(10)).length > eval('0' + document.getElementById('prompt').rows)) {
document.getElementById('prompt').rows=zwords.split(String.fromCharCode(10)).length;
} else if (zwords.split('<br>').length > eval('0' + document.getElementById('prompt').rows)) {
document.getElementById('prompt').rows=zwords.split('<br>').length;
}
document.getElementById('val' + pnum).focus();
pnum++;
return ansis;
} else if (lastfi) {
pnum++;
lastfi=false;
if (ansis == 'null') return null;
return ansis;
} else {
pnum++;
if (ansis == 'null') return null;
return ansis;
}
};
var alert = function(zwords){
var defwords='';
var vcancel='';
var vok='';
var ansis=location.search.split('val' + pnum + '=')[1] ? decodeURIComponent(decodeURIComponent(location.search.split('val' + pnum + '=')[1].split('&')[0]).replace(/\+/g,' ')) : '';
if (document.URL.indexOf('val' + pnum + '=') == -1) ansis=null;
if (document.URL.indexOf('val' + pnum + '=') != -1 && pnum == eval(-1 + xpnum)) {
vcancel=location.search.split('Cancel=')[1] ? location.search.split('Cancel=')[1].split('&')[0] : '';
vok=location.search.split('OK=')[1] ? location.search.split('OK=')[1].split('&')[0] : '';
}
if (vcancel != '') {
pnum++;
return null;
} else if (vok != '') {
pnum++;
return '';
} else if (document.getElementById('val' + pnum)) {
allowed=false;
lastfi=true;
document.getElementById('safariform').style.display='block';
document.getElementById('prompt').value=zwords.replace(/\<br\>/g,String.fromCharCode(10));
document.getElementById('val' + pnum).value=defwords.replace(/\<br\>/g,String.fromCharCode(10));
document.getElementById('hval' + pnum).value=encodeURIComponent(defwords);
document.getElementById('Cancel').style.display='none';
document.getElementById('bCancel').style.display='none';
document.getElementById('val' + pnum).style.display='none';
document.getElementById('OK').focus();
pnum++;
return ansis;
} else if (lastfi) {
pnum++;
lastfi=false;
if (ansis == 'null') return null;
return ansis;
} else {
pnum++;
if (ansis == 'null') return null;
return ansis;
}
};
var confirm = function(zwords){
//alert('val' + pnum + '=? ' + ' pnum=' + pnum + ' xpnum=' + xpnum + ' ' + document.URL);
var defwords='1trueYesOK';
var vcancel='';
var vok='';
var ansis=location.search.split('val' + pnum + '=')[1] ? decodeURIComponent(decodeURIComponent(location.search.split('val' + pnum + '=')[1].split('&')[0]).replace(/\+/g,' ')) : '';
if (document.URL.indexOf('val' + pnum + '=') == -1) ansis=null;
if (document.URL.indexOf('val' + pnum + '=') != -1 && pnum == eval(-1 + xpnum)) {
vcancel=location.search.split('Cancel=')[1] ? location.search.split('Cancel=')[1].split('&')[0] : '';
vok=location.search.split('OK=')[1] ? location.search.split('OK=')[1].split('&')[0] : '';
}
//alert('vok=' + vok);
if (vcancel != '') {
pnum++;
return null;
} else if (vok != '') {
pnum++;
return '1trueYesOK';
} else if (document.getElementById('val' + pnum)) {
allowed=false;
lastfi=true;
document.getElementById('safariform').style.display='block';
document.getElementById('prompt').value=zwords.replace(/\<br\>/g,String.fromCharCode(10));
document.getElementById('val' + pnum).value=defwords.replace(/\<br\>/g,String.fromCharCode(10));
document.getElementById('hval' + pnum).value=encodeURIComponent(defwords);
document.getElementById('val' + pnum).style.display='none';
document.getElementById('OK').focus();
pnum++;
return ansis;
} else if (lastfi) {
pnum++;
lastfi=false;
if (ansis == 'null') return null;
return ansis;
} else {
pnum++;
if (ansis == 'null') return null;
return ansis;
}
};
}

function vs_isset(dolpost, defis) {
var thething=dolpost.replace('$_POST[','').replace('$_GET[','').replace(/\'/g,'').replace(/\"/g,'').replace(/\[/g,'').replace(/\]/g,'');
return location.search.split(thething + '=')[1] ? str_replace("1 ", "1 + ", str_replace("1 ", "1 + ", str_replace("2 ", "2 + ", str_replace("3 ", "3 + ", str_replace("4 ", "4 + ", str_replace("5 ", "5 + ", str_replace("6 ", "6 + ", str_replace("7 ", "7 + ", str_replace("8 ", "8 + ", str_replace("9 ", "9 + ", str_replace(" '", " + '", str_replace("' ", "' + ", str_replace(" ~` ", " + ", str_replace("+", " ", str_replace("+++", " ~` ", decodeURIComponent(location.search.split(thething + '=')[1].split('&')[0])))))))))))))))) : defis;
}

function vsisset(dolpost, defis) {
var thething=dolpost.replace('$_POST[','').replace('$_GET[','').replace(/\'/g,'').replace(/\"/g,'').replace(/\[/g,'').replace(/\]/g,'');
return location.search.split(thething + '=')[1] ? decodeURIComponent(location.search.split(thething + '=')[1].split('&')[0]).replace(/\+/g,' ') : defis;
}

function isset(dolpost) {
var thisval='';
var thething=dolpost.replace('$_POST[','').replace('$_GET[','').replace(/\'/g,'').replace(/\"/g,'').replace(/\[/g,'').replace(/\]/g,'');
var bt=location.search.split(thething + '=')[1] ? true : false;
if (!bt) {
if (window.sessionStorage) {
thisval=('' + sessionStorage.getItem('djp_' + thething));
if (('' + thisval) != 'null') {
bt=true;
}
}
}
return bt;
}

function getss(tt) {
var thisval='';
if (window.sessionStorage) {
thisval=('' + sessionStorage.getItem('djp_' + tt));
if (('' + thisval) != 'null') {
evallist.push(str_replace("0 ", "0 + ", str_replace("1 ", "1 + ", str_replace("2 ", "2 + ", str_replace("3 ", "3 + ", str_replace("4 ", "4 + ", str_replace("5 ", "5 + ", str_replace("6 ", "6 + ", str_replace("7 ", "7 + ", str_replace("8 ", "8 + ", str_replace("9 ", "9 + ", str_replace(" '", " + '", str_replace("' ", "' + ", str_replace(" ~` ", " + ", str_replace("+", " ", str_replace("+++", " ~` ", decodeURIComponent(thisval)))))))))))))))));
return str_replace("0 ", "0 + ", str_replace("1 ", "1 + ", str_replace("2 ", "2 + ", str_replace("3 ", "3 + ", str_replace("4 ", "4 + ", str_replace("5 ", "5 + ", str_replace("6 ", "6 + ", str_replace("7 ", "7 + ", str_replace("8 ", "8 + ", str_replace("9 ", "9 + ", str_replace(" '", " + '", str_replace("' ", "' + ", str_replace(" ~` ", " + ", str_replace("+", " ", str_replace("+++", " ~` ", decodeURIComponent(thisval))))))))))))))));
}
}
return thisval;
}

function urldecode(dolpost) {
var thething=dolpost.replace('$_POST[','').replace('$_GET[','').replace(/\'/g,'').replace(/\"/g,'').replace(/\[/g,'').replace(/\]/g,'');
return location.search.split(thething + '=')[1] ? decodeURIComponent(location.search.split(thething + '=')[1].split('&')[0]).replace(/\+/g,' ') : getss(thething);
}

function str_replace(p1, p2, dolpost) {
var from='';
for (var ifrom=0; ifrom<p1.length; ifrom++) {
if (p1.substring(ifrom, eval(1 + ifrom)) >= '0' && p1.substring(ifrom, eval(1 + ifrom)) <= '9') {
from+=p1.substring(ifrom, eval(1 + ifrom));
} else if (p1.substring(ifrom, eval(1 + ifrom)) >= 'a' && p1.substring(ifrom, eval(1 + ifrom)) <= 'z') {
from+=p1.substring(ifrom, eval(1 + ifrom));
} else if (p1.substring(ifrom, eval(1 + ifrom)) >= 'A' && p1.substring(ifrom, eval(1 + ifrom)) <= 'Z') {
from+=p1.substring(ifrom, eval(1 + ifrom));
} else {
from+=("\\").substring(0,1) + p1.substring(ifrom, eval(1 + ifrom));
}
}
while (dolpost.indexOf(String.fromCharCode(10)) != -1) {
dolpost=dolpost.replace(String.fromCharCode(10), '" + String.fromCharCode(10) + "');
}
eval('evalspare=("' + dolpost + '").replace(/' + from + '/g, "' + p2 + '");');
return evalspare;
}


function doit(buto) {
//if (evallist.length > 0) { for (var iop=0; iop<evallist.length; iop++) { alert(evallist[iop]); eval(evallist[iop]); } }
if (buto.id.indexOf('alert') != -1) {
eval('alert("' + document.getElementById('alertdiv').innerHTML.replace(/\ \;/g,' ').replace(/\<br\>/g,'" + String.fromCharCode(10) + "') + '")');
} else if (buto.id.indexOf('confirm') != -1) {
eval('confirm("' + document.getElementById('confirmdiv').innerHTML.replace(/\ \;/g,' ').replace(/\<br\>/g,'" + String.fromCharCode(10) + "') + '")');
} else if (buto.id.indexOf('prompt') != -1) {
eval('prompt("' + document.getElementById('promptdiv').innerHTML.replace(/\ \;/g,' ').replace(/\<br\>/g,'" + String.fromCharCode(10) + "') + '","' + document.getElementById('promptdef').innerHTML.replace(/\ \;/g,' ') + '")');
}
}

// Thanks to http://jennifermadden.com/javascript/stringEnterKeyDetector.html
function checkEnter(e){ //e is event object passed from function invocation
var characterCode; //literal character code will be stored in this variable

if(e && e.which){ //if which property of event object is supported (NN4)
e = e;
characterCode = e.which; //character code is contained in NN4's which property
}
else{
e = event;
characterCode = e.keyCode; //character code is contained in IE's keyCode property
}

if(characterCode == 13){ //if generated character code is equal to ascii 13 (if enter key)
document.getElementById('hval' + xpnum).value=encodeURIComponent(document.getElementById('val' + xpnum).value);
document.forms[-1 + eval(document.forms.length)].submit(); //submit the form
return false;
}
else{
return true;
}

}

function copyover(dio) {
if (dio.id.indexOf('def') != -1) {
if (document.getElementById(dio.id.replace('def', 'deft'))) {
document.getElementById(dio.id.replace('def', 'deft')).value=dio.innerHTML;
}
} else {
if (document.getElementById(dio.id.replace('div', 'words'))) {
document.getElementById(dio.id.replace('div', 'words')).value=dio.innerHTML;
}
}
}

function afterstore() {
document.getElementById(gpopname + 'form').submit();
return true;
}

function lstorageaway(fio) {
var thisname='';
var popname=fio.id.replace('form','');
var popoh=fio.outerHTML;
var pops=popoh.split('name="');
for (var ipops=1; ipops<pops.length; ipops++) {
thisname=pops[ipops].split('"')[0];
//alert(thisname);
if (document.getElementById(thisname)) {
//alert(thisname.toUpperCase());
if (window.localStorage) {
//alert(thisname.toLowerCase());
localStorage.setItem('djp_' + thisname, encodeURIComponent(document.getElementById(thisname).value));
//alert('djp_' + thisname);
}
}
}
}

function storageaway(fio) {
if (gpopname == '') {
var thisname='';
var popname=fio.id.replace('form','');
var popoh=fio.outerHTML;
var pops=popoh.split('name="');
for (var ipops=1; ipops<pops.length; ipops++) {
thisname=pops[ipops].split('"')[0];
//alert(thisname);
if (document.getElementById(thisname)) {
//alert(thisname.toUpperCase());
if (window.sessionStorage) {
//alert(thisname.toLowerCase());
sessionStorage.setItem('djp_' + thisname, encodeURIComponent(document.getElementById(thisname).value));
//alert('djp_' + thisname);
}
}
}
gpopname=popname;
setTimeout(afterstore, 2000);
return false;
} else {
return true;
}
}

function ss_ls_check(fio) {
var clickthis='';
var thisval='';
var popname='', popoh='', pops=[], ipops=0;
var fs=document.getElementsByTagName('form');
for (var ifg=0; ifg<fs.length; ifg++) {
if (ifg <= 2) {
popname=fs[ifg].id.replace('form','');
popoh=fs[ifg].outerHTML;
pops=popoh.split('name="');
for (ipops=1; ipops<pops.length; ipops++) {
if (window.sessionStorage) {
thisname=pops[ipops].split('"')[0];
if (document.getElementById(thisname)) {
if (window.sessionStorage) {
thisval=('' + sessionStorage.getItem('djp_' + thisname));
if (('' + thisval) != 'null') {
document.getElementById(thisname).value=decodeURIComponent(thisval);
//sessionStorage.removeItem('djp_' + thisname);
xlist.push('djp_' + thisname);
clickthis=popname + 'b';
if (document.getElementById(popname + 's')) {
document.getElementById(popname + 's').innerHTML='<a onclick="lstorageaway(document.getElementById(' + "'" + popname + "' + 'form'));" + '" style=text-decoration:underline;cursor:pointer; title=Store>' + popname + '</a>';
}
//alert(clickthis + ' ... ' + thisval + ' for ' + thisname);
}
}
if (window.localStorage) {
thisval=('' + localStorage.getItem('djp_' + thisname));
if (('' + thisval) != 'null') {
document.getElementById(thisname).value=decodeURIComponent(thisval);
//clickthis=popname + 'b';
}
}
}
}

}
}
}
if (clickthis != '') { document.getElementById(clickthis).click(); }
if (xlist.length > 0) { setTimeout(xit, 2000); }
}

function xit() {
for (var iuyt=0; iuyt<xlist.length; iuyt++) {
sessionStorage.removeItem(xlist[iuyt]);
}
xlist=[];
}

</script>
<style>
div { display: inline-block; }
input { display: inline-block; }
</style>
</head>
<body onload=" if (v1 != '') { document.getElementById('tdans').innerHTML='Last answer was ... ' + decodeURIComponent(v1); } ss_ls_check(); ">
<script>
if (isset("$_POST['alertta']")) {
bvsn="";
console.log('here at alert with ' + String.fromCharCode(10) + str_replace("0 ", "0 + ", str_replace("1 ", "1 + ", str_replace("2 ", "2 + ", str_replace("3 ", "3 + ", str_replace("4 ", "4 + ", str_replace("5 ", "5 + ", str_replace("6 ", "6 + ", str_replace("7 ", "7 + ", str_replace("8 ", "8 + ", str_replace("9 ", "9 + ", str_replace(" '", " + '", str_replace("' ", "' + ", str_replace(" ~` ", " + ", str_replace("+", " ", str_replace("+++", " ~` ", urldecode("$_POST['alertta']")))))))))))))))).replace(/1\ \ \ /g, '1 + '));
document.write("<scr" + "ipt> " + str_replace("0 ", "0 + ", str_replace("1 ", "1 + ", str_replace("2 ", "2 + ", str_replace("3 ", "3 + ", str_replace("4 ", "4 + ", str_replace("5 ", "5 + ", str_replace("6 ", "6 + ", str_replace("7 ", "7 + ", str_replace("8 ", "8 + ", str_replace("9 ", "9 + ", str_replace(" '", " + '", str_replace("' ", "' + ", str_replace(" ~` ", " + ", str_replace("+", " ", str_replace("+++", " ~` ", urldecode("$_POST['alertta']")))))))))))))))) + "</scr" + "ipt>");
}
</script>
<script>
if (isset("$_POST['confirmta']")) {
bvsn="";
console.log('here at confirm');
document.write("<scr" + "ipt> " + str_replace("0 ", "0 + ", str_replace("1 ", "1 + ", str_replace("2 ", "2 + ", str_replace("3 ", "3 + ", str_replace("4 ", "4 + ", str_replace("5 ", "5 + ", str_replace("6 ", "6 + ", str_replace("7 ", "7 + ", str_replace("8 ", "8 + ", str_replace("9 ", "9 + ", str_replace(" '", " + '", str_replace("' ", "' + ", str_replace(" ~` ", " + ", str_replace("+", " ", str_replace("+++", " ~` ", urldecode("$_POST['confirmta']")))))))))))))))) + "</scr" + "ipt>");
}
</script>
<script>
if (isset("$_POST['promptta']")) {
bvsn="";
document.write("<scr" + "ipt> " + str_replace("0 ", "0 + ", str_replace("1 ", "1 + ", str_replace("2 ", "2 + ", str_replace("3 ", "3 + ", str_replace("4 ", "4 + ", str_replace("5 ", "5 + ", str_replace("6 ", "6 + ", str_replace("7 ", "7 + ", str_replace("8 ", "8 + ", str_replace("9 ", "9 + ", str_replace(" '", " + '", str_replace("' ", "' + ", str_replace(" ~` ", " + ", str_replace("+", " ", str_replace("+++", " ~` ", urldecode("$_POST['promptta']")))))))))))))))) + "</scr" + "ipt>");
}
</script>
<h1>Design Javascript Popup Windows</h1>
<h2>Alert, Confirm, Prompt</h2>
<h3>RJM Programming - March, 2021</h3>
<table style='width:100%;' border=20>
<tr><td id=tdans colspan=3></td></tr>
<script>
document.write("<tr><th><span id=alerts>alert</span>(" + '"' + "<div onblur=copyover(this); id=alertdiv contenteditable=true>" + vsisset("$_POST['alertwords']","Hello there") + "</div>" + '"' + ")<input style=background-color:yellow;z-index:567; onclick=doit(this); type=button id=alertb title=See value=';'></input></th><th><span id=confirms>confirm</span>(" + '"' + "<div onblur=copyover(this); id=confirmdiv contenteditable=true>" + vsisset("$_POST['confirmwords']","Hello there?") + "</div>" + '"' + ")<input style=background-color:yellow;z-index:567; onclick=doit(this); type=button id=confirmb title=See value=';'></input></th><th><span id=prompts>prompt</span>(" + '"' + "<div onblur=copyover(this); id=promptdiv contenteditable=true>" + vsisset("$_POST['promptwords']","Hello there?!") + "</div>" + '","' + "<div onblur=copyover(this); id=promptdef contenteditable=true>" + vsisset("$_POST['promptdeft']","Hi") + "</div>" + '"' + ")<input style=background-color:yellow;z-index:567; onclick=doit(this); type=button id=promptb title=See value=';'></input></th></tr>");
</script>
<tr><td colspan=3> ... versus tailored versions below ... </td></tr>
<tr><td>
<form onsubmit='return storageaway(this);' id=alertform method=GET action=./design_javascript_popups.html>
<script>
document.write("<input style=background-color:lightgreen;z-index:567; type=submit value=alert></input><input type=hidden id=alertwords name=alertwords value='" + vsisset("$_POST['alertwords']","Hello there") + "'></input><br>");
</script>
<input title=Styling style=width:98%;background-color:lightblue;z-index:567; type=text value="width: 48%; background-color: rgba(255, 165, 0, 0.8); border: 2px solid red; position: absolute; top: 70px; left: 2%; opacity: 0.9; display: block; z-index: 56;" name=alertsty id=alertsty></input><br>
<script>
document.write("<textarea rows=120 style=width:95%; id=alertta data-name=alertta>" + vs_isset("$_POST['alertta']","var alert = function(zwords){ " + String.fromCharCode(10) +
" var defwords='';" + String.fromCharCode(10) +
" var vcancel='';" + String.fromCharCode(10) +
" var vok='';" + String.fromCharCode(10) +
" var ansis=location.search.split('val' + pnum + '=')[1] ? decodeURIComponent(decodeURIComponent(location.search.split('val' + pnum + '=')[1].split('&')[0]).replace(/\+/g,' ')) : '';" + String.fromCharCode(10) +
" if (document.URL.indexOf('val' + pnum + '=') == -1) ansis=null;" + String.fromCharCode(10) +
" if (document.URL.indexOf('val' + pnum + '=') != -1 && pnum == eval(-1 + xpnum)) {" + String.fromCharCode(10) +
" vcancel=location.search.split('Cancel=')[1] ? location.search.split('Cancel=')[1].split('&')[0] : '';" + String.fromCharCode(10) +
" vok=location.search.split('OK=')[1] ? location.search.split('OK=')[1].split('&')[0] : '';" + String.fromCharCode(10) +
" }" + String.fromCharCode(10) +
" if (vcancel != '') {" + String.fromCharCode(10) +
" pnum++;" + String.fromCharCode(10) +
" return null;" + String.fromCharCode(10) +
" } else if (vok != '') {" + String.fromCharCode(10) +
" pnum++;" + String.fromCharCode(10) +
" return '';" + String.fromCharCode(10) +
" } else if (document.getElementById('val' + pnum)) {" + String.fromCharCode(10) +
" allowed=false;" + String.fromCharCode(10) +
" lastfi=true;" + String.fromCharCode(10) +
" document.getElementById('safariform').style.display='block';" + String.fromCharCode(10) +
" while (zwords.indexOf('<br>') != -1) { zwords=zwords.replace('<br>',String.fromCharCode(10)); }" + String.fromCharCode(10) +
" document.getElementById('prompt').innerHTML=zwords;" + String.fromCharCode(10) +
" document.getElementById('val' + pnum).value=defwords;" + String.fromCharCode(10) +
" document.getElementById('hval' + pnum).value=encodeURIComponent(defwords);" + String.fromCharCode(10) +
" document.getElementById('Cancel').style.display='none';" + String.fromCharCode(10) +
" document.getElementById('bCancel').style.display='none';" + String.fromCharCode(10) +
" document.getElementById('val' + pnum).style.display='none';" + String.fromCharCode(10) +
" document.getElementById('OK').focus();" + String.fromCharCode(10) +
" pnum++;" + String.fromCharCode(10) +
" return ansis;" + String.fromCharCode(10) +
" } else if (lastfi) {" + String.fromCharCode(10) +
" pnum++;" + String.fromCharCode(10) +
" lastfi=false;" + String.fromCharCode(10) +
" if (ansis == 'null') return null;" + String.fromCharCode(10) +
" return ansis;" + String.fromCharCode(10) +
" } else {" + String.fromCharCode(10) +
" pnum++;" + String.fromCharCode(10) +
" if (ansis == 'null') return null;" + String.fromCharCode(10) +
" return ansis;" + String.fromCharCode(10) +
" }" + String.fromCharCode(10) +
"};") + "</textarea>");
</script>
</form>
</td><td>
<form onsubmit='return storageaway(this);' id=confirmform method=GET action=./design_javascript_popups.html>
<script>
document.write("<input style=background-color:lightgreen;z-index:567; type=submit value=confirm></input><input type=hidden id=confirmwords name=confirmwords value='" + vsisset("$_POST['confirmwords']","Hello there?") + "'></input><br>");
</script>
<input title=Styling style=width:98%;background-color:lightblue;z-index:567; type=text value="width: 48%; background-color: rgba(255, 165, 0, 0.8); border: 2px solid red; position: absolute; top: 70px; left: 2%; opacity: 0.9; display: block; z-index: 56;" name=confirmsty id=confirmsty></input><br>
<script>
document.write("<textarea rows=120 style=width:95%; id=confirmta data-name=confirmta>" + vs_isset("$_POST['confirmta']","var confirm = function(zwords){" + String.fromCharCode(10) +
" //alert('val' + pnum + '=? ' + ' pnum=' + pnum + ' xpnum=' + xpnum + ' ' + document.URL);" + String.fromCharCode(10) +
" var defwords='1trueYesOK';" + String.fromCharCode(10) +
" var vcancel='';" + String.fromCharCode(10) +
" var vok='';" + String.fromCharCode(10) +
" var ansis=location.search.split('val' + pnum + '=')[1] ? decodeURIComponent(decodeURIComponent(location.search.split('val' + pnum + '=')[1].split('&')[0]).replace(/\+/g,' ')) : '';" + String.fromCharCode(10) +
" if (document.URL.indexOf('val' + pnum + '=') == -1) ansis=null;" + String.fromCharCode(10) +
" if (document.URL.indexOf('val' + pnum + '=') != -1 && pnum == eval(-1 + xpnum)) {" + String.fromCharCode(10) +
" vcancel=location.search.split('Cancel=')[1] ? location.search.split('Cancel=')[1].split('&')[0] : '';" + String.fromCharCode(10) +
" vok=location.search.split('OK=')[1] ? location.search.split('OK=')[1].split('&')[0] : '';" + String.fromCharCode(10) +
" }" + String.fromCharCode(10) +
" //alert('vok=' + vok);" + String.fromCharCode(10) +
" if (vcancel != '') {" + String.fromCharCode(10) +
" pnum++;" + String.fromCharCode(10) +
" return null;" + String.fromCharCode(10) +
" } else if (vok != '') {" + String.fromCharCode(10) +
" pnum++;" + String.fromCharCode(10) +
" return '1trueYesOK';" + String.fromCharCode(10) +
" } else if (document.getElementById('val' + pnum)) {" + String.fromCharCode(10) +
" allowed=false;" + String.fromCharCode(10) +
" lastfi=true;" + String.fromCharCode(10) +
" document.getElementById('safariform').style.display='block';" + String.fromCharCode(10) +
" while (zwords.indexOf('<br>') != -1) { zwords=zwords.replace('<br>',String.fromCharCode(10)); }" + String.fromCharCode(10) +
" document.getElementById('prompt').innerHTML=zwords;" + String.fromCharCode(10) +
" document.getElementById('val' + pnum).value=defwords;" + String.fromCharCode(10) +
" document.getElementById('hval' + pnum).value=encodeURIComponent(defwords);" + String.fromCharCode(10) +
" document.getElementById('val' + pnum).style.display='none';" + String.fromCharCode(10) +
" document.getElementById('OK').focus();" + String.fromCharCode(10) +
" pnum++;" + String.fromCharCode(10) +
" return ansis;" + String.fromCharCode(10) +
" } else if (lastfi) {" + String.fromCharCode(10) +
" pnum++;" + String.fromCharCode(10) +
" lastfi=false;" + String.fromCharCode(10) +
" if (ansis == 'null') return null;" + String.fromCharCode(10) +
" return ansis;" + String.fromCharCode(10) +
" } else {" + String.fromCharCode(10) +
" pnum++;" + String.fromCharCode(10) +
" if (ansis == 'null') return null;" + String.fromCharCode(10) +
" return ansis;" + String.fromCharCode(10) +
" }" + String.fromCharCode(10) +
"};") + "</textarea>");
</script>
</form>
</td><td>
<form onsubmit='return storageaway(this);' id=promptform method=GET action=./design_javascript_popups.html>
<script>
document.write("<input style=background-color:lightgreen;z-index:567; type=submit value=prompt></input><input type=hidden id=promptwords name=promptwords value='" + vsisset("$_POST['promptwords']","Hello there?!") + "'></input><input type=hidden id=promptdeft name=promptdeft value='" + vsisset("$_POST['promptdeft']","Hi") + "'></input><br>");
</script>
<input title=Styling style=width:98%;background-color:lightblue;z-index:567; type=text value="width: 48%; background-color: rgba(255, 165, 0, 0.8); border: 2px solid red; position: absolute; top: 70px; left: 2%; opacity: 0.9; display: block; z-index: 56; " name=promptsty id=promptsty></input><br>
<script>
document.write("<textarea rows=120 style=width:95%; id=promptta data-name=promptta>" + vs_isset("$_POST['promptta']","var prompt = function(zwords, defwords){" + String.fromCharCode(10) +
" var vcancel='';" + String.fromCharCode(10) +
" var vok='';" + String.fromCharCode(10) +
" var ansis=location.search.split('val' + pnum + '=')[1] ? decodeURIComponent(decodeURIComponent(location.search.split('val' + pnum + '=')[1].split('&')[0]).replace(/\+/g,' ')) : '';" + String.fromCharCode(10) +
" if (document.URL.indexOf('val' + pnum + '=') == -1) ansis=null;" + String.fromCharCode(10) +
" if (document.URL.indexOf('val' + pnum + '=') != -1 && pnum == eval(-1 + xpnum)) {" + String.fromCharCode(10) +
" vcancel=location.search.split('Cancel=')[1] ? location.search.split('Cancel=')[1].split('&')[0] : '';" + String.fromCharCode(10) +
" vok=location.search.split('OK=')[1] ? location.search.split('OK=')[1].split('&')[0] : '';" + String.fromCharCode(10) +
" }" + String.fromCharCode(10) +
" if (vcancel != '') {" + String.fromCharCode(10) +
" pnum++;" + String.fromCharCode(10) +
" return null;" + String.fromCharCode(10) +
" } else if (vok != '') {" + String.fromCharCode(10) +
" pnum++;" + String.fromCharCode(10) +
" return ansis;" + String.fromCharCode(10) +
" } else if (document.getElementById('val' + pnum)) {" + String.fromCharCode(10) +
" allowed=false;" + String.fromCharCode(10) +
" lastfi=true;" + String.fromCharCode(10) +
" document.getElementById('safariform').style.display='block';" + String.fromCharCode(10) +
" while (zwords.indexOf('<br>') != -1) { zwords=zwords.replace('<br>',String.fromCharCode(10)); }" + String.fromCharCode(10) +
" document.getElementById('prompt').innerHTML=zwords;" + String.fromCharCode(10) +
" document.getElementById('val' + pnum).value=defwords;" + String.fromCharCode(10) +
" document.getElementById('hval' + pnum).value=encodeURIComponent(defwords);" + String.fromCharCode(10) +
" if (zwords.split(String.fromCharCode(10)).length > eval('0' + document.getElementById('prompt').rows)) {" + String.fromCharCode(10) +
" document.getElementById('prompt').rows=zwords.split(String.fromCharCode(10)).length;" + String.fromCharCode(10) +
" } else if (zwords.split('<br>').length > eval('0' + document.getElementById('prompt').rows)) {" + String.fromCharCode(10) +
" document.getElementById('prompt').rows=zwords.split('<br>').length;" + String.fromCharCode(10) +
" }" + String.fromCharCode(10) +
" document.getElementById('val' + pnum).focus();" + String.fromCharCode(10) +
" pnum++;" + String.fromCharCode(10) +
" return ansis;" + String.fromCharCode(10) +
" } else if (lastfi) {" + String.fromCharCode(10) +
" pnum++;" + String.fromCharCode(10) +
" lastfi=false;" + String.fromCharCode(10) +
" if (ansis == 'null') return null;" + String.fromCharCode(10) +
" return ansis;" + String.fromCharCode(10) +
" } else {" + String.fromCharCode(10) +
" pnum++;" + String.fromCharCode(10) +
" if (ansis == 'null') return null;" + String.fromCharCode(10) +
" return ansis;" + String.fromCharCode(10) +
" }" + String.fromCharCode(10) +
"};") + "</textarea>");
</script>
</form>
</td></tr>
</table>
<script>
if (isset("$_POST['alertsty']")) {
bvsnp="";
bvsns="";
bvsn=str_replace("+"," ",urldecode("$_POST['alertsty']"));
} else if (isset("$_POST['confirmsty']")) {
bvsnp="";
bvsns="";
bvsn=str_replace("+"," ",urldecode("$_POST['confirmsty']"));
} else if (isset("$_POST['promptsty']")) {
bvsnp="";
bvsns="";
bvsn=str_replace("+"," ",urldecode("$_POST['promptsty']"));
}
document.write('<form enctype="text/plain" style="' + bvsnp + bvsn + bvsns + '" id="safariform" method="GET" action="./design_javascript_popups.html" readonly=""><input type="hidden" name="nojwin" value="Q"><textarea style="width:96%;background-color:#eeeeee;" rows="2" id="prompt" readonly="readonly"></textarea><br><input type="hidden" value="" name="val1" id="hval1"><input onkeypress="checkEnter(event);" onblur=" document.getElementById(' + "'" + 'h' + "'" + ' + this.id).value=encodeURIComponent(this.value); " style="width:50%;background-color:yellow;" type="text" value="" id="val1">  <input style="float:right;width:25%;" type="submit" value="OK" name="OK" id="OK"> <input style="display:none;" type="submit" value="Cancel" name="Cancel" id="Cancel"> <input type="button" value="Cancel" id="bCancel" onclick=" document.getElementById(' + "'" + 'val1' + "'" + ').value=' + "'" + 'null' + "'" + '; document.getElementById(' + "'" + 'hval1' + "'" + ').value=encodeURIComponent(' + "'" + 'null' + "'" + '); this.style.display=' + "'" + 'none' + "'" + '; document.getElementById(' + "'" + 'Cancel' + "'" + ').style.display=' + "'" + 'block' + "'" + '; document.getElementById(' + "'" + 'Cancel' + "'" + ').click(); "> </form>');
</script>
</body>
</html>