Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.