Syntax Conversion

Results 1 to 3 of 3

Thread: Syntax Conversion

  1. #1
    Join Date
    Dec 1969

    Default Syntax Conversion

    How do I convert the apostrophe to %27 and then back again in a simplistic manner so that it does not create chaos with the ASP syntax indentifying it as part of the syntax witht the code

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default What are you trying to do

    R&D the replace function<BR><BR>there may be a simpler way if you could elabborate what you are planning on doing with the &#039. <BR><BR>But the replace function will do what you are asking for

  3. #3
    Join Date
    Dec 1969

    Default Not syntax, at all. Just encoding....

    Use the escape and unescape functions that are built into JavaScript. <BR><BR>Yes, you can call JS code from VBS:<BR><BR>&#060;SCRIPT Language=JavaScript RunAt=Server&#062;<BR>function encode( msg )<BR>{<BR>&nbsp; &nbsp; return escape( msg );<BR>}<BR>function decode( msg )<BR>&nbsp; &nbsp; return unescape( msg );<BR>}<BR>&#060;/SCRIPT&#062;<BR>...<BR>&#060;%<BR>txt = encode("An &#039example&#039!?")<BR>Response.Write "encoded form is " & txt & "&#060;P&#062;"<BR>plain = unencode( txt )<BR>Response.Write "back to plain form is " & plain & "&#060;P&#062;"<BR>%&#062;<BR><BR>HOWEVER...<BR><B R>If you are trying to do this, chances are pretty good you are doing something the hard way, hence Akhilesh&#039s question.<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts