function error(object not supporting)

Results 1 to 2 of 2

Thread: function error(object not supporting)

  1. #1
    Join Date
    Dec 1969

    Default function error(object not supporting)

    Hi<BR>I am getting error using this function ti replace souble qoute and single qoute I convert the vb script to jscript this is my code Is any one help me <BR>//Replace double quotes in an input string to two double quotes<BR>function FixDBLQuotes( InputString ){<BR> var StartPos = 1;<BR> var CharacterPosition = 0;<BR>if (InStr(InputString, CStr(Chr(34))) &#062; 0) {<BR> InputString = Replace(InputString,&#039;""""&#039;,&#039;""""""& #039;);<BR>}<BR> <BR> return InputString;<BR>}<BR><BR>//Replace single quotes in an input string to two single quotes<BR>function FixQuotes(InputString){<BR> var StartPos = 1;<BR> var CharacterPosition = 0;<BR><BR> CharacterPosition = InStr(StartPos,InputString,Chr(39));<BR> while (CharacterPosition &#062; "0"){<BR> InputString = Left(InputString, CharacterPosition) + CHR(39) + Mid(InputString, CharacterPosition+1);<BR><BR> // Start the search for more single quotes after the quote the function just added<BR> StartPos = CharacterPosition + 2;<BR> CharacterPosition = InStr(StartPos,InputString,Chr(39));<BR> }<BR><BR> // Return the processed string to call<BR> return InputString;<BR>}

  2. #2
    Join Date
    Dec 1969

    Default Don't crosspost -- answered in Q&A


Posting Permissions

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