Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript_howto thread: Change Images during OnClick in JavaScripts, PLEASE


Message #1 by "Tay, Ben" <btay@w...> on Wed, 3 Apr 2002 08:21:45 -0600
> Hi, There,
> 
> I understand this is not a JavaScripts group, but I have posted it and no
> one respond yet.  So that's why I post this message and am seeking for a
> JavaScripts expert to help with the following::::
> 
> Is  there a way to implement a script with that says if the use goes from
> page to page with a specific image.  If not use the defualt image.
> 
> I would like to do it in OnClick event with my exisitng function called
> setTargetPage....I have added a brief description for what I intended to
> do.
> 
> How do I do that?  Is this making sense?  
> 
> I am a novice in JAVAScripts, your help is grealy appreciated.
> 
> Please see the following codes:
> 
> 
> JAVA Scripts
> =========
> 	<script language="JavaScript">
> 	<!--
> 		function setTargetPage( strURL ) {
> 		top.frames["leftframe"].curRightURL = strURL;
> 		top.frames["rightframe"].location.href = strURL +
> "?entity_id=" + top.frames["leftframe"].curEntityID;		
> 		}
> 	
> 		
> 	//-->
> 	</script>
> 
ASP  Codes
> ========
> 
>         	 <td class="tabMenu" background="images/menu.off.bg.gif">
> --->  [Needs to convert the image to "menu.on.bg.gif" immediately once
> clicked]
>             	<a href="#" onClick="setTargetPage('Sales.asp')">Sales
> Analysis 
>              </td>
>               
>              <td><img height="36" src="images/menu.off.off.separator.gif"
> width="28">  ---> [Needs to convert the image to
> "menu.on.off.separator.gif" immediately once clicked]
> 	</td>
>               
> 
> 	  <td class="tabMenu" background="images/menu.off.bg.gif">  --->
> [Needs to convert the image to "menu.on.bg.gif" immediately once clicked]
>                	<a href="#"
> onClick="setTargetPage('Financial.asp')">Financial&nbsp;Analysis</a>
>               </td>
>               
>               <td><img height="36" src="images/menu.off.off.separator.gif"
> width="28">  ---> [Needs to convert the image to
> "menu.on.off.separator.gif" immediately once clicked]
> 	 </td>

  Return to Index