Ok let me explain what I want to do first, I have a "Download HQ" link which is something like this: As you can see I have managed to add the CPA Lead gateway code into the link such that when someone clicks on download it'll pop-up the gateway. Now the problem is that when someone clicks on it the gateway opens, but the download dialog box[Open, Save as etc.] opens up above the gateway therefore making the gateway useless. I want to know if there is anyway I can make the download dialog box open only if the user completes the survey, and if he doesnt the box should not open. Check the second site in my signature for the working link. Any help is appreciated.
<SCRIPT language="JavaScript1.2"> var clicks = 0; function downclick(uriloc) { if (clicks == 0){ startGateway('YOUR_GATEWAY'); clicks = clicks + 1; } else { testwindow= window.open(uriloc, "mywindow1","location=1,status=1,scrollbars=1,width=100,height=100"); testwindow.moveTo(0,0); return false; } } </SCRIPT> <a href="#" onclick="javascript:downclick('URL_TO_FILE')">Download HQ</a> First Click opens CPALEAD gateway, second click opens file download. Second click can be maded after survey was completed.
Thats a great idea man! Thanks! +Rep added! I don't want to sound like an ass but can anyone test if the download box comes up after finishing the survey? I can't check because there are no surveys available for my country..anyone? Thanks