PageSourceSearch

https://www.desidieter.com/modalfiles1/modal.js

js desidieter.com collected 2026-10-02 14:13:50 UTC 2,710 bytes, 64 lines download raw bytes

1if (typeof dhtmlwindow=="undefined")
2alert('ERROR: Modal Window script requires all files from "DHTML Window widget" in order to work!')
3
4var dhtmlmodal={
5veilstack: 0,
6open:function(t, contenttype, contentsource, title, attr, recalonload){
7	var d=dhtmlwindow //reference dhtmlwindow object
8	this.interVeil=document.getElementById("interVeil") //Reference "veil" div
9	this.veilstack++ //var to keep track of how many modal windows are open right now
10	this.loadveil()
11	if (recalonload=="recal" && d.scroll_top==0)
12		d.addEvent(window, function(){dhtmlmodal.adjustveil()}, "load")
13	var t=d.open(t, contenttype, contentsource, title, attr, recalonload)
14	t.controls.firstChild.style.display="none" //Disable "minimize" button
15	t.controls.onclick=function(){dhtmlmodal.close(this._parent)} //OVERWRITE default control action with new one
16	t.show=function(){dhtmlmodal.show(this)} //OVERWRITE default t.show() method with new one
17	t.hide=function(){dhtmlmodal.close(this)} //OVERWRITE default t.hide() method with new one
18return t
19},
20
21
22loadveil:function(){
23	var d=dhtmlwindow
24	d.getviewpoint()
25	this.docheightcomplete=(d.standardbody.offsetHeight>d.standardbody.scrollHeight)? d.standardbody.offsetHeight : d.standardbody.scrollHeight
26	this.interVeil.style.width=d.docwidth+"px" //set up veil over page
27	this.interVeil.style.height=this.docheightcomplete+"px" //set up veil over page
28	this.interVeil.style.left=0 //Position veil over page
29	this.interVeil.style.top=0 //Position veil over page
30	this.interVeil.style.visibility="visible" //Show veil over page
31	this.interVeil.style.display="block" //Show veil over page
32},
33
34adjustveil:function(){ //function to adjust veil when window is resized
35	if (this.interVeil && this.interVeil.style.display=="block") //If veil is currently visible on the screen
36		this.loadveil() //readjust veil
37},
38
39closeveil:function(){ //function to close veil
40	this.veilstack--
41	if (this.veilstack==0) //if this is the only modal window visible on the screen, and being closed
42		this.interVeil.style.display="none"
43},
44
45
46close:function(t, forceclose){ //DHTML modal close function
47	t.contentDoc=(t.contentarea.datatype=="iframe")? window.frames["_iframe-"+t.id].document : t.contentarea //return reference to modal window DIV (or document object in the case of iframe
48	if (typeof forceclose!="undefined")
49		t.onclose=function(){return true}
50	if (dhtmlwindow.close(t)) //if close() returns true
51		this.closeveil()
52},
53
54
55show:function(t){
56	dhtmlmodal.veilstack++
57	dhtmlmodal.loadveil()
58	dhtmlwindow.show(t)
59}
60} //END object declaration
61
62
63document.write('<div id="interVeil"></div>')
64dhtmlwindow.addEvent(window, function(){if (typeof dhtmlmodal!="undefined") dhtmlmodal.adjustveil()}, "resize")

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.