Jump to content

[SOLVED] Error Reasoning


adam84

Recommended Posts

I have a page where the user can fill out information and there are two textareas where the user can enter up to 1000 characters in each textarea. If i put in a message about 200 characters long for each, everything works good. But if i enter 1000 characters in each textarea, i keep getting the same javascript error: 'The system cannot locate the resource specifed'. Do anyone know whats up with that???

Link to comment
https://forums.phpfreaks.com/topic/65358-solved-error-reasoning/
Share on other sites

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'.

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.