Defining Procedures

Domain Hosting image
Web Hosting
Dedicated server
ssl certificate
Web Design image
Email

Procedure definitions can appear within <SCRIPT> and </SCRIPT> tags and must follow the rules for the declared scripting language. Use the <SCRIPT> element for procedures in languages other than the primary scripting language. Use the scripting delimiters (<%and % >) for procedures in the primary scripting language.

When you use the HTML <SCRIPT> tag, you must We two attributes to ensure server side processing of the Script. The syntax for using the
<SCRIPT> tag is:

<SCRIPT RUNAT = SERVER LANGUAGE JSCRIPT>
procedure definition
</SCRIPT>

The RUNAT = SERVER attribute tells the Web server to process the script on the server. If you do not set this attribute, the script is processed by the client browser, The LANGUAGE attribute determines the scripting language used for this script block. You can specify any language for which you have the scripting engine. To specify VBScript, use the value VBSCRIPT. To specify JScript, use the value JSCRIPT. If you do not set the LANGUAGE attribute, the script block is interpreted in the primary scripting language

The commands in the script block must form one or more complete procedures in the chosen scripting language. For example, the following commands define the Jscript procedure My Function.

<HTML>
<SCRIPT RUNAT = SERVER LANGUAGE = JSCRIPT>
function My Function()
{
Response. Write ("My Function Called")
}
</SCRIPT>

Do not include within server side <SCRIPT> tags any script commands that are not part of complete procedures. Commands that are not part of a procedure may cause unpredictable results because the order of execution of not predictable. In addition, you cannot use the ASP output expression < % = within a procedure. Instead, you must use Response Write.



Domain Name Search

www.


Copyright (C) 2007. Web Domain design hosting. All rights reserved.