السلام عليكم ورحمة الله وبركاته
لدي استفسار بخصوص تغيير الصورة عند الضغط عليها 
أولاً لدي الدالتان :-
كود PHP:
<script type='text/javascript'>
function pop(){
window.open('<? print $option['site_url'].'/add-favorite-'.$GAMEID.'.html'; ?>','win','width=250 height=65');
document.img1.src='<? print $option['site_url']; ?>/style/images/nofavorite.gif';
document.img1.alt = 'Remove From Your Favorite Games';
document.href1.href='xxxx.html';
}
function popx(){
window.open('<? print $option['site_url'].'/remove-favorite-'.$GAMEID.'.html'; ?>','win','width=250 height=65');
document.img2.src='<? print $option['site_url']; ?>/style/images/nofavorite.gif';
document.img2.alt = 'Add to Your Favorite Games';
}
</script>
ولدي الصورتان :
كود PHP:
<!-- {if $fav == 0} -->
<a name="href1" href="javascript:pop();" onclick="document.this.url='xxx';" title="Add {$GAME.name} To Your Favorite Games" rel="nofollow">
<img src="{$option.site_url}/style/images/favorite.gif" alt="Add To Your Favorite Games" border="0" name="img1">
</a>
<!-- {else} -->
<a href="#" onclick="javascript:popx();document.img2.src='{$option.site_url}/style/images/favorite.gif';" title="Remove {$GAME.name} From Your Favorite" rel="nofollow">
<img src="{$option.site_url}/style/images/nofavorite.gif" alt="Remove From Your Favorite Games" border="0" name="img2"></a>
<!-- {/if} -->
طبعاً تلاحظون انها مع البي اتش بي ,,,
يعني في حالة وجود اللعبه في مفضلة العضو تظهر له الصورة الثانيه nofavorite.gif اما إذا كانت غير موجوده في مفضلته فتظهر الصوره favorite.gif وعند الضغط عليها نطبق الدالة الأولى , ويتم تغيير الصورة بنجاح و الوصف ايضاً ,
لكن المشكله ان الرابط لايتغير عند الضغط :eek3:
أي ان document.href1.href='xxxx.html'; غير صحيح !
وهذه هي المشكله بالتحديد , وشكراً.