Pls. help me? i need some suggestion to solve my problem on runtime error of jawascript ' e.g. Invalid Character' i am unable to sort out and fix it.
http://oraiko-demo.com/ES/index.php?osCsid=b94c8de7c7654125f5c807906b39fc0a ,, after login problem being started pls help me for fix it.

Thanks
Tom Desuza
<EMAIL SNIPPED>

Recommended Answers

Please provide some code or login details, I dont want to register just to see your error.

Jump to Post

Sorry, I am not going to register on the site... But one suggestion that you may need to look for is to escape string before you pass into any function. Normally, the string contains special characters, especially single or double quote, that JavaScript may not end correctly.

To me …

Jump to Post

All 5 Replies

Please provide some code or login details, I dont want to register just to see your error.

Sorry, I am not going to register on the site... But one suggestion that you may need to look for is to escape string before you pass into any function. Normally, the string contains special characters, especially single or double quote, that JavaScript may not end correctly.

To me more clear, I will give you an example. A function readStuff(str) takes 'str' as argument. When you call it, you would simply call and pass a string in. If the string contain special character, JavaScript will break.

Example:
<html>
 <head>
 <script type="text/javascript">
 function breakMe(str) {
  alert(str)
 }
 </script>
 </head>

 <body>
 <script type="text/javascript">
 var someString = "I want to \"BREAK\" the function"
 breakMe(someString)
 </script>
 </body>
</html>

JavaScript will stop working in this case even though you have escape the word BREAK in your string variable. You just need to be more careful when work with string. There are various ways to fix this...

There are various ways to fix this...

...all of which no doubt come too late for the OP.

The problem was raised nine months ago.

JavaScript will stop working in this case

In which case? Exactly what is your code snippet supposed to do? Or not do?

Oh bah, didn't look at the date. >_<

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.