I'm getting xmlHttp.readyState 1 when sending these parameters and it only happens when parameter 'text' is very big.

var url="replaceText4.jsp";
	url=url+"version="+version+"&work="+actualWork+"&secName="+secName+"&text="+text;


	xmlHttp.open("POST",url,true);
	xmlHttp.send(url);

Could you help me on this?

Recommended Answers

All 2 Replies

Isn't there a ? missing?

Anyway, is your text url encoded, or do you just send plain text, including spaces and special characters?

it's working like this now

var params = "versao="+version+"&obra="+obraActual+"&secName="+secName+"&texto="+texto;
xmlHttp.open("POST",url,true);

xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded;charset=UTF-8");
xmlHttp.setRequestHeader("Content-length", params.length);
xmlHttp.send(params);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.