Hi,
I have a pretty wierd situation. I have a javascript function that
runs when I submit a page. The onsubmit code does quite a bit - it
goes through a big textarea and replaces tabs with spaces,
inserts/removes line breaks...it uses regular expressions to convert
textarea content into somethign that can be sent to a mainframe
application.
Here's the problem: Sometimes special characters are pasted into the
text area from Word. Then, the submit code seems to go wrong - it
jumbles the content and some of the data is lost. I started adding
alerts in various places in the code to try and see where it was going
wrong. But it seems that by placing the alerts in the function, it
slows it down... and the error goes away!
It seems as though the code is going too fast and getting confused.
....but that doesn't really make sense to me. Has anyone ever
experienced illogical breaks like this? Any suggestions?
Thanks in advance!
I have a pretty wierd situation. I have a javascript function that
runs when I submit a page. The onsubmit code does quite a bit - it
goes through a big textarea and replaces tabs with spaces,
inserts/removes line breaks...it uses regular expressions to convert
textarea content into somethign that can be sent to a mainframe
application.
Here's the problem: Sometimes special characters are pasted into the
text area from Word. Then, the submit code seems to go wrong - it
jumbles the content and some of the data is lost. I started adding
alerts in various places in the code to try and see where it was going
wrong. But it seems that by placing the alerts in the function, it
slows it down... and the error goes away!
It seems as though the code is going too fast and getting confused.
....but that doesn't really make sense to me. Has anyone ever
experienced illogical breaks like this? Any suggestions?
Thanks in advance!
Comment