Jump to content

[SOLVED] Submit a form using a table cell?


Maniacility

Recommended Posts

Hey, i'm integrating paypal into my website.

 

To buy something there is a "Buy Now" button which you click then a form submits.

 

I want to remove this button and just have an onClick on the table cell that submits instead.

E.g. <td onClick="submit_paypal_form">paypal form here</td>

 

i've tried several ways all that didn't work so now i'm hoping someone else can help me. :)

 

i'm not fussed where it goes or how it functions, just want it to submit using the table cell if it's possible, thanks! :D

Link to comment
https://forums.phpfreaks.com/topic/169033-solved-submit-a-form-using-a-table-cell/
Share on other sites

Why do you want to do this? There are a whole lot of reasons you shouldn't do this, which is why I ask.

 

well, the way my site is layed out is usually without buttons if possible, its easier and better looking (in my opinion) to have table cells that onhover change color, then they just click, then an "are you sure" prompt will appear to confirm then it will submit, but i've used $_GET for all my other submits as the end source is on my own site, however this isn't possible because i need to submit the details of this form and then go to paypal (if that makes sense).

 

hense why I need it to submit the form using an onclick. :)

unless theres another alternative that use table cells that can submit it. :D

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.