How to send a POST request with a button?

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered

I have a url in the form:

https://usr:pw@somedomail.com/run


I need to send a post request to that URL when a button is clicked.

Photo of elza

elza

  • 0 Points

Posted 3 years ago

  • 0
  • 1
Photo of David Maskasky

David Maskasky

  • 100 Points 100 badge 2x thumb
Hi Elza,



Here try putting this in a formula - text field and turn 'allow html' on.



"<a class='linkButton' href=\"Javascript: $.post('https://usr:pw@somedomail.com/run', data={'mykey':'myvalue'});\">Button Text</a>"

Hope this helps!Sincerely,David Maskasky
Photo of elza

elza

  • 0 Points
When using this method, the consule outputs  "Reference error: $ is not defined". the post method does not get executed. Is there any way to fix it?
Photo of David Maskasky

David Maskasky

  • 100 Points 100 badge 2x thumb
That is very strange.  It means that it is not finding jQuery on your page.  Can we get on a webex call to resolve this?  I would need to see in person better understand.