![]() |
trouble with addEventListener
I'm trying to gets this code to work so that when you click submit it will send whats in the textbox to the php script but its not sending the post request.
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
Try working with this:
Code:
<form action="" method="post" |
ok I got it to send the post request but the php script doesn't see the request. the dump from the $_POST is array(0) { }
here is the updated code Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
a few changes ....
(doesNot work with IE9 and below) Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">PHP Code:
|
I got it to work what one of the problems was that new FormData wasn't working so i use myFormData.append("message", message);
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
here is why it doesn't work for you
but it does for me <input type="text" id="mytextbox" /> should be <input type="text" name="mytextbox" /> |
| All times are GMT +1. The time now is 01:28 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.