View Single Post
Old 07-24-2008, 03:55 AM   #1 (permalink)
Orc
The Prestige
 
Orc's Avatar
 
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
Orc is on a distinguished road
Default Functions dont work from included files.

I am using prototype, and I made a function that returns if an input is valid. Well firebug, said the response headers were fine.

But in my html/php file, it acts like the function doesn't exists

Code:
function ValidateInput( elem, a, m,  input_var, input )
{

		
		new Ajax.Request("../../ajax?a="+a+"&"+input_var+"="+input, 
		
		method: m,
		
		onSuccess:function(transport)
		{
			
			$(elem).innerHTML = transport.responseText;
			
			return;
			
		},
		
		onFailure: function(transport) {
			
			$(elem).innerHTML = "doesn't work";
			
			return;
		}
		
		);
		
	
	
}
my function, this doesnt work, yes the ajax.php exists, and yes I checked if ajax.php works.
__________________
VillageIdiot can have my babbies ;d
Orc is offline  
Reply With Quote