changing the code in div tags using javascript

Hi guys,

I was hoping somone may know the answer to my problem.

I have 4 divs dividing up my site and inside, lets just call it div2 I have an imagemap. I am  looking for  some type of onclick javascript function which will replace the code of another div.... lets say div3, with a php include statement when the imagemap is clicked.

I hope somone has a working problem.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

the code below should include the output of yourFile.php INTO div id="c" whenever you click on div id="b"
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

<html xmlns="">
		<script type="text/javascript" src=""></script>
		<script language="JavaScript" type="text/javascript">
			$('#b').bind('click',function(){ $('#c').load('yourFile.php'); });

		<div id="a"></div>	
		<div id="b"></div>	
		<div id="c"></div>	
		<div id="d"></div>	

Open in new window

jeavonatorAuthor Commented:
Thanks hielo
i actually have about 16 php includes i want to put into the changing div.

Will this code help with this?
>>i actually have about 16 php includes
Well, you just have to think outside the box. Intead of doing 16 calls, make ONE call to say "includer.php".

Then in includer.php you do your 16 includes at once:

But to answer your question, you can include however many files you want into however many divs you want. It is not limited to a single inclusion.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.