|
Sybernet / Supplied Procedures Reference
Release 3.00 Oct 14, 2002 |
|
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.
This procedure is deprecated.
Procedure SP_HTML_JSQUOTE
(
STRING VARCHAR2
) ;
| Parameter | Description |
|---|---|
string |
The string that should be quoted and encoded. |
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>');
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>');