473,466 Members | 1,368 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Object Expected Error

1 New Member
Would somebody please tell me why I am getting the error message:

Line: 46
Char: 1
Error: Object expected
Code: 0
URL: http://waitinglist.asp

Many thanks

Mark ....

My code is as follows:
Expand|Select|Wrap|Line Numbers
  1. <%@LANGUAGE="VBSCRIPT"%>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  3.    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  4. <html>
  5. <!--#include file="../Connections/MISReporting2.asp" -->
  6. <%
  7. Dim rsCourses
  8. Dim rsCourses_numRows
  9. Dim strSQL
  10.  
  11. Set rsCourses = Server.CreateObject("ADODB.Recordset")
  12. rsCourses.ActiveConnection = MM_MISReporting2_STRING
  13. strSQL = "SELECT stcsessd.full_desc, stcstatd.aos_code, stcsessd.aos_period, stcsessd.aos_start_dt, stcsessd.aos_end_dt FROM qlsdat.dbo.stcstudf INNER JOIN qlsdat.dbo.stcstatd INNER JOIN qlsdat.dbo.stcsessd ON stcstatd.aos_code = stcsessd.aos_code INNER JOIN qlsdat.dbo.stmaos ON stcsessd.aos_code = stmaos.aos_code AND stcsessd.acad_period = stmaos.acad_period AND stcsessd.aos_period = stmaos.aos_period ON qlsdat.dbo.stcstudf.aos_code = qlsdat.dbo.stcstatd.aos_code WHERE (stcstatd.active_yn = 1) AND (stcsessd.acad_period = '07/08') AND (stmaos.stage_code = 'ENR') AND (stmaos.stage_ind='E') AND (qlsdat.dbo.stcstudf.field2 ='FT') GROUP BY stcsessd.full_desc, stcstatd.aos_code, stcsessd.aos_period, stcsessd.aos_start_dt, stcsessd.aos_end_dt, stmaos.stage_code ORDER BY stcsessd.full_desc"
  14. 'response.Write(rsCourses.Source)
  15. rsCourses.Source = strSQL
  16. rsCourses.CursorType = 0
  17. rsCourses.CursorLocation = 2
  18. rsCourses.LockType = 1
  19. rsCourses.Open()
  20.  
  21. rsCourses_numRows = 0
  22.  
  23. %>
  24.  
  25.  
  26. <head>
  27.  
  28. <title>Course Waiting List</title>
  29. <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
  30. <link rel="stylesheet" href="../css/pagelayout.css" type="text/css">
  31. <link rel="stylesheet" href="../css/scrolling_table.css" type="text/css">
  32. <link rel="stylesheet" href="../css/menu.css" type="text/css">
  33. <script language="JavaScript" src="../js/menu.js"></script>
  34. <script language="JavaScript" src="../js/tree_items.js"></script>
  35. <script language="JavaScript" src="../js/menu_tpl.js"></script>
  36.  
  37. </head>
  38.  
  39. <% 
  40.  
  41.     Function getCourseDetails
  42.         Response.Write("Hello")
  43.     End Function
  44.  
  45. %>
  46.  
  47. <body>
  48. <div id="maincontainer">
  49.     <div id="banner">
  50.             <div class="innertube">
  51.                 <h1>
  52.             <!--#include file ="../inc/header.inc"-->
  53.                 </h1>
  54.             </div>
  55.     </div>
  56.  
  57.  
  58.     <div id="contentwrapper">
  59.         <div id="contentcolumn">
  60.             <div class="innertube">                
  61.  
  62.                 <%response.Buffer=true%>
  63.  
  64.                 <!-- #include file="caDataGrid.asp"--> 
  65.                 <%
  66.                 dim cDataGrid, mapPath 
  67.  
  68.                 'now lets set our own columns  
  69.                 Set cDataGrid = New caDataGrid 
  70.                 cDataGrid.AutoColumns = false 
  71.                 cDataGrid.AddTable("dataTable")
  72.                 cDataGrid.AddColumn("Course Title") 
  73.                 cDataGrid.AddColumn("AOS Code") 
  74.                 cDataGrid.AddColumn("AOS Period")
  75.                 cDataGrid.AddColumn("Start Date")
  76.                 cDataGrid.AddColumn("End Date")
  77.                 cDataGrid.AddColumn("Chk")
  78.                 %>
  79.  
  80.  
  81.  
  82.                 <form name="myform" action="form_action.asp" method="get">
  83.                     <br />
  84.                       <label>Course Type
  85.                           <select name="slCourseType" onChange="getCourseDetails()">
  86.                             <option value="">All courses</option>
  87.                             <option value="FT">Full Time</option>
  88.                             <option value="PT">Part Time</option>
  89.                             <option value="SC">Short Course</option>
  90.                             <option value="SP">Schools Projects</option>
  91.                             <option value="KS">Key Skills</option>
  92.                             <option value="BS">Basic Skills</option>
  93.                             <option value="FA">Full Time Additional</option>
  94.                           </select>
  95.                       </label>                      
  96.                     <br />
  97.  
  98.                     <div class="scrollTableContainer">
  99.                         <%
  100.                         cDataGrid.Bind rsCourses,true
  101.                         %>
  102.                     </div>
  103.  
  104.                         <br />
  105.                         <input type="submit" value="Submit" />
  106.                         <input type="reset" value="Clear" />
  107.  
  108.               </form>
  109.  
  110.                 <%
  111.                 set cDataGrid = nothing
  112.                 rsCourses.Close()
  113.                 Set rsCourses = Nothing
  114.                 %>
  115.  
  116.             </div>
  117.         </div>
  118.     </div>
  119.  
  120.     <div id="nav">
  121.     <div class="innertube">
  122.         <script language="JavaScript">
  123.             new menu (TREE_ITEMS, MENU_TPL);
  124.         </script>
  125.     </div>
  126.     </div>
  127.  
  128.     <div id="footer">
  129.     <!--#include file ="../inc/footer.inc"-->
  130.     </div>
  131.  
  132. </div>
  133. </body>
  134.  
  135. </html>
Jan 3 '08 #1
1 1787
jhardman
3,406 Recognized Expert Specialist
I think your function syntax might be wrong. maybe
Expand|Select|Wrap|Line Numbers
  1. function getCourseDetails()
Let me know if this helps at all. Check your line numbering, the line that shows up here as line 46 could not have generated this error.

Jared
Jan 5 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Bill | last post by:
I call a function in my .js file like this: onClick="location.href='blank.html' + generateSearchStringFromForm('section')" where section is the name of my form. The function is defined as...
2
by: jsnX | last post by:
i want a function object that is a) initialized with an STL container foo b) will search foo for an object of type foo::value_type here is my code: ...
2
by: FredC | last post by:
OS Name Microsoft Windows XP Professional Version 5.1.2600 Service Pack 2 Build 2600 Total Physical Memory 1,024.00 MB MDE 2003 Version 7.1.3008 ..NET Framework 1.1 Version 1.1.4322 SP1...
11
by: westplastic | last post by:
This one is driving me insane. The script works perfect on Firefox, but Internet Explorer keeps complaining about "Error Object Expected" and stuff like that. I've run it through Firefox's Java...
26
by: yb | last post by:
Hi, Is there a standard for the global 'window' object in browsers? For example, it supports methods such as setInterval and clearInterval, and several others. I know that w3c standardized...
12
by: Andrew Poulos | last post by:
With the following code I can't understand why this.num keeps incrementing each time I create a new instance of Foo. For each instance I'm expecting this.num to alert as 1 but keeps incrementing. ...
4
by: loserdude84 | last post by:
Hi I keep getting the good old error 'Object Expected Error' on a site I recently built. I am really struggling with this one. Object Expected Error Line 66 <div...
1
by: JOJO123 | last post by:
I got here in search of an answer to this Javascrpt question. I upgraded jave on XP Ie 7, acrobat 5.1 and suddenly can't open any pdf files on web sites using IE. I see u guys all say, this is a...
10
RMWChaos
by: RMWChaos | last post by:
WinVista/IE7 I am getting some weird errors only in IE7, but not in FF2.0.0.8 or NN9. It even happens on this website when I click "Sign In". The error is: "A Runtime Error has occurred."...
2
by: thj | last post by:
Hi. I've got this form that I'm trying to validate: <form id="periodForm" action="" method="post"> <p> Periode: <input id="startDate" name="startDate" type="text" size="7" value="<%=...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.