WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 JS Problem - code breaks if run too fast?, Michael B., August 2, 2004
     Re:JS Problem - code breaks if run too fast?, Brian R. James, August 3, 2004
         Re:JS Problem - code breaks if run too fast?, Michael, August 3, 2004
             Re:JS Problem - code breaks if run too fast?, Brian R. James, August 4, 2004

Subject: JS Problem - code breaks if run too fast? From: Michael B. Date: August 2, 2004

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!




Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX