WilliamGrant Posted December 23, 2011 Share Posted December 23, 2011 Hey Guys, I'm working on a website. It is running an ad when a download button is clicked and I can't get it to work so far. I'll try to explain the problem in a simple matter. There is a link that says "Download your file here" Since this file was first generated by the visitor and stored on the server, the link to the file looks like : <a href=download.php?f=".$loca."> But before the visitor has access to this file, the page should lock and show an ad as soon as they click "The Download your file" button.. This is the code to call the ad: onclick="startGateway('XXXXXXX');" This is the javascript for the ad: <script type="text/javascript" src="http://www.advertisersite.com/gwjs.php?pub=XXXXXX"></script><noscript> What I need is a script for the download button that will first call the ad and then call the url to the download : download.php?f=".$loca." So far I haven't been able to make this work but any help will be greatly appreciated. I hope my question is clear. If not, let me know Thanks a bunch! Quote Link to comment https://forums.phpfreaks.com/topic/253767-multiple-events-with-onclick/ Share on other sites More sharing options...
trq Posted December 23, 2011 Share Posted December 23, 2011 Where is the code you are having trouble with? Quote Link to comment https://forums.phpfreaks.com/topic/253767-multiple-events-with-onclick/#findComment-1300973 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.