Jump to content

Multiple Events with OnClick?


WilliamGrant

Recommended Posts

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!

 

 

 

 

 

 

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/253767-multiple-events-with-onclick/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.