473,404 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

XMLHttpRequest not posting data to php

i have the following javascript code:

---------

try{F=new ActiveXObject("Msxml2.XMLHTTP")}
catch(e)
{
try{F=new ActiveXObject("Microsoft.XMLHTTP")}
catch(e){F=typeof "XMLHttpRequest"!="undefined"?new
XMLHttpRequest():0}
}

if(F)
{
F.open("POST","http://www.myurl.com/php_page")

F.onreadystatechange=function(){F.readyState==4?ev al(F.responseText):0}

F.setRequestHeader("Content-Type","application/x-www-form-urlencoded")
F.send("foo=bar&stuff=test")
}

--------

when i run this in firefox 1.5 the "post" fields are recognised by php,
however, when i use internet explorer 6.0 the "post" fields are not
recognised by php. i have checked the headers sent in IE and they
appear to be correct (eg, Content-Type =
application/x-www-form-urlencoded"...). as suggested in another post, i
have enabled the "always_populate_raw_post_data" directive in my
php.ini file, yet the "post" fields still don't exist.. also, when
running phpinfo() on the page that is being posted to,
$_SERVER["REQUEST_METHOD"] = "GET" - something is wrong here. is it
something to do with the the script above, the browser or the server?

thanks for any help,
adam.

Feb 11 '06 #1
0 1087

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Allan Cammish | last post by:
I have seen some examples of client-side code inside an ActiveX control posting data back to the server in ASP. I have tried the code and it works well. However, I need to see how this is done...
22
by: googlegroups | last post by:
I am playing with the XMLHTTPRequest method to perform client/server transactions. I have it set up right now so that when readyState is 4, it takes the XML and processes it. This works great until...
3
by: Peter Afonin | last post by:
Hello, I'm posting the data to another page and reading the results. I'm doing it approximately as described here: http://authors.aspalliance.com/stevesmith/articles/netscrape2.asp It works...
5
by: libsfan01 | last post by:
Hi all Im trying to write a script that pulls data from another page (which is getting data from a db). The contents displayed on the db handling page (display.php) gets transferred through...
4
by: Peter Afonin | last post by:
Hello, I have a form with several buttons, and I need to post this data to several different applications. In ASP.NET 1.1 it was quite easy - I just used HTML controls (text or hidden), then...
1
by: edai | last post by:
I am trying to find some sample code which uses the send() method of xmlhttprequest. most of the examples on the web use send(NULL) and encode the data in open(get,url?name=value) format. If i am...
0
by: kedarj7 | last post by:
Hi Can anybody help me in posting data through POST method to secure web site using Inet control in vb6. I have done following program (Inet1 is a control name) Dim strURL as string Dim...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.