Please refer to the following code:
<cfform method="POST" action="#CGI.script_name#">
    <p>Enter your Name: 
    <input name="name" type="text" hspace="30" maxlength="30">
    <input type="Submit" name="submit" value="OK">
</cfform>
<cfscript>
    function HelloFriend(Name) {
        if (Name is "") WriteOutput("You forgot your name!");
        else WriteOutput("Hello " & name &"!");
        return "";
    }
    if (IsDefined("Form.submit")) HelloFriend(Form.name);
</cfscript>
Source: http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=UDFs_01.html#1167055
The code runs fine even without CGI.script_name attribute of action field. May I know why it's required then? The description says "Uses the script_name CGI variable to post to this page without specifying a URL. "
 
     
    