Advertisement

06.21.2008 at 11:06AM PDT, ID: 23504815
[x]
Attachment Details

object doesnt exist error

Asked by TheInnovator in JavaScript

Tags: JavaScript, Object doesn't support this property or method

When I try to submit the form programmatically, I get

"
Line 8
Object doesn't support this property or method
"
Here's my line 8:   document.myForm.submit();

The code is below.Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
<html> 
 <head>
  <title>NOT AJAX</title>
  <SCRIPT language="JavaScript">
function submitform()
{
  document.myForm.submit();
}
</SCRIPT>
 
 <%
    id = Request.QueryString("id")
    modify = Request.QueryString("modify")
 %>
 </head>
 
 <body>
  
  <table width="60%" border=1>
   <tr>
    <td>First Name</td>
    <td>Last Name</td>
    <td>Age</td>
    <td>Comment</td>
    <td>Modify</td>
   </tr>
<%
 Set conn = Server.CreateObject("ADODB.Connection")
 conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("comment.mdb") & ";"
 
 txt = "SELECT * FROM tblAjax"
 
 Set rs = Server.CreateObject("ADODB.Recordset")
 rs.Open txt, conn
 
 do while not rs.eof
%>   
<form name="myForm">
   <tr>
    <td><%=rs("fname")%></td>
    <td><%=rs("lname")%></td>
    <td><%=rs("age")%></td>
    <td><%If (cint(rs("id")) = cint(id)) and (modify = "Edit") then %>
            <textarea cols="50" rows="5" name="cmt"><%=rs("comment")%></textarea>
        <% Else 
            response.Write rs("comment")& "db id: " & rs("id") 
           End If
        %>
    </td>
    <td>
        <% If (cint(rs("id")) = cint(id)) and (modify = "Edit") Then %>
            <input type="button" name="modify" onclick="JavaScript: submitform();" value="Update" /><input type="hidden" name="id" value="<%=rs("id") %>" /></td>
        <% Else %>
           <input type="submit" name="modify" value="Edit" /><input type="hidden" name="id" value="<%=rs("id") %>" /></td>
        <% End If %>
 
</td>
   </tr>  
</form>
<%
    rs.MoveNext
    Loop
%>  
  </table>  
 </body> 
</html>
[+][-]06.21.2008 at 11:07AM PDT, ID: 21838198

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.21.2008 at 11:09AM PDT, ID: 21838211

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.21.2008 at 11:15AM PDT, ID: 21838226

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.21.2008 at 11:20AM PDT, ID: 21838234

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]06.21.2008 at 11:21AM PDT, ID: 21838235

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.21.2008 at 11:33AM PDT, ID: 21838256

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.21.2008 at 11:44AM PDT, ID: 21838279

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: JavaScript
Tags: JavaScript, Object doesn't support this property or method
Sign Up Now!
Solution Provided By: hielo
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628