Voor website die ik aan het maken moet ik werken met frames. Alleen nu krijg ik een ding niet goed werkend.
Bovenin heb ik een menu met een aantal buttons die verwijzen naar leftframe. Als ik de pagina opvraag en op een van de links klik dan doet hij het goed. Klik ik op de volgende button dan wordt de target geopend in nieuw window.
In dc.php wordt een iframe gebruikt deze is naamloos, maar heb ik om te proberen ook leftmenu als naam gegeven. Dit hielp niet.
Als test heb ik ook dc.php leeg gesloopt en alleen de part die meestuur laten echo'en dan werkt het wel.
Mijn vermoeden is dus dat het een conflict is met mijn javascript. Alleen mijn javascript laat nog te wensen over...
Mijn pagina met mijn frameset ziet er als volgt uit;
Het dc.php als volgt:
Bovenin heb ik een menu met een aantal buttons die verwijzen naar leftframe. Als ik de pagina opvraag en op een van de links klik dan doet hij het goed. Klik ik op de volgende button dan wordt de target geopend in nieuw window.
In dc.php wordt een iframe gebruikt deze is naamloos, maar heb ik om te proberen ook leftmenu als naam gegeven. Dit hielp niet.
Als test heb ik ook dc.php leeg gesloopt en alleen de part die meestuur laten echo'en dan werkt het wel.
Mijn vermoeden is dus dat het een conflict is met mijn javascript. Alleen mijn javascript laat nog te wensen over...
Mijn pagina met mijn frameset ziet er als volgt uit;
code:
top.php ziet er als volgt uit1
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
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
</head>
<!-- frames -->
<frameset cols="*,775,*">
<frame name="" src="" marginwidth="0" marginheight="0" scrolling="no" frameborder="0">
<!-- frames -->
<frameset rows="10,*,10">
<frame name="" src="" marginwidth="0" marginheight="0" scrolling="no" frameborder="0">
<!-- frames -->
<frameset rows="200,*,10">
<frame name="" src="top.php" marginwidth="0" marginheight="0" scrolling="no" frameborder="0">
<!-- frames -->
<frameset cols="165,*">
<frame name="leftmenu" src="menu/dc.php" marginwidth="0" marginheight="0" scrolling="no" frameborder="0">
<frame name="mainFrame" src="" marginwidth="0" marginheight="0" scrolling="auto" frameborder="0">
</frameset>
<frame name="" src="" marginwidth="0" marginheight="0" scrolling="auto" frameborder="0">
</frameset>
<frame name="" src="" marginwidth="0" marginheight="0" scrolling="no" frameborder="0">
</frameset>
<frame name="" src="" marginwidth="0" marginheight="0" scrolling="no" frameborder="0">
</frameset>
<body>
</body>
</html> |
PHP:
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
| <?php define('IN_DBT', true); $dbt_root_path = './'; include($dbt_root_path . 'config.php'); ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Untitled</title> </head> <script language="JavaScript"> <!-- function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_nbGroup(event, grpName) { //v6.0 var i,img,nbArr,args=MM_nbGroup.arguments; if (event == "init" && args.length > 2) { if ((img = MM_findObj(args[2])) != null && !img.MM_init) { img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src; if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array(); nbArr[nbArr.length] = img; for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) { if (!img.MM_up) img.MM_up = img.src; img.src = img.MM_dn = args[i+1]; nbArr[nbArr.length] = img; } } } else if (event == "over") { document.MM_nbOver = nbArr = new Array(); for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) { if (!img.MM_up) img.MM_up = img.src; img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])?args[i+1] : img.MM_up); nbArr[nbArr.length] = img; } } else if (event == "out" ) { for (i=0; i < document.MM_nbOver.length; i++) { img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; } } else if (event == "down") { nbArr = document[grpName]; if (nbArr) for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; } document[grpName] = nbArr = new Array(); for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) { if (!img.MM_up) img.MM_up = img.src; img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up; nbArr[nbArr.length] = img; } } } function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } function P7_JumpMenu(selObj,restore){ //v1.7 by Project Seven var theFullString = selObj.options[selObj.selectedIndex].value; if (restore) selObj.selectedIndex=0; var theLength = theFullString.length; var endPos = theFullString.lastIndexOf("~"); var theUrl, theTarget, theParent; if (endPos > 0) {theUrl = theFullString.substring(0,endPos);} else {theUrl = theFullString;} endPos++ if (endPos < theLength) {theTarget = theFullString.substring(endPos,theLength)} else {theTarget = "window:Main";} if (theTarget == "window:New") {window.open(theUrl);} else if (theTarget == "window:Main") {eval("parent.location='"+theUrl+"'");} else {eval("parent.frames[\'"+theTarget+"\'].location='"+theUrl+"'");} } //--> </script> <body> <table cellspacing="0" cellpadding="0" border="0"> <tr> <td width="775" class="framework"> <!-- Display logo --> <div align="left"> [img]"<?php[/img]" width="250" height="40" alt="" border="0"> </div> <!-- Display logo --> <!-- Begin Top menu --> <div align="right" class="topmenu"> <a href="home.php" class="topmenu_link">Home</a> | <a href="f" class="topmenu_link">Referenties</a> | <a href="fasf" class="topmenu_link">Bedrijfsprofiel</a> </div> <!-- End Top menu --> <div class="button"><table cellspacing="0" cellpadding="0" border="0"> <tr> <td><a href="dc.php?part=1" target="leftmenu" onFocus="if(this.blur)this.blur()" onClick="MM_nbGroup('down','navbar1','navigatie_r1_c1','images/base/topmenu/home_activated.gif',1);" onMouseOver="MM_nbGroup('over','navigatie_r1_c1','images/base/topmenu/home_activated.gif','images/base/topmenu/home_activated.gif',1);" onMouseOut="MM_nbGroup('out');">[img]"images/base/topmenu/home_deactivated.gif"[/img]</a></td> <td><a href="dc.php?part=1" target="leftmenu" onFocus="if(this.blur)this.blur()" onClick="MM_nbGroup('down','navbar1','navigatie_r1_c2','images/base/topmenu/telecomv_activated.gif',1);" onMouseOver="MM_nbGroup('over','navigatie_r1_c2','images/base/topmenu/telecomv_activated.gif','images/base/topmenu/telecomv_activated.gif',1);" onMouseOut="MM_nbGroup('out');">[img]"images/base/topmenu/telecomv_deactivated.gif"[/img]</a></td> <td><a href="dc.php?part=3" target="leftmenu" onFocus="if(this.blur)this.blur()" onClick="MM_nbGroup('down','navbar1','navigatie_r1_c3','images/base/topmenu/telecomm_activated.gif',1);" onMouseOver="MM_nbGroup('over','navigatie_r1_c3','images/base/topmenu/telecomm_activated.gif','images/base/topmenu/telecomm_activated.gif',1);" onMouseOut="MM_nbGroup('out');">[img]"images/base/topmenu/telecomm_deactivated.gif"[/img]</a></td> <td><a href="dc.php?part=2" target="leftmenu" onFocus="if(this.blur)this.blur()" onClick="MM_nbGroup('down','navbar1','navigatie_r1_c4','images/base/topmenu/automatisering_activated.gif',1);" onMouseOver="MM_nbGroup('over','navigatie_r1_c4','images/base/topmenu/automatisering_activated.gif','images/base/topmenu/automatisering_activated.gif',1);" onMouseOut="MM_nbGroup('out');">[img]"images/base/topmenu/automatisering_deactivated.gif"[/img]</a></td> <td><a href="dc.php?part=7" target="leftmenu" onFocus="if(this.blur)this.blur()" onClick="MM_nbGroup('down','navbar1','navigatie_r1_c5','images/base/topmenu/inbouwstation_activated.gif',1);" onMouseOver="MM_nbGroup('over','navigatie_r1_c5','images/base/topmenu/inbouwstation_activated.gif','images/base/topmenu/inbouwstation_activated.gif',1);" onMouseOut="MM_nbGroup('out');">[img]"images/base/topmenu/inbouwstation_deactivated.gif"[/img]</a></td> <td><a href="dc.php?part=4" target="leftmenu" onFocus="if(this.blur)this.blur()" onClick="MM_nbGroup('down','navbar1','navigatie_r1_c6','images/base/topmenu/algemeen_activated.gif',1);" onMouseOver="MM_nbGroup('over','navigatie_r1_c6','images/base/topmenu/algemeen_activated.gif','images/base/topmenu/algemeen_activated.gif',1);" onMouseOut="MM_nbGroup('out');">[img]"images/base/topmenu/algemeen_deactivated.gif"[/img]</a></td> </tr> </table> </body> </html> |
Het dc.php als volgt:
PHP:
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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
| <?php define('IN_DBT', true); $dbt_root_path = './'; include($dbt_root_path . 'config.php'); ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Untitled</title> </head> <body> <STYLE type='text/css'> .vendorBoxA { /* LETTER EIGENSCHAPPEN */ margin-left: 0px; padding-left: 4px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 7pt; font-weight: bold; text-decoration: none; color: #FFFFFF; line-height: 10pt; /* BLOCK EIGENSCHAPPEN */ display: block; margin-bottom: -20px; background-color: #143D8D; height: 18px; width: 132px; /* BORDER EIGENSCHAPPEN */ border-color: #FFFFFF; border-style: solid; border-width: 1px; border-collapse: collapse; } A.vendorBoxA:hover { color: #FFFFFF; text-decoration: none; background-color: #00A94F; } </style> <?php $result=mysql_query("SELECT * FROM menu_afdelingen WHERE id='{$_REQUEST['part']}'") or die (mysql_error()); $row=mysql_fetch_object($result); if($row->dcbox == 'yes'){ echo("<iframe src=\"$row->dcbox_url\" frameborder=\"0\" height=\"$row->height\" scrolling=\"no\" width=\"153\"></iframe>");} ?> <TABLE class="" cellSpacing=0 cellPadding=0 border=0> <TBODY> <TR> <TD vAlign=top width="15"></TD> <TD vAlign=top align=left height=15></TD></TR> <TR> <TD vAlign=top></TD> <TD vAlign=top> <?php $counter = ("0"); $result=mysql_query("SELECT * FROM menu WHERE afdeling='{$_REQUEST['part']}' AND level = '0' AND menu_status='yes'ORDER BY hfdmenu") or die (mysql_error()); while ($row=mysql_fetch_object($result)){ $counter++; } if($counter != '0'){ echo("[img]\"images/menu/wijzer.jpg\"[/img]");} ?></TD></TR> <TR> <TD vAlign=top></TD> <TD vAlign=top> <style type="text/css"> .menu { background-color: #143D8D; border: 1px solid #FFFFFF; width: 132px; font-size: 9px; color: #FFFFFF; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: bold; line-height: 11pt; position: absolute; cursor: default; } .item_panel { width: 131px; border-left: 1px solid #FFFFFF; border-right: 1px solid #FFFFFF; font-size: 9px; line-height: 8pt; clip: rect(0, 131, 0, 0); position: absolute; } .item_panel a { width: 130px; text-decoration: none; color: #143D8D; cursor: hand; font-style: normal; } .item_panel a:visited { width: 130px; text-decoration: none; color: #143D8D; cursor: hand; font-style: normal; } .item_panel a:link { width: 130px; text-decoration: none; color: #143D8D; cursor: hand; font-style: normal; } .item { background-color: #D2E6D8; width: 130px; font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; } </style> <script language="javascript"> var bgc_menu = "#143D8D"; var tc_menu = "#FFFFFF"; var over_bgc_menu = "#00A94F"; var over_tc_menu = "#FFFFFF"; var bgc = "#D2E6D8"; var tc = "#143D8D"; var over_bgc = "#FFFFFF"; var over_tc = "#143D8D"; var tborder = "#FFFFFF"; </script> <script src="../includes/boxb.js?log=d712c4p19"></script> <script language="JavaScript"> var Link = new Array(); <?php $a = ("-1"); $result=mysql_query("SELECT * FROM menu WHERE afdeling='{$_REQUEST['part']}' AND level = '0' AND menu_status='yes' ORDER BY menu_order") or die (mysql_error()); while ($row=mysql_fetch_object($result)){ $a++; echo("Link[$a] = \"$row->level|$row->naam");if("$row->level" == "0"){echo(" >>");}else{echo("|page.php?id=$row->id|mainframe");} echo("\";"); $result1=mysql_query("SELECT * FROM menu WHERE hfdmenu='$row->id' AND level='1' AND menu_status='yes' ORDER BY menu_order") or die (mysql_error()); while ($row1=mysql_fetch_object($result1)){ $a++; echo("Link[$a] = \"$row1->level|$row1->naam|page.php?id=$row1->id|mainFrame\";");}} ?> startup(0); </script> </TD></TR> </TBODY></TABLE> </body> </html> |
[ Voor 23% gewijzigd door josvane op 02-06-2006 11:00 ]