ID:167384
![]() Mar 20 2006, 9:32 am
|
|
I am using a java script code that uses []'s and it is reading as a variable, any suggestions to help me stop this?
|
OneFishDown wrote:
Lifehunter wrote:
> html = "some_array\[5\] = 7;"
Correct way: html = "some_array\\[5\\] = 7;" DM will parse the escape, so in order to actually display an escape, you need to escape the escape. |
Lifehunter probably wants it to only show the [] and not the escape, he was having a problem with it trying to parse his HTML/javascript with embedded variables on a compiler-level, OFD's post was totally correct.
|
html = "some_array\[5\] = 7;"