Sybernet / Supplied Procedures Reference
Release 3.00
Oct 14, 2002
backwards forwards

HTTP.SP_HTML_JSQUOTE

This procedure creates a string that is suitable for using in a JavaScript assignment statement. This procedure was written before Sybernet recognized the JSEncode tag and is no longer used. It is documented here for completeness, and programmers are encouraged to create these strings inline.

noteThis procedure is deprecated.

Syntax

Procedure SP_HTML_JSQUOTE
(
    STRING                        VARCHAR2
)   ;

Parameters

Parameter Description
string
 
The string that should be quoted and encoded.

Example 1

The following example illustrates how to call sp_html_jsquote:

http.writeln('<script>');
http.write('var s=');
http.sp_html_jsquote('Hello World');
http.writeln(';');
http.writeln('alert(s)');
http.writeln('</script>');

Example 2

The following example illustrates how to avoid calling sp_html_jsquote since it is no longer supported:

http.writeln('<script>');
http.writeln('var s="<JSEncode>Hello World</JSEncode>";');
http.writeln('alert(s);');
http.writeln('</script>');




See Also

SYBERNET
TRANSLATE



Sybernet is a trademark of SRI International.
Copyright © 1996-2009 SRI International. All Rights Reserved.
Denis D. Workman / http://Sybernet.sri.com/