Web Analytics Made Easy -
StatCounter help modifying this code - CodingForum

Announcement

Collapse
No announcement yet.

help modifying this code

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • help modifying this code

    Im trying to figure out how to get text to work with this.

    When they click this link, the star changes on the fly. But I cant get it work with the text. Any help would be great.

    Code:
    <a href="{$this->ipsclass->base_url}autocom=arcade&amp;code=updatefav&amp;g={$g['gid']}" target="hiddenframe"><img src="./arcade/images/{$g['fav_image']}.gif" alt="" id="fimg1_{$g['gid']}"/></a>
    Code:
    			<html>
    			<head>
    			<script type="text/javascript">
    				img1 = parent.document.getElementById( "fimg1_'.$gameid.'" );
    				img2 = parent.document.getElementById( "fimg2_'.$gameid.'" );
    
    				if( (img1.src.indexOf("addfav") != -1) )
    				{
    					img1.src = "./arcade/images/rmfav.gif"; //In Favs
    					img2.src = "./arcade/images/rmfav.gif";	
    				}
    				else
    				{
    					img1.src = "./arcade/images/addfav.gif"; // Not in Favs
    					img2.src = "./arcade/images/addfav.gif";	
    				}
    			</script>
    			</head>
    			<body>
    			</body>
    			</html>';
Working...
X