kev wood Posted March 20, 2009 Share Posted March 20, 2009 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. Link to comment https://forums.phpfreaks.com/topic/150320-solved-swapping-the-title-image-on-button-press/ Share on other sites More sharing options...
kev wood Posted March 20, 2009 Author Share Posted March 20, 2009 spelling mistake Link to comment https://forums.phpfreaks.com/topic/150320-solved-swapping-the-title-image-on-button-press/#findComment-789438 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.