Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > ajax problem..please help

ajax problem..please help
Thread Tools
Fresh-Faced Recruit
Join Date: May 2005
Status: Offline
Reply With Quote
Feb 28, 2006, 08:27 AM
 
I'm trying to use javascript to perform a simple POST operation. In fact, I don't even need to get the response. I only need to do the post so that the other page can save the info to a database.

This code works initially, but then the post stops occurring. As a user, I can click it over and over and over again. On the technical side, the POSTs occur for the first few clicks, but then the post stops occurring.

Why would it stop posting the information? Am I missing a line of code?

Here is my javascript code for IE:

xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
if (xmlhttp) {
var paramStr = "";
paramStr += "strTitle=HelloWorld";
paramStr += "&strEmail=me@somewhere.com";
xmlhttp.setRequestHeader("Content-Type","text/html; charset=iso-8859-1");
xmlhttp.open("POST","http://www.mysite.com/something.php",true);
xmlhttp.send(paramStr);
} // end if
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:31 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2