PDA

View Full Version : change the content of 3 divs with out reloading the page



romeorodriguez
05-09-2011, 08:14 PM
Hello guys I am new to java and I am looking to create a page that without reloading would pull the data from from a file and at the same time pull two pics. for example if I have a list of names on the right and I click on one the div on the lest will change to give me the description of that name but at the same time the picture that is located at the top will also change.
Here is a link to a diagram to show you what I am talking about:

http://www.centerforcare.org/romes/images/SiteDesc.gif

Now this is what I am using now:

Java:
function search(field) {
document.getElementById('search-victoriasha').style.display = "none";
CSS:
#search-victoriasha {
display: block;
min-height: 240px;
width: 530px;
text-align: left;
float:left
}
HTML:
LINK I CLICK ON:
<a href="javascript:search('victoriasha');">Victoria</a>
HOW IT GETS THE DATA:
<div id="search-victoriasharp"><?php include 'variables/variables.php';echo $victoriasha;?></div>

This is only working for me to change the content of the div on the left but I need that I the same time it changes the picture on the top of the page with it.
Thank you in advance for your help