View Single Post
Old 12-05-2008, 09:27 AM   #10 (permalink)
sketchMedia
The Prestige
Advanced Programmer Top Contributor Good Samaritan 
 
sketchMedia's Avatar
 
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
sketchMedia is on a distinguished road
Default

After looking over your code, i noticed that 'gid' returns a ref to and element via getElementById(), as a result you will need to re write this:
javascript Code:
function openAds(){
    if(Urlproduct == ""){
        gid("linkAdsProd"+adsClicked).click();
    }else{
        gid("linkAds"+adsClicked).click();
    }
}
As the 'elementRef.click()' method doesn't work in FF.

Your old code should be fine.

EDIT:
Im assuming that the element returned by gid in this case is a link of some sort? if so you could do something like this
javascript Code:
function openAds(){
    if(Urlproduct == ""){
        window.location = gid("linkAdsProd"+adsClicked).href;
    }else{
        window.location = gid("linkAds"+adsClicked).href;
    }   
}
I havent tested, i just thought it up now.
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
sketchMedia is offline  
Reply With Quote