AttributionsTogether: 1
IDependOn-Set: 1
IDependOn-Set: 102
IDependOn-Set: 110
IDependOn-Set: 111
IDependOn-Set: 112
IDependOn-Set: 98
LastModifiedSecs: 1006808614
Parent: 110
SequenceNumber: 8
Title: confirm.js
Part: 0
Author-Set: sauer@cloudmaster.com
LastModifiedSecs: 1006808297
Type:
Lines: 1
The original version with the message hard-coded
EndPart: 0
Part: 1
Author-Set: sauer@cloudmaster.com
LastModifiedSecs: 1006808614
Type: html
Lines: 2
demo - http://www.cloudmaster.com/~sauer/demos/confirm.html
source - http://www.cloudmaster.com/~sauer/demos/confirm.js
EndPart: 1
Part: 2
Author-Set: sauer@cloudmaster.com
LastModifiedSecs: 1006808441
Type: monospaced
Lines: 82
// JavaScript functions to replace "confirm" with an arbitrary
// web page
//
// usage:
// display message box with the preformatted message included.
// promptem(this, 'height', 'width')
// specify a height and width after the first argument optionally
// you can change these defaults
var title = "Confirmation";
var h = 275; // default height
var w = 400; // default width
// you can change the "false"s to "true"s and vice-versa if need be.
function setParams(){
var p = "";
p += "toolbar=false";
p += ",location=false";
p += ",directories=false";
p += ",status=false";
p += ",menubar=false";
p += ",scrollbars=false";
p += ",resizable=false";
p += ",copyhistory=false";
return(p);
}
/******************************************************************************/
// don't screw with stuff after this line
/******************************************************************************/
function promptem(){
window.name = "lenny";
var params = setParams();
if(arguments.length > 1){
h = arguments[1];
w = arguments[2];
}
params += ",height=" + h + ",width=" + w;
out = window.open('', 'out', params);
out.document.close();
writeWindow(out, arguments[0]);
out.focus();
return(false);
}
// generates the frameset
function writeWindow(win, link){
win.document.open();
win.document.write("
| ");
writeln(" NOTICE: You are currently exiting the Office of the"); writeln("Seceratary of Defense (Health affairs) web site, and"); write("entering an external site ("); } win.document.write(link.hostname); with(win.document){ writeln("). We are happy to provide a link to this site"); writeln("for your convenience "); writeln("Please note that the Department of Defence does not"); writeln("review the contents of this site and cannot guarantee its"); writeln("accuracy. The appearance of this link does not"); writeln("constitute endorsement of this web site by the Department"); writeln("of Defense nor the information, services or products"); writeln("contained therin. "); writeln(""); writeln(" |