Jump to content

I get an error when validating on function"validar(e,obj)


breaststroke

Recommended Posts

hELLO!I have a script in some files of my website to limit the number of lines in a textarea input.This is the script:

script type="text/javascript">function validar(e,obj) {  tecla = (document.all) ? e.keyCode : e.which;  if (tecla != 13) return;  filas = obj.rows;  txt = obj.value.split('\n');  return (txt.length < 20);}</script>

It works fine, but when it comes to validate those pages I get an error.It says something like: "invalid element name.." referring to "<" sign.I don't know what I can do to not get that error, using the same function or another similar.I would appreciate any suggestion.Thank you very much in advance.Regards!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...