Opening affiliate banners in a new window

Avatar

Avatar
Validate 1
Level 1
nishil_karia
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
nishil_karia
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
nishil_karia
Level 1

03-10-2016

Hi All,

On my website i feature affiliate banners, when I click these banners it does not open a new window (i.e. it takes the user away from the page that they are on).

How can I make sure that when a user clicks on a banner on my website, it opens a new window?

Thanks guys. 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 10
Level 10
ParitMittal
Level 10

Likes

93 likes

Total Posts

817 posts

Correct reply

349 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile

Avatar
Validate 10
Level 10
ParitMittal
Level 10

Likes

93 likes

Total Posts

817 posts

Correct reply

349 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile
ParitMittal
Level 10

04-10-2016

Hi , 

Please make sure that you use "window.open()" function of javascript on click of the banner. Here is the sample code for the same. 

<!DOCTYPE html> <html> <body> <p>Click the button to open a new browser window.</p> <button onclick="myFunction()">Try it</button> <script> function myFunction() { window.open("http://www.w3schools.com"); } </script> </body> </html>

Thanks & Regards

Parit Mittal

Answers (0)