Replacing \x and \u to x and u.


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Replacing \x and \u to x and u.

Hybrid View

  1. #1
    Jose Rodz Guest

    Replacing \x and \u to x and u.


    I have a javascript that captures the REMOTE_USER and store it in a variable.
    The variable stores the user and the host name. For example... WEBSERVER\user.

    But the backslash causes that whenever I access that variable, it replacing
    it with the corresponding escape character. (e.g. backspace for \b, new line
    for \n, etc..)

    I fix this problem by search and replace the escape character with the correct
    character, except for the \x and \u escape character. With these two it displays
    a runtime error ("Expecting a Hexadecimal number."). I cannot replace these
    characters because the runtime error stop the script before the search and
    replace function.

    I also tried to trap the error with the window.onerror function.

    Do anyone knows who to replace these two characters? Thanks in advance.

  2. #2
    MarkN Guest

    Re: Replacing \x and \u to x and u.


    Jose,
    This looks to be a Javascript question. Check out the Javascript newsgroups.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center