Page 1 of 1

How to place hidden button on top of paypal button image?

Posted: Fri Nov 04, 2011 9:14 am
by premecorp
Hello friend,

I have a scenario where we have a html form with paypal button, when i click this button i need three different things like...
1. it will check the client side validation with javascript.
2. whatever I will fill in the form all data we should get through emails.
3. if all the the input values are valid then it open paypal page.

All that things are not working with default paypal button so thought i place a hidden button on top of paypal button and do all the things, but my problem is how to place html hidden button on top of paypal button. I any one have any idea regarding this please help me......

Re: How to place hidden button on top of paypal button image

Posted: Fri Nov 04, 2011 10:21 am
by Richardw
This shouldn't be in PHP code as it's to do with HTML/CSS, but anyway...

Actually I was going to suggest using opacity:0 and absolute positioning to place a button over the image, but what you should be doing is using javascript (personal preference jQuery). You need to attach onclick events to the PayPal image. If the correct conditions are met/emails sent (with ajax), then you can submit the form using jQuery too.

Re: How to place hidden button on top of paypal button image

Posted: Sat Nov 05, 2011 3:41 am
by premecorp
Thanks for responding, but could you explain how to place html button in exact location on top of paypal button...

Re: How to place hidden button on top of paypal button image

Posted: Mon Nov 14, 2011 3:33 pm
by tech0925
If you want to place a button on top of each other than you can simply use the absolute rule. :)

http://www.w3schools.com/cssref/pr_class_position.asp