Design Javascript Popup Windows
Alert, Confirm, Prompt
RJM Programming - March, 2021
alert
("
")
confirm
("
")
prompt
("
","
")
... versus tailored versions below ...
'>
') != -1) { zwords=zwords.replace('
',String.fromCharCode(10)); } document.getElementById('prompt').innerHTML=zwords; document.getElementById('val' + pnum).value=defwords; 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; } };"; } ?>
'>
') != -1) { zwords=zwords.replace('
',String.fromCharCode(10)); } document.getElementById('prompt').innerHTML=zwords; document.getElementById('val' + pnum).value=defwords; 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; } };"; } ?>
'>
'>
') != -1) { zwords=zwords.replace('
',String.fromCharCode(10)); } document.getElementById('prompt').innerHTML=zwords; document.getElementById('val' + pnum).value=defwords; 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('
').length > eval('0' + document.getElementById('prompt').rows)) { document.getElementById('prompt').rows=zwords.split('
').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; } };"; } ?>