Send post to a different domain using JS
Posted
by
Lior
on Stack Overflow
See other posts from Stack Overflow
or by Lior
Published on 2011-02-26T21:16:41Z
Indexed on
2011/02/26
23:25 UTC
Read the original article
Hit count: 282
Hello,
I'd like a post request to be sent once a certain text input field is changed, using javascript.
So here is my current code:
<input name="message" onchange="$.ajax({type: \"POST\", url: \"http://example.com/example.php\", data: \"message=\" + document.getElementsByName(\"message\")[0].value});" />
Now, it's working on a regular connection, but it's not working on a secured connection (SSL). I mean, the page is secured, but the request is sent to a non secured page.
Is there a solution?
© Stack Overflow or respective owner