Jump to content

Why wont return false disable enter?


unemployment

Recommended Posts

I am trying to disable the user from being able to go to a new line in my text area. Why doesn't return false work?

 

if (is_key(event, 13) && (with_field.value.length > 1)){					
var search_list_ele_array = new Array();
var search_list_ele_array = document.getElementById('with_auto').getElementsByTagName('li');

for (j=0; j<search_list_ele_array.length; j++) {

	if ((search_list_ele_array[j].className == 'user list_hover') || (search_list_ele_array[j].className == 'comp list_hover') || (search_list_ele_array[j].className == 'blog list_hover')){
		var link = search_list_ele_array[j].getElementsByTagName('a');
		user_add(link[0], search);
	}
}

return false;
}

Link to comment
https://forums.phpfreaks.com/topic/240521-why-wont-return-false-disable-enter/
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.