Open Paypal link in New Window / What is pixel.gif?

NathanSF
Contributor
Contributor
I'm wondering how I can change the code to open this link in a new window, so it doesn't direct the user away from the site. 


<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="4444444">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif" border="0" name="submit" alt="Click here to donate to blahblahblah">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>

Also, anyone know what pixel.gif does? 

Thanks.
Nathan


Login to Me Too
1 REPLY 1

skier
Advisor
Advisor

Problem - You want a New Window to open when using shopppig cart.

Change target = "paypal" to target = "_blank". This will open a new browser window or tab for the shopping cart page.

<form target="_blank" action="https://www.paypal.com/cgi-bin/webscr method="post">

 

 

The HTML command target="_blank"  causes the link to open in a totally new browser window, leaving the page with the refering link still open behind it. Unlike Javascript pop ups, however, the developer has no control over the size of the resulting window - it just depends what the browser happened to do the last time they shut their browser down.

 

 

As for your other question:

 

What is the purpose of this line?

 

<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">

 

PayPal uses this line of code for internal use only to monitor traffic.   Use of this code is optional.   You can learn more by Googling "tracking pixel".

 

Regards,

 

skier

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.