HTML vairiables?

Ok, it’s got me stumped but I’m sure it can be done,

a bit of simple html

<body>
<p align="Center"><b>
ROGUES GALLERY
</b></p>
<table align="center" border="1" width ="100%" cellspacing="0" cellpadding="0">
<tr align="center" height="200">
	<td width="25%">
		<a href="gallery001.jpg"><img src="gallery001s.jpg"></img></a>
		</br>
		Dave 'I was just told to stand here'
	</td>
	<td width="25%">
		<a href="gallery002.jpg"><img src="gallery002s.jpg"></img></a>
		</br>
		Some text about the picture and who is in it
	</td>
	<td width="25%">
		<a href="gallery003.jpg"><img src="gallery003s.jpg"></img></a>
		</br>
		Team Photo
	</td>
	<td width="25%">
		<a href="gallery004.jpg"><img src="gallery004s.jpg"></img></a>
		</br>
		Some text about the picture and who is in it
	</td>
</tr>
</table>
</body>

What I want to do is have the text associated with each picture located at the top of the document so it’s all in one place to change. I’m going to be leaving this for other slightly less aware people to do (read stupid).

Please can someone tell me what I need to do

for html (client side) it would probably be easiest to use javascript variables, the much easier solution is server side it and use php (in my opinion) and it would probably be easier for someone else to pickup …

give me ten mins, on a call at the moment

//edit - not sure if this makes it easier or not !!


<!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 type="text/javascript" language="javascript1.2">

var txt1 = "some text one";
var txt2 = "some text two";

</script>
</head>

<body>
<p>Hello and welome,</p>
<p>text one<br /><script type="text/javascript" language="javascript1.2">document.write(txt1);</script></p>
<p>text two<br /><script type="text/javascript" language="javascript1.2">document.write(txt2);</script></p>
</body>
</html>

DT.

Ta DT, will have a play in the morning, the system we have to use is a buggers muddle so will have to fiddle.

Ta

Cheers DT worked a treat, now to get the service web monkeys to tell me how I’m wupposed to upload it all… bafoons

What did the final result look like? Couldn’t quite see what you wanted Damski (must be thick this morning!!)

/edit Forget it. Thicky got it in the end.


<!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 type="text/javascript" language="javascript1.2">

var txt1 = "Picture of the road outside";
var txt2 = "The Road at Night";
var txt3 = "Speedo at 100K";
var txt4 = "Linux at Asda";

</script>
</head>

<body>
<CENTER><p><STRONG>ROGUES GALLERY</STRONG></p></CENTER>

<table align="center" border="1" width ="100%" cellspacing="0" cellpadding="0">
<tr align="center" height="200">

	<td width="25%">
	<a href="gallery001.jpg"><img src="gallery001s.jpg"></img></a>
	</br>
	<p>ONE<br /><script type="text/javascript" 		

language="javascript1.2">document.write(txt1);</script></p></td>

	<td width="25%">
	<a href="gallery002.jpg"><img src="gallery002s.jpg"></img></a>
	</br>
	<p>TWO<br /><script type="text/javascript" 	

language="javascript1.2">document.write(txt2);</script></p></td></tr>

<tr align="center" height="200">
	<td width="25%">
	<a href="gallery003.jpg"><img src="gallery003s.jpg"></img></a>
	</br><p>THREE<br /><script type="text/javascript" 	

language="javascript1.2">document.write(txt3);</script></p></td>

	<td width="25%">
	<a href="gallery004.jpg"><img src="gallery004s.jpg"></img></a>
	</br><p>FOUR<br /><script type="text/javascript" 	

language="javascript1.2">document.write(txt4);</script></p></td></tr>
</table>
</body>
</html>

The next thing I would put in is a way that when you click on the pic to see the bigger pic you have a means of clicking on the new big pic to return to the original page.

Simple in the end

<html>
<head>
</head>

<body>
<script type="text/javascript" language="javascript1.2">

var Image01 = "Cawthorn tries to come to tearms with a fishbone";
var Image02 = "Fowler and Selbie have a chin rubbing contest";
var Image03 = "Smile for the camera team";
var Image04 = "Branton gets confused";
var Image05 = "Mad you said what to whom?";
var Image06 = "BSW, get that bitch out of here!";
var Image07 = "And they come togeather like this";
var Image08 = "Giant PostIts";
var Image09 = "The Police's latest wanted photo";
var Image10 = " ";
var Image11 = "Jones ' I don't want to be here!'";
var Image12 = "Tables are not chairs";
var Image13 = "Smiling is not allowed!";
var Image14 = "We'll get them here, here and here";
var Image15 = " ";
var Image16 = " ";

</script>
<p align="Center"><b>
ROGUES GALLERY
</b></p>

<table align="center" border="1" width ="100%" cellspacing="0" cellpadding="0">

<tr align="center" height="200">
	<td width="25%">
		<a href="gallery/gallery01.jpg"><img src="gallery/gallery01s.jpg"></img></a>
		</br>
		<script type="text/javascript" language="javascript1.2">document.write(Image01);</script>
	</td>
	<td width="25%">
		<a href="gallery/gallery02.jpg"><img src="gallery/gallery02s.jpg"></img></a>
		</br>
		<script type="text/javascript" language="javascript1.2">document.write(Image02);</script>
	</td>
	<td width="25%">
		<a href="gallery/gallery03.jpg"><img src="gallery/gallery03s.jpg"></img></a>
		</br>
		<script type="text/javascript" language="javascript1.2">document.write(Image03);</script>
	</td>
	<td width="25%">
		<a href="gallery/gallery04.jpg"><img src="gallery/gallery04s.jpg"></img></a>
		</br>
		<script type="text/javascript" language="javascript1.2">document.write(Image04);</script>
	</td>
</tr>

<tr align="center" height="200">
	<td width="25%">
		<a href="gallery/gallery05.jpg"><img src="gallery/gallery05s.jpg"></img></a>
		</br>
		<script type="text/javascript" language="javascript1.2">document.write(Image05);</script>
	</td>
	<td width="25%">
		<a href="gallery/gallery06.jpg"><img src="gallery/gallery06s.jpg"></img></a>
		</br>
		<script type="text/javascript" language="javascript1.2">document.write(Image06);</script>
	</td>
	<td width="25%">
		<a href="gallery/gallery07.jpg"><img src="gallery/gallery07s.jpg"></img></a>
		</br>
		<script type="text/javascript" language="javascript1.2">document.write(Image07);</script>
	</td>
	<td width="25%">
		<a href="gallery/gallery08.jpg"><img src="gallery/gallery08s.jpg"></img></a>
		</br>
		<script type="text/javascript" language="javascript1.2">document.write(Image08);</script>
	</td>
</tr>

<tr align="center" height="200">
	<td width="25%">
		<a href="gallery/gallery09.jpg"><img src="gallery/gallery09s.jpg"></img></a>
		</br>
		<script type="text/javascript" language="javascript1.2">document.write(Image09);</script>
	</td>
	<td width="25%">
		<a href="gallery/gallery10.jpg"><img src="gallery/gallery10s.jpg"></img></a>
		</br>
		<script type="text/javascript" language="javascript1.2">document.write(Image10);</script>
	</td>
	<td width="25%">
		<a href="gallery/gallery11.jpg"><img src="gallery/gallery11s.jpg"></img></a>
		</br>
		<script type="text/javascript" language="javascript1.2">document.write(Image11);</script>
	</td>
	<td width="25%">
		<a href="gallery/gallery12.jpg"><img src="gallery/gallery12s.jpg"></img></a>
		</br>
		<script type="text/javascript" language="javascript1.2">document.write(Image12);</script>
	</td>
</tr>

<tr align="center" height="200">
	<td width="25%">
		<a href="gallery/gallery13.jpg"><img src="gallery/gallery13s.jpg"></img></a>
		</br>
		<script type="text/javascript" language="javascript1.2">document.write(Image13);</script>
	</td>
	<td width="25%">
		<a href="gallery/gallery14.jpg"><img src="gallery/gallery14s.jpg"></img></a>
		</br>
		<script type="text/javascript" language="javascript1.2">document.write(Image14);</script>
	</td>
	<td width="25%">
		<a href="gallery/gallery15.jpg"><img src="gallery/gallery15s.jpg"></img></a>
		</br>
		<script type="text/javascript" language="javascript1.2">document.write(Image15);</script>
	</td>
	<td width="25%">
		<a href="gallery/gallery16.jpg"><img src="gallery/gallery16s.jpg"></img></a>
		</br>
		<script type="text/javascript" language="javascript1.2">document.write(Image16);</script>
	</td>
</tr>
</table>


</body>

</html>

pedant html standards mode enabled :wink:

missing alt tags :moon:

DT.

It’s for an internal Intranet, all the same machines all the same browsers, will never get looked at by anyone with even an ounce of programing nonce…