Utiliza el msscript control. Fácilmente puedes extenderla para incluir cualquier otra funcion de javascript que necesites.
*---------------------------------------------------------------- * Clase: UrlEncDec * Autor: Marco Plaza, 28/03/2012 * Eencapsula las siguientes funciones de javascript via MsScriptcontrol: * Escape/Unescape * EncodeUriComponent/DecodeUriComponent * EncodeUri/DecodeUri * * referencia de las funciones:http://msdn.microsoft.com/en-us/library/ht8a077w%28v=vs.94%29.aspx * * fácilmente extensible a otras funciones de javascript * *----------------------------------------------------------------- * uso: * o = create('urlEncDec') * ? o.decodeuri('http://msdn.microsoft.com/en-us/library/ht8a077w%28v=vs.94%29.aspx') * ? o.oResult * *------------------------------------------------------------------ ************************************* DEFINE CLASS URLENCDEC AS CUSTOM oJs = '' oResult='' *--------------------------- PROCEDURE INIT WITH THIS .oJs=CREATEOBJECT('MSScriptcontrol.scriptcontrol.1') .oResult=CREATEOBJECT('EMPTY') ADDPROPERTY(.oResult,'ResultadoJs') .oJs.LANGUAGE =[JavaScript] .oJs.ADDOBJECT('oResult',.oResult) ENDWITH ENDPROC *------------------------------------------ FUNCTION ESCAPE(lcCadena AS STRING ) AS STRING RETURN THIS.ejecutar('escape',lcCadena) ENDFUNC *------------------------------------------ FUNCTION encodeURI(lcCadena AS STRING ) AS STRING RETURN THIS.ejecutar('encodeURI',lcCadena) ENDFUNC *-------------------------------------------- FUNCTION decodeURIComponent(lcCadena AS STRING ) AS STRING RETURN THIS.ejecutar('decodeURIComponent',lcCadena) ENDFUNC *------------------------------------------ FUNCTION encodeURIComponent(lcCadena AS STRING ) AS STRING RETURN THIS.ejecutar('encodeURIComponent',lcCadena) ENDFUNC *------------------------------------------ FUNCTION unescape(lcCadena AS STRING ) AS STRING RETURN THIS.ejecutar('unescape',lcCadena) ENDFUNC *------------------------------------------ FUNCTION decodeURI(lcCadena AS STRING ) AS STRING RETURN THIS.ejecutar('decodeURI',lcCadena) ENDFUNC *------------------------------------------ FUNCTION ejecutar(lcComando,lcCadena AS STRING ) AS STRING THIS.oJs.ExecuteStatement( [oResult.ResultadoJs=]+lcComando+[(']+lcCadena+[')] ) RETURN THIS.oResult.resultadoJs ENDFUNC ENDDEFINE *---------------------------------Marco Plaza