PDA

View Full Version : Dreamweaver


indianleo
02-13-2007, 07:01 AM
Hello Friends

I had made an website in html in that I got 1 table with 3 rows first row there is menu, 2nd row body(content) and the 3rd row the privacy and other link

so suppose I want to change the menu I have to change in each and every file of website so I want the website in such a way that there should 1 menu file if I want to change something in menu so need of going and changing in each and every file

davidj
02-13-2007, 08:36 AM
paste the elements of your menu into a file and call it menu.htm

then in every page just add...


<!--#include FILE="menu.htm" -->

indianleo
02-13-2007, 12:51 PM
but how the code will know where to call this file suppose I want to call this file in certain cell of the row

and how to desig the menu page suppose the main page is in three rows can u please send me the example files please

davidj
02-13-2007, 03:10 PM
you add the include where you want this to display

you have to design your main page to accomodate the included menu

indianleo
02-14-2007, 07:26 AM
I am sorry I am not understandin it thats y I asked the example files

I had send you the file for your reference

davidj
02-14-2007, 07:36 AM
Listen!!!

why dont you take the information i have given you and experiment
you cant expect people to do this for you all the time.

you need to start learning on your own

indianleo
02-14-2007, 07:57 AM
I tried by myself I didnt get it thats y I asked u otherwise I wont like giving trouble to u for the example files

edbr
02-14-2007, 08:03 AM
show what code you used.

davidj
02-14-2007, 08:50 AM
my server does not support SSI

however it does support PHP

if you have a server that supports PHP then just use the following....


<?php include('page.php'); ?>

davidj
02-14-2007, 09:14 AM
here is an example but im using JS

create two pages. One called no1.htm and the other called no2.js

In no1.htm..

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script language="javascript" src="no2.js" type="text/javascript"></script>
</head>
<body onLoad="drawMenu()">
<table width="93%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td></td>
<td><div id="menu"></div></td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
</body>
</html>


In no2.js...

function drawMenu(){
table = '<table width="40%" border="0" cellspacing="0" cellpadding="0">';
table += '<tr>';
table += '<td>option1</td>';
table += '<td>option2</td>';
table += '<td>option3</td>';
table += '</tr>';
table += '</table>';
document.getElementById('menu').innerHTML = table;
}


now run no1.htm

now try to work this out and try to understand how i did it

domedia
02-14-2007, 07:50 PM
Just use dreamweaver templates