473,837 Members | 1,532 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.XMLHT TP")}
catch(e){F=type of "XMLHttpRequest "!="undefined"? new
XMLHttpRequest( ):0}
}

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

F.onreadystatec hange=function( ){F.readyState= =4?eval(F.respo nseText):0}

F.setRequestHea der("Content-Type","applicat ion/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_populat e_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 1104

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

Similar topics

1
1446
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 using ASP.NET & VB.NET 2002 without requiring the .NET Framework to be installed on the client-side browser. I am writing a web-based system in ASP.NET & VB.NET 2002 that has to use a VB6 ActiveX control on the client-side to automate Microsoft...
22
5725
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 there is alot of data. In that case, the user will have to wait for the data to come back which may take a minute or so. I don't want the user to have to wait. Is it possible for javascript to periodically (while still receiving more data)...
3
1341
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 fine. But I'm getting the result as one string. I know the field names that are actually returned. Is there a way to return the value of each field instead of the whole string? Request.Form(fieldname) doesn't seem to work here.
5
2362
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 XMLHttpRequest continuously, however when setting the value using getElementById the value of the element is not being replaced, it is being appended each time. Here is my code, how can i modify the code to replace the contents of the element...
4
2066
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 assigned the action to each button on Page_Load event: Me.ibPayWM.Attributes.Add("onclick", "noPostBack('https://merchant.webmoney.ru/lmi/payment.asp');") Me.ibPayRx.Attributes.Add("onclick",
1
4517
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 using open(post,url) and doing send(xml document) what are the care abouts and how do I see this data at the server side? regards
0
1236
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 strPostData as string Dim strResponse as string
0
9843
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9682
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10881
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10575
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10628
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9406
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7004
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5850
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4043
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.