I have a PHP script that posts a table with submitted info onto page. The problem is that the table widths change depending on how much content the user inputs. I counted the width and figures that by inserting a "\n" every 65 characters would make all tables even. The code I wrote has one error (IE).
::Cannot assign to a function result
::Line 29
The function is called in the onblur event in a textarea input
The form is named bleh and the textarea is post.
In looked at the string.replace() function but that replaces any string in the arguments. I want to INSERT a \n or carriage return every 65 characters.
::Cannot assign to a function result
::Line 29
The function is called in the onblur event in a textarea input
Code:
var b; var c; function fix() { var a = bleh.post.value; for(b = 0; b <= a.length; b++) { if(c = 65) { a.charAt(b) = "\n"; c = 0; } c++; } bleh.post.value = a; }
In looked at the string.replace() function but that replaces any string in the arguments. I want to INSERT a \n or carriage return every 65 characters.
Comment