Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default confusing error

    I am getting a confusing 'object expected' error in IE when this
    script executes, but I can't figure out why. It stops all other
    scripts on my page...

    any ideas?

    Thanks in advance!

    Jeremy

    <%@ language = "Javascript" %>
    <%

    var strconnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data
    Source=C:/Inetpub/wwwroot/data.mdb";
    %>
    <script language=Javascript>

    function populateJob()
    {
    <%
    var tbl="";
    var rs4 = Server.CreateObject("ADODB.Recordset");
    var sql = "select distinct Preference from Preferences";
    rs4.Open(sql,strconnection);
    var n=0;
    while (!rs4.EOF)
    {
    var pref = rs4.Fields("Preference");
    {
    var tbl = tbl += "<table border='0'>\n";
    {

    tbl += " <td>\n";
    tbl += " <input type='text' size=65 name='txt" + n + "'
    value='" + pref + "'>\n";
    tbl += " </td>\n";

    for (var j=0; j<5; j++)
    {
    tbl += " <td>\n";
    tbl += " <input type='radio' name='box" + n + "'
    value='Box" + n + "'>\n";
    tbl += " </td>\n";
    }
    }
    tbl += "</table>\n";
    }
    rs4.MoveNext();
    n++;
    }
    rs4.Close();
    Response.Write("document.repForm.write('" + tbl + "')");
    %>
    }

    </script>

    <html>
    <BODY onload = "populateJob()">


    <FORM action="html/browse_product.asp" method="post" name="repForm"
    onSubmit="return Validate(this);">

    <%=tbl%>

    </FORM>

    </BODY>
    </HTML>
    Jeremy Guest

  2. Similar Questions and Discussions

    1. #39708 [WFx]: Confusing error message for empty(func())
      ID: 39708 User updated by: zizka at seznam dot cz Reported By: zizka at seznam dot cz Status: Wont fix Bug Type: ...
    2. #39708 [Opn->WFx]: Confusing error message for empty(func())
      ID: 39708 Updated by: tony2001@php.net Reported By: zizka at seznam dot cz -Status: Open +Status: ...
    3. A very confusing question ?
      As all of the people told that assemblies are of three types, Private, Public & Satellite. But I think these are of only two types: 1. Single...
    4. I'm confusing myself
      Hiyer, I've used Flash for creating CD-Roms but Ive been asked to design a web site. I'm now getting myself really confused too. I want to add in...
    5. Confusing confitional statement
      ok.. so if thats the issue, then the original if optiondone<>"" then response.write "" else response.write "<br />" because if it wasnt ""...
  3. #2

    Default Re: confusing error

    On 6 Jan 2004 21:50:59 -0800, [email]jeremy_zifchock@yahoo.com[/email] (Jeremy)
    wrote:
    >I am getting a confusing 'object expected' error in IE when this
    >script executes, but I can't figure out why. It stops all other
    >scripts on my page...
    >
    >any ideas?
    Not really. I'm getting a confusing error message from your post. If
    you'd post the full actual error, and isolate the line number, it
    would help us...

    Jeff

    >Thanks in advance!
    >
    >Jeremy
    >
    ><%@ language = "Javascript" %>
    ><%
    >
    >var strconnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data
    >Source=C:/Inetpub/wwwroot/data.mdb";
    >%>
    ><script language=Javascript>
    >
    >function populateJob()
    > {
    > <%
    > var tbl="";
    > var rs4 = Server.CreateObject("ADODB.Recordset");
    > var sql = "select distinct Preference from Preferences";
    > rs4.Open(sql,strconnection);
    > var n=0;
    > while (!rs4.EOF)
    > {
    > var pref = rs4.Fields("Preference");
    > {
    > var tbl = tbl += "<table border='0'>\n";
    > {
    >
    > tbl += " <td>\n";
    > tbl += " <input type='text' size=65 name='txt" + n + "'
    >value='" + pref + "'>\n";
    > tbl += " </td>\n";
    >
    > for (var j=0; j<5; j++)
    > {
    > tbl += " <td>\n";
    > tbl += " <input type='radio' name='box" + n + "'
    >value='Box" + n + "'>\n";
    > tbl += " </td>\n";
    > }
    > }
    > tbl += "</table>\n";
    > }
    > rs4.MoveNext();
    > n++;
    > }
    > rs4.Close();
    > Response.Write("document.repForm.write('" + tbl + "')");
    > %>
    > }
    >
    ></script>
    >
    ><html>
    ><BODY onload = "populateJob()">
    >
    >
    > <FORM action="html/browse_product.asp" method="post" name="repForm"
    >onSubmit="return Validate(this);">
    >
    ><%=tbl%>
    >
    ></FORM>
    >
    ></BODY>
    ></HTML>
    Jeff Cochran Guest

  4. #3

    Default Re: confusing error

    Sorry, the error is on line 32 char 1 and is showing 'object expected'

    [email]jeremy_zifchock@yahoo.com[/email] (Jeremy) wrote in message news:<f9d85033.0401062150.3185249f@posting.google. com>...
    > I am getting a confusing 'object expected' error in IE when this
    > script executes, but I can't figure out why. It stops all other
    > scripts on my page...
    >
    > any ideas?
    >
    > Thanks in advance!
    >
    > Jeremy
    >
    > <%@ language = "Javascript" %>
    > <%
    >
    > var strconnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data
    > Source=C:/Inetpub/wwwroot/data.mdb";
    > %>
    > <script language=Javascript>
    >
    > function populateJob()
    > {
    > <%
    > var tbl="";
    > var rs4 = Server.CreateObject("ADODB.Recordset");
    > var sql = "select distinct Preference from Preferences";
    > rs4.Open(sql,strconnection);
    > var n=0;
    > while (!rs4.EOF)
    > {
    > var pref = rs4.Fields("Preference");
    > {
    > var tbl = tbl += "<table border='0'>\n";
    > {
    >
    > tbl += " <td>\n";
    > tbl += " <input type='text' size=65 name='txt" + n + "'
    > value='" + pref + "'>\n";
    > tbl += " </td>\n";
    >
    > for (var j=0; j<5; j++)
    > {
    > tbl += " <td>\n";
    > tbl += " <input type='radio' name='box" + n + "'
    > value='Box" + n + "'>\n";
    > tbl += " </td>\n";
    > }
    > }
    > tbl += "</table>\n";
    > }
    > rs4.MoveNext();
    > n++;
    > }
    > rs4.Close();
    > Response.Write("document.repForm.write('" + tbl + "')");
    > %>
    > }
    >
    > </script>
    >
    > <html>
    > <BODY onload = "populateJob()">
    >
    >
    > <FORM action="html/browse_product.asp" method="post" name="repForm"
    > onSubmit="return Validate(this);">
    >
    > <%=tbl%>
    >
    > </FORM>
    >
    > </BODY>
    > </HTML>
    Jeremy Guest

  5. #4

    Default Re: confusing error

    Now, if we only knew which line is line 32....


    >-----Original Message-----
    >Sorry, the error is on line 32 char 1 and is
    showing 'object expected'
    >
    >jeremy_zifchock@yahoo.com (Jeremy) wrote in message
    news:<f9d85033.0401062150.3185249f@posting.google. com>...
    >> I am getting a confusing 'object expected' error in IE
    when this
    >> script executes, but I can't figure out why. It stops
    all other
    >> scripts on my page...
    >>
    >> any ideas?
    >>
    >> Thanks in advance!
    >>
    >> Jeremy
    >>
    >> <%@ language = "Javascript" %>
    >> <%
    >>
    >> var strconnection
    = "Provider=Microsoft.Jet.OLEDB.4.0;Data
    >> Source=C:/Inetpub/wwwroot/data.mdb";
    >> %>
    >> <script language=Javascript>
    >>
    >> function populateJob()
    >> {
    >> <%
    >> var tbl="";
    >> var rs4 = Server.CreateObject("ADODB.Recordset");
    >> var sql = "select distinct Preference from
    Preferences";
    >> rs4.Open(sql,strconnection);
    >> var n=0;
    >> while (!rs4.EOF)
    >> {
    >> var pref = rs4.Fields("Preference");
    >> {
    >> var tbl = tbl += "<table
    border='0'>\n";
    >> {
    >>
    >> tbl += " <td>\n";
    >> tbl += " <input
    type='text' size=65 name='txt" + n + "'
    >> value='" + pref + "'>\n";
    >> tbl += " </td>\n";
    >>
    >> for (var j=0; j<5; j++)
    >> {
    >> tbl += " <td>\n";
    >> tbl += " <input
    type='radio' name='box" + n + "'
    >> value='Box" + n + "'>\n";
    >> tbl += " </td>\n";
    >> }
    >> }
    >> tbl += "</table>\n";
    >> }
    >> rs4.MoveNext();
    >> n++;
    >> }
    >> rs4.Close();
    >> Response.Write("document.repForm.write('" + tbl
    + "')");
    >> %>
    >> }
    >>
    >> </script>
    >>
    >> <html>
    >> <BODY onload = "populateJob()">
    >>
    >>
    >> <FORM action="html/browse_product.asp"
    method="post" name="repForm"
    >> onSubmit="return Validate(this);">
    >>
    >> <%=tbl%>
    >>
    >> </FORM>
    >>
    >> </BODY>
    >> </HTML>
    >.
    >
    John Beschler Guest

  6. #5

    Default Re: confusing error

    Which line is line 32?
    Jeremy wrote:
    > Sorry, the error is on line 32 char 1 and is showing 'object expected'
    >
    > [email]jeremy_zifchock@yahoo.com[/email] (Jeremy) wrote in message
    > news:<f9d85033.0401062150.3185249f@posting.google. com>...
    >> I am getting a confusing 'object expected' error in IE when this
    >> script executes, but I can't figure out why. It stops all other
    >> scripts on my page...
    >>
    >> any ideas?
    >>
    >> Thanks in advance!
    >>
    >> Jeremy
    >>
    >> <%@ language = "Javascript" %>
    >> <%
    >>
    >> var strconnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data
    >> Source=C:/Inetpub/wwwroot/data.mdb";
    >> %>
    >> <script language=Javascript>
    >>
    >> function populateJob()
    >> {
    >> <%
    >> var tbl="";
    >> var rs4 = Server.CreateObject("ADODB.Recordset");
    >> var sql = "select distinct Preference from Preferences";
    >> rs4.Open(sql,strconnection);
    >> var n=0;
    >> while (!rs4.EOF)
    >> {
    >> var pref = rs4.Fields("Preference");
    >> {
    >> var tbl = tbl += "<table border='0'>\n";
    >> {
    >>
    >> tbl += " <td>\n";
    >> tbl += " <input type='text' size=65 name='txt" + n + "'
    >> value='" + pref + "'>\n";
    >> tbl += " </td>\n";
    >>
    >> for (var j=0; j<5; j++)
    >> {
    >> tbl += " <td>\n";
    >> tbl += " <input type='radio' name='box" + n + "'
    >> value='Box" + n + "'>\n";
    >> tbl += " </td>\n";
    >> }
    >> }
    >> tbl += "</table>\n";
    >> }
    >> rs4.MoveNext();
    >> n++;
    >> }
    >> rs4.Close();
    >> Response.Write("document.repForm.write('" + tbl + "')");
    >> %>
    >> }
    >>
    >> </script>
    >>
    >> <html>
    >> <BODY onload = "populateJob()">
    >>
    >>
    >> <FORM action="html/browse_product.asp" method="post" name="repForm"
    >> onSubmit="return Validate(this);">
    >>
    >> <%=tbl%>
    >>
    >> </FORM>
    >>
    >> </BODY>
    >> </HTML>
    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.


    Bob Barrows Guest

  7. #6

    Default Re: confusing error

    What does "view source" show?

    --
    Mark Schupp
    Head of Development
    Integrity eLearning
    [url]www.ielearning.com[/url]


    "Jeremy" <jeremy_zifchock@yahoo.com> wrote in message
    news:f9d85033.0401062150.3185249f@posting.google.c om...
    > I am getting a confusing 'object expected' error in IE when this
    > script executes, but I can't figure out why. It stops all other
    > scripts on my page...
    >
    > any ideas?
    >
    > Thanks in advance!
    >
    > Jeremy
    >
    > <%@ language = "Javascript" %>
    > <%
    >
    > var strconnection = "Provider=Microsoft.Jet.OLEDB.4.0;Data
    > Source=C:/Inetpub/wwwroot/data.mdb";
    > %>
    > <script language=Javascript>
    >
    > function populateJob()
    > {
    > <%
    > var tbl="";
    > var rs4 = Server.CreateObject("ADODB.Recordset");
    > var sql = "select distinct Preference from Preferences";
    > rs4.Open(sql,strconnection);
    > var n=0;
    > while (!rs4.EOF)
    > {
    > var pref = rs4.Fields("Preference");
    > {
    > var tbl = tbl += "<table border='0'>\n";
    > {
    >
    > tbl += " <td>\n";
    > tbl += " <input type='text' size=65 name='txt" + n + "'
    > value='" + pref + "'>\n";
    > tbl += " </td>\n";
    >
    > for (var j=0; j<5; j++)
    > {
    > tbl += " <td>\n";
    > tbl += " <input type='radio' name='box" + n + "'
    > value='Box" + n + "'>\n";
    > tbl += " </td>\n";
    > }
    > }
    > tbl += "</table>\n";
    > }
    > rs4.MoveNext();
    > n++;
    > }
    > rs4.Close();
    > Response.Write("document.repForm.write('" + tbl + "')");
    > %>
    > }
    >
    > </script>
    >
    > <html>
    > <BODY onload = "populateJob()">
    >
    >
    > <FORM action="html/browse_product.asp" method="post" name="repForm"
    > onSubmit="return Validate(this);">
    >
    > <%=tbl%>
    >
    > </FORM>
    >
    > </BODY>
    > </HTML>

    Mark Schupp Guest

Posting Permissions

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

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 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139