Jump to content

[SOLVED] JS error


adam84

Recommended Posts

Straight forward Ajax

- every other ajax call works fine

function sendRequest(act,divtag) {
http.open('get', act); 
http.onreadystatechange = openRequest; 
divhandler.divtag = divtag; 
http.send(null); 
} 
function sendLog(act,divtag) { 
http.open('get', act); 
http.onreadystatechange = openLog; 
divhandler.divtag = divtag; 
http.send(null); 
} 

 

Function where the error occurs in

function submitReview( pID, back, fromGoto ){
var errors = ''; var concat = '';

// I deleted the data validation checks

if( errors != '' )
	document.getElementById('reviewErrorID').innerHTML = '<FONT COLOR=red>' +  errors + '</FONT>';
else{
	document.getElementById('reviewErrorID').innerHTML = '';

	var div = 'searchDIV';
	if(fromGoto>0)
		div = 'contentDIV';

	var str  = 'insertReview.php?';
	    str += 'pID='+pID;
	    str += '&title='+encodeURIComponent(title);
	    str += '&gender='+gender;
	    str += '&weight='+weight;
	    str += '&height='+height;
	    str += '&bf='+bf;
	    str += '&pros='+encodeURIComponent(pros);
	    str += '&cons='+encodeURIComponent(cons);
	    str += '&supps='+supps;
	    str += '&back='+back;
	    str += '&fromGoto='+fromGoto;

	sendRequest(str,div);
}
}

 

The pros/cons variables can hold upto 1000 characters.

 

This function works fine if:

- I comment out the sendRequest(str,div); line

- both pros/cons have under 400 characters

 

This function gets an error if:

- both pros/cons have over 400 characters

 

The error I get when I submit the page is 'The system cannot locate the resource specifed'.

Link to comment
https://forums.phpfreaks.com/topic/65359-solved-js-error/#findComment-328953
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.