Jump to content

[SOLVED] swapping the title image on button press


kev wood

Recommended Posts

i am loading page content into a div tag using javascript and php but the title section of the site is not held in the div.  so this means that i am left with th esame title on each page.

 

i thought i would be able to a similar image swap with it as is done with a roll-over but this has not worked. 

 

here is the code i have so far

 

the functions in the head

		function loadContent(id) {
		$("#contentArea").load("rpc.php?o="+id+"");
	}

	function roll(img_name, img_src)
   		{
   			document[img_name].src = img_src;
   }
   function click(img_name, img_src)
   {
   		document[img_name].src = img_src;
   }

 

and the code on the button is

 

<a href="javascript:loadContent(1);" onmouseover="roll('about_but', 'buttons/about_but2.png')" onmouseout="roll('about_but', 'buttons/about_but.png')" onmousedown="click('title_img', 'assets/homeP_title.png')" onmouseup="click('title_img', 'assets/aboutP_title.png')"><img src="buttons/about_but.png" name="about_but" border="0" align="left"/></a>[code]

any help would be much appreciated. 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.