Page 1 of 1
PHP Include() Function
Posted: Sat Jun 03, 2006 5:10 pm
by dragon2309
Hi, i have a .htm file whihc contains SCRIPT src links to a javascript menu, this file is called menu.htm... On my index.php file i have a general layout set up using tables. In one of the table cells i have entered
This works fine, the menu gets displayed on the index.php file, only one problem, the menu gets displayed as it nwould do on the menu.htm file, theis means its butted up against the left hand side of the window, even though i put the INCLUDE function into the table cell, what i wanted it to do is shove the mune into the table cell (obviously it doesnt work like that)...
So my question, is there any alternative to the INCLUDE function... or is there some parameter im missing?? Sorry, this probably sounds really n00bish, lol. Any help given is much apreciated.
dragon
Posted: Sat Jun 03, 2006 5:30 pm
by ok
Post your code!
Posted: Sat Jun 03, 2006 5:35 pm
by dragon2309
ok, below is the index.php file, there is only one tiny block of PHP midway down.... this page is at
http://www.cambercaravan.co.uk, the server is playing up though, so it mihgt not be up....
code =
Code: Select all
<html>
<head>
<meta http-equiv="Content-Language" content="en-gb">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>CamberCaravan.co.uk</title>
</head>
<body topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<p></p>
<div align="center">
<table border="0" width="60%" id="table1" style="border-collapse: collapse" height="684">
<tr>
<td colspan="2" height="202">
<img src="img/mainhead1.jpg" width="800" height="200"></td>
</tr>
<tr>
<td width="24%" height="90%"><?php include("menu.htm"); ?></php></td>
<td width="76%" height="90%"> </td>
</tr>
</table>
</div>
</body>
</html>
cheers for the reply - dragon
Posted: Sat Jun 03, 2006 5:48 pm
by ok
PHP didn't do anything... you just need to change the prop in "menu_array.js"...
In line 68 where there is a comment:
Code: Select all
, // Screen Position - here you can use "center;left;right;middle;top;bottom" or a combination of "center:middle"
You need to change:
Code: Select all
"center", // Screen Position - here you can use "center;left;right;middle;top;bottom" or a combination of "center:middle"
Posted: Sat Jun 03, 2006 5:58 pm
by dragon2309
ok, i kind of understand you, but what would i change it to to get it to sit inside the cell where its supposed to be???
thanks, dragon
Posted: Sat Jun 03, 2006 6:15 pm
by ok
Posted: Sun Jun 04, 2006 5:05 am
by dragon2309
ok, readong through now.... although they are talking about a different menu version completely, than the one im using.... so when it talks about menu_data.js, i dont have that file.... is that a problem...
dragon
Posted: Sun Jun 04, 2006 5:07 am
by ok
I don't know how those menus work... Go over their manuals and forums and see what they have there!!!

Posted: Sun Jun 04, 2006 5:17 am
by dragon2309
ok, thanks man, been a great help.... will get on to their site in a few moments, thanks
dragon
Posted: Sun Jun 04, 2006 7:06 am
by dragon2309
just to let you know, in case you were wodering or if anyone else is following the thread.... i had to change over menus, to the one mentioned in the link provided by "ok". the one i was using didnt support relative positioning on pages, chenged to the other one, what you have to o ewith this one is <SCRIPT> in the Main Menu, the on that is always visible, into the table cell, and then leave the javascript src links in the head as usual.... this makes it work fine
cheers for the gelpful relies "ok", dragon
