Results 1 to 2 of 2

Thread: Object Expected Error

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2000
    Posts
    4

    Unhappy

    I am trying to run this code below but i get a runtime error
    (ie) Object Expected Error
    Can somebody tell me what is the problem in the code

    <%@ Language=VBScript %>
    <HTML>
    <HEAD>
    <link rel="home" href=http://www.egain.com>
    <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
    </HEAD>
    <BODY>
    <form name="userinfo" action="chap3RequestObj.asp" method="post">
    <center>
    Fill the Form
    Name:<input type="text" name="name"> <br>
    Email:<input type="text" name="email"> <br>

    <input type=reset value=Reset>
    <input type=submit value=Submit onclick="too()">
    <P>&nbsp;</P>
    </form>
    <%
    sub too()
    alert(Request.Form("name"))
    end sub
    %>
    Name:<%=Request.Form("name") %> <br>
    EMail:<%=Request.Form("email") %>
    </BODY>
    </HTML>

  2. #2
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    Your trying to call server side code from the client side try this instead:

    Code:
    <%@ Language=VBScript %> 
    <HTML> 
    <HEAD> 
    <link rel="home" href=http://www.egain.com> 
    <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"> 
    <SCRIPT Language=VBScript>
    Sub too 
        window.alert(Request.Form("name")) 
    End Sub 
    </SCRIPT>
    </HEAD> 
    <BODY> 
    <form name="userinfo" action="chap3RequestObj.asp" method="post"> 
    <center> 
    Fill the Form 
    Name:<input type="text" name="name"> <br> 
    Email:<input type="text" name="email"> <br> 
    
    <input type=reset value=Reset> 
    <input type=submit value=Submit onclick="too"> 
    <P>&nbsp;</P> 
    </form> 
    Name:<%=Request.Form("name") %> <br> 
    EMail:<%=Request.Form("email") %> 
    </BODY> 
    </HTML>
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width