473,405 Members | 2,421 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Object expected error

Getting an object expected error...
Line 6, character 1....
site is: wfpk9.org

Please help! I am SUPER new to java/dhtml... and really don't know what I am doing...
Jun 6 '08 #1
4 1914
gits
5,390 Expert Mod 4TB
just include the js-library before calling a function of it:

put this line:

Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript" language="JavaScript1.2" src="stm31.js"></script>
before your current line 4. that should fix it ...

kind regards
Jun 6 '08 #2
Hi, the menu is being inserted as a library file... (that way I can use it on many pages and easily change it on just the library file...) So, based on that I am not sure where to insert that line... It looks like its in there but further at the bottom of the index.html (and other pages)...

Here is the original contents of the lbi file:
Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript" id="sothink_dhtmlmenu"> <!--
  2.  st_siteroot="file:///C|/Documents%20and%20Settings/Crist/My%20Documents/Allen/South%20Jordan%20Files/Multi-Agency%20K9";
  3.  st_jspath="/stmenu.js";
  4.  if(!window.location.href.indexOf("file:") && st_jspath.charAt(0)=="/")
  5.   document.write('<script type="text/javascript" src="'+st_siteroot+st_jspath+'"><\/script>');
  6.  else 
  7.   document.write('<script type="text/javascript" src="'+st_jspath+'"><\/script>');
  8. //--> </script>
  9. <link href="../stylesheet.css" rel="stylesheet" type="text/css">
  10. <script type="text/javascript" id="sothink_dhtmlmenu"> <!--
  11.  st_siteroot="file:///C|/Documents%20and%20Settings/Crist/My%20Documents/Allen/South%20Jordan%20Files/Multi-Agency%20K9";
  12.  st_jspath="/stmenu.js";
  13.  if(!window.location.href.indexOf("file:") && st_jspath.charAt(0)=="/")
  14.   document.write('<script type="text/javascript" src="'+st_siteroot+st_jspath+'"><\/script>');
  15.  else 
  16.   document.write('<script type="text/javascript" src="'+st_jspath+'"><\/script>');
  17. //--> </script>
  18. <span>
  19. <script id="sothink_widgets:dwwidget_dhtmlmenu5_5_2008.pgt" type="text/javascript">
  20. <!--
  21. stm_bm(["menu547a",850,"/","blank.gif",0,"","",1,0,250,0,1000,1,0,0,"","100%",0,0,1,2,"default","hand","file:///C|/Documents%20and%20Settings/Crist/My%20Documents/Allen/South%20Jordan%20Files/Multi-Agency%20K9"],this);
  22. stm_bp("p0",[0,4,0,0,2,3,0,7,100,"",-2,"",-2,50,0,0,"#009933","transparent","",3,1,3,"#009933"]);
  23. stm_ai("p0i0",[0,"Home","","",-1,-1,0,"http://www.wfpk9.org/index.html","_self","","","","",0,0,0,"","",0,0,0,1,1,"#000000",0,"#000000",0,"","",3,3,1,3,"#009933","#000000","#009933","#33ff00","8pt Verdana","8pt Verdana",0,0]);
  24. stm_aix("p0i1","p0i0",[0,"Member Agencies","","",-1,-1,0,"http://www.wfpk9.org/member.html"]);
  25. stm_aix("p0i2","p0i0",[0,"Services Provided","","",-1,-1,0,"http://www.wfpk9.org/services.html"]);
  26. stm_aix("p0i3","p0i0",[0,"K9 Photos","","",-1,-1,0,"","_self","","","","",0,0,0,"arrow_r.gif","arrow_r.gif",7,7]);
  27. stm_bp("p1",[1,4,0,0,2,3,0,0,100,"",-2,"",-2,50,0,0,"#999999","#E6EFF9","",3,1,1,"#000000"]);
  28. stm_aix("p1i0","p0i0",[0,"Sandy Police Department","","",-1,-1,0,"http://www.wfpk9.org/spdp.html","_self","","","","",0,0,0,"","",0,0,0,0]);
  29. stm_aix("p1i1","p1i0",[0,"South Salt Lake Police Department","","",-1,-1,0,"http://www.wfpk9.org/sslpdp.html"]);
  30. stm_aix("p1i2","p1i1",[0,"West Jordan Police Department","","",-1,-1,0,"http://www.wfpk9.org/wjpdp.html"]);
  31. stm_aix("p1i3","p1i1",[0,"Utah Highway Patrol","","",-1,-1,0,"http://www.wfpk9.org/uhpp.html"]);
  32. stm_ep();
  33. stm_aix("p0i4","p0i0",[0,"Support Us","","",-1,-1,0,"http://www.wfpk9.org/support.html"]);
  34. stm_aix("p0i5","p0i4",[0,"Contact Us","","",-1,-1,0,"http://www.wfpk9.org/contact.html"]);
  35. stm_aix("p0i6","p0i4",[0,"FAQ\'S","","",-1,-1,0,"http://www.wfpk9.org/faqs.html"]);
  36. stm_aix("p0i7","p0i0",[0,"Forums (members only)","","",-1,-1,0,"http://www.wfpk9.org/forums"]);
  37. stm_ep();
  38. stm_em();
  39. //-->
  40. </script>
  41. </span>
Jun 6 '08 #3
gits
5,390 Expert Mod 4TB
it seems to be something that should write the script-include dynamically to a page? i hate that usage ... ;) in case you want to do such things then try to ensure that the correct source is written to the page before you call any function of the lib ... as i told you already. the current problem is exactly this: you try to call such a sothink-function when there is no script-include before ... so that function is undefined ... and you get the error.

you could include all scripts in your index-page (a frameset?) and refer from the child-pages to that window with parent, top or whatever is appropriate in any case ... and so you have just one script-include and avoid that 'ugly' clientside document.write-like include ...

kind regards
Jun 7 '08 #4
hmmm, I don't know how to do that (the frameset) I guess... any hints?
Jun 10 '08 #5

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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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,...

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.