change hyperlink image on click

cristianods

New Member
Hi I'm trying to change the image of hyperlink on-click as follows. But the image of the select button is not changing to loading.gif. What am I doing wrong? I'm new to jquery. Thanks in anticipation\[code\] <HTML><HEAD> <SCRIPT type=text/javascript src="http://stackoverflow.com/questions/15885776/jquery.js"></SCRIPT> </HEAD> <BODY> <TABLE> <TBODY> <TR> <TD><A id=webservice_submit href="javascript:document.frm_correction.submit()" jQuery1365443220846="2"> <IMG onmouseover="MM_swapImage('Correction subj','','http://localhost:6868/corrmgr/img/select_up.gif',0)" onmouseout=MM_swapImgRestore() name="Correction Subj" alt="Correction Subj" src="http://localhost:6868/corrmgr/img/select.gif" oSrc="http://localhost:6868/corrmgr/img/select.gif"> </A></TD></TD></TR></TBODY></TABLE> <DIV style="DISPLAY: none" id=loading jQuery1365443220846="3"><IMG name="Please wait..." alt="Please wait while the request is being processed..." src="http://localhost:6868/corrmgr/img/bert2.gif"> </DIV> <SCRIPT language=javascript> var $loading = $('#loading'); $('#webservice_submit').click(function(){ $loading.toggle(); if( $loading.is(':visible') ){ alert("invoking web services"); $('#image img').attr('src', 'http://localhost:63531/corrmgr/img/loading.gif'); return ($(this).attr('disabled')) ? false : true; } }); $('#loading').hide(); </SCRIPT> </BODY></HTML>\[/code\]
 
Top