-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOLDIframe_agents.cfm
184 lines (147 loc) · 4.28 KB
/
OLDIframe_agents.cfm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
<cfif not isdefined("agent_id")>
<cfset agent_id=-1>
</cfif>
<cfinclude template="/includes/_header.cfm">
<cfset title='Manage Agents'>
<!---------------
<script type="text/javascript">
/***********************************************
* IFrame SSI script II- © Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
* Visit DynamicDrive.com for hundreds of original DHTML scripts
* This notice must stay intact for legal use
***********************************************/
//Input the IDs of the IFRAMES you wish to dynamically resize to match its content height:
//Separate each ID with a comma. Examples: ["myframe1", "myframe2"] or ["myframe"] or [] for none:
var iframeids=["_search","_person","_pick"]
//Should script hide iframe from browsers that don't support this script (non IE5+/NS6+ browsers. Recommended):
var iframehide="yes"
var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
var FFextraHeight=parseFloat(getFFVersion)>=0.1? 60 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers
function resizeCaller() {
var dyniframe=new Array()
for (i=0; i<iframeids.length; i++){
if (document.getElementById)
resizeIframe(iframeids[i])
//reveal iframe for lower end browsers? (see var above):
if ((document.all || document.getElementById) && iframehide=="no"){
var tempobj=document.all? document.all[iframeids[i]] : document.getElementById(iframeids[i])
tempobj.style.display="block"
}
}
}
function resizeIframe(frameid){
var currentfr=document.getElementById(frameid)
if (currentfr && !window.opera){
currentfr.style.display="block"
if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax
currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextraHeight;
else if (currentfr.Document && currentfr.Document.body.scrollHeight) //ie5+ syntax
currentfr.height = currentfr.Document.body.scrollHeight;
if (currentfr.addEventListener)
currentfr.addEventListener("load", readjustIframe, false)
else if (currentfr.attachEvent){
currentfr.detachEvent("onload", readjustIframe) // Bug fix line
currentfr.attachEvent("onload", readjustIframe)
}
}
}
function readjustIframe(loadevt) {
var crossevt=(window.event)? event : loadevt
var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement
if (iframeroot)
resizeIframe(iframeroot.id);
}
function loadintoIframe(iframeid, url){
if (document.getElementById)
document.getElementById(iframeid).src=url
}
if (window.addEventListener)
window.addEventListener("load", resizeCaller, false)
else if (window.attachEvent)
window.attachEvent("onload", resizeCaller)
else
window.onload=resizeCaller
</script>
------------>
<style>
#td_search {
height:50%;
width:35%;
}
#td_rslt {
height:50%;
width:65%;
}
#td_edit {
height:100%;
width:35%;
}
#olTabl {
height:100%;
width:100%;
border-spacing: 0;
border-collapse: separate;
}
#_search {
width:100%;
height:100%;
}
#_pick {
width:100%;
height:100%;
}
#_person {
width:100%;
height:100%;
}
</style>
<script>
jQuery(document).ready(function() {
var wh=$(window).height();
var sfmenuh = $('div.sf-mainMenuWrapper:first').height();
var hh = $('#header_color').height();
wh=wh - hh - sfmenuh - 120;
$("#olTabl").height(wh);
});
</script>
<cfoutput>
<table border id="olTabl">
<tr>
<td id="td_search">
<iframe src="/AgentSearch.cfm" id="_search" name="_search"></iframe>
</td>
<td id="td_rslt" rowspan="2">
<iframe src="/editAllAgent.cfm?agent_id=#agent_id#" name="_person" id="_person" ></iframe>
</td>
</tr>
<tr>
<td id="td_edit" valign="top">
<iframe src="/AgentGrid.cfm" name="_pick" id="_pick" ></iframe>
</td>
</tr>
</table>
<!-----------
<table border id="olTabl">
<tr>
<td id="td_search">
srch
<!----
<iframe src="/AgentSearch.cfm" id="_search" name="_search"></iframe>
<br>
---->
</td>
<td id="td_rslt" rowspan="2">
edit
</td>
</tr>
<tr>
<td id="td_edit" valign="top">
results
<!----
---->
</td>
</tr>
</table>
----------------->
<cfinclude template="/includes/_footer.cfm">
</cfoutput>