About a pop-up window with texts in it

In continue of this topic:

I got a table in the db with the following records: storyID and description
i want it to work so when some1 click on the “read” link it’ll open a window in the center of the page with texts in it.

So far i’ve started in this way:

Stories.ASP in the HEAD tag, function to hide the DIV and another function to get the selected story ID

<script type="text/javascript">
window.onload = function (hide) {
  document.getElementById('stories').style.visibility='hidden';
}
function morephotos (storyID) {
	var xmlHttp;
	var resp = 'CLOSE';
	try {
		xmlHttp = new XMLHttpRequest();
	}
	catch (e) {
		try {
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e) {
			try {
				xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e) {
				alert ('Your browser does not handle the photo selection process');
				return false;
			}
		}
	}
	xmlHttp.onreadystatechange = function() {
		if (xmlHttp.readyState == 4) {
			resp = xmlHttp.responseText;
			if (resp == 'ERROR') {
				alert ('There was a problem getting the photos.');
			} else {
				el = document.getElementById('photos');
				el..innerHTML = resp;
				el.style.visibility = 'visible';
		}
	}
	var photos = 'getstories.asp?storyID=' + storyID;

	xmlHttp.open ("GET",data,true);
	xmlHttp.send (null);
}
</script>

in the BODY tag

<div id="stories"></div>
...
<span onclick="morephotos('<%=table1(0,iCounter)%>')">Read</span>

what do i need to do next? what should the GetStories.asp contain…

thanks for the help

from

 
 
var photos = 'getstories.asp?storyID=' + storyID;
 

getstories.asp needs to contain the code to retrieve the data from the database for storyID and then return it to your ajax object.