By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,253 Members | 1,690 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,253 IT Pros & Developers. It's quick & easy.

Object expected error

P: 3
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
Share this Question
Share on Google+
4 Replies


gits
Expert Mod 5K+
P: 5,390
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

P: 3
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
Expert Mod 5K+
P: 5,390
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

P: 3
hmmm, I don't know how to do that (the frameset) I guess... any hints?
Jun 10 '08 #5

Post your reply

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