| | |
changing image on page when button is pressed
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
i have built a page which loads content into a div tag from a php page using javascript.
the problem i am having is that the title for eachg page is not inside the div so i keep being left with the same title on each page.
i have tried to change the image using the onmouseup/down functions but this has not worked.
here is the code for the functions
here is the code for the button
the problem i am having is that the title for eachg page is not inside the div so i keep being left with the same title on each page.
i have tried to change the image using the onmouseup/down functions but this has not worked.
here is the code for the functions
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
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; }
here is the code for the button
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<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>
![]() |
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Slideshow Issue - uses JavaScript
- Next Thread: Trying to figure out how to load/reload div?
| Thread Tools | Search this Thread |
Tag cloud for JavaScript / DHTML / AJAX
acid2 ajax ajaxexample ajaxjspservlets array blackjack browser captcha captchaformproblem cart child close codes css date debugger decimal dependent design developer disablefirebug dom element embed engine enter error events ext file firefox flash focus form forms frameworks game getselection google gxt hiddenvalue highlightedword hint html ie7 ie8 iframe index java javascript javascripthelp2020 javascripts jquery jsp jump libcurl listbox maps marquee masterpage math media menu mp4 onerror onmouseoutdivproblem onmouseover onreadystatechange parameters paypal pdf php position post problem programming prototype rated redirect safari scale scriptlets scroll search security size software sources star starrating stretch synchronous toggle tweet unicode variables web webservice window \n





