PDA

View Full Version : Jim's DHTML Menu 5.7 and I'm a newbie



captapollo
11-11-2004, 05:48 PM
Script: http://www.dynamicdrive.com/dynamicindex1/jimmenu/index.htm

Hi all;

As I said above, I am a newbie and just looking around for stuff for my website. I tried the menu and I get an error message on the <body onload="init()"> line when I preview in Frontpage 2002. It says Error: Object Expected. I believe I have everything in the right folders and I edited the browser.js file. Below is the whole page. Thank you in advance for your help.

John.

<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<script type="text/javascript" src="includes/browser.js">

/***********************************************
* Jim's DHTML Menu v5.7- Jim Salyer (jsalyer@REMOVETHISmchsi.com)
* Visit Dynamic Drive: http://www.dynamicdrive.com for script and instructions
* This notice must stay intact for use
***********************************************/

</script>
<script type="text/javascript" src="/config.js"></script>

<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>The Schaaf Family Web Site</title>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<link rel="File-List" href="index_files/filelist.xml">

<!--[if !mso]>
<style>
v\:* { behavior: url(#default#VML) }
o\:* { behavior: url(#default#VML) }
.shape { behavior: url(#default#VML) }
</style>
<![endif]-->

<meta name="Microsoft Theme" content="arcs 111">
<meta name="Microsoft Border" content="t, default">
<!--[if gte mso 9]>
<xml><o:shapedefaults v:ext="edit" spidmax="1027"/>
</xml><![endif]-->
</head>

<body onload="init()">

<p align="center">
<img SRC="images/schaaf_family_website001002.jpg" ALT ALIGN="TOP" BORDER="0" VSPACE="0" HSPACE="0" width="224" height="306"><!--[if gte vml 1]><v:shapetype id="_x0000_t136"
coordsize="21600,21600" o:spt="136" adj="10800" path="m@7,l@8,m@5,21600l@6,21600e">
<v:formulas>
<v:f eqn="sum #0 0 10800"/>
<v:f eqn="prod #0 2 1"/>
<v:f eqn="sum 21600 0 @1"/>
<v:f eqn="sum 0 0 @2"/>
<v:f eqn="sum 21600 0 @3"/>
<v:f eqn="if @0 @3 0"/>
<v:f eqn="if @0 21600 @1"/>
<v:f eqn="if @0 0 @2"/>
<v:f eqn="if @0 @4 21600"/>
<v:f eqn="mid @5 @6"/>
<v:f eqn="mid @8 @5"/>
<v:f eqn="mid @7 @8"/>
<v:f eqn="mid @6 @7"/>
<v:f eqn="sum @6 0 @5"/>
</v:formulas>
<v:path textpathok="t" o:connecttype="custom" o:connectlocs="@9,0;@10,10800;@11,21600;@12,10800"
o:connectangles="270,180,90,0"/>
<v:textpath on="t" fitshape="t"/>
<v:handles>
<v:h position="#0,bottomRight" xrange="6629,14971"/>
</v:handles>
<o:lock v:ext="edit" text="t" shapetype="t"/>
</v:shapetype><v:shape id="_x0000_s1027" type="#_x0000_t136" style='width:208.5pt;
height:161.25pt' fillcolor="#9400ed" strokecolor="#eaeaea" strokeweight="1pt">
<v:fill color2="blue" angle="-90" colors="0 #a603ab;13763f #0819fb;22938f #1a8d48;34079f yellow;47841f #ee3f17;57672f #e81766;1 #a603ab"
method="none" type="gradient"/>
<v:shadow on="t" type="perspective" color="silver" opacity="52429f" origin="-.5,.5"
matrix=",46340f,,.5,,-4768371582e-16"/>
<v:textpath style='font-family:"Arial Black";font-size:16pt;v-text-align:left;
v-text-kern:t' trim="t" fitpath="t" string="Greetings from John, Teresa, Johnny, and Christopher"/>
</v:shape><![endif]--><![if !vml]><img border=0 width=353 height=220
src="index_files/image001.gif"
alt="Greetings from John, Teresa, Johnny, and Christopher"
v:shapes="_x0000_s1027"><![endif]></p>

<p align="center">
&nbsp;</p>

<p align="center">
&nbsp;</p>

<p align="center">
&nbsp;</p>

<p align="center">
<a href="images/02%20Love%20Gun.mp3">Play MP3</a></p>

</body></html>

cr3ative
11-11-2004, 06:30 PM
You could try changing this:

<script type="text/javascript" src="/config.js"></script>

To this:

<script type="text/javascript" src="config.js"></script>

Otherwise, which line is it expecting an object upon, and have you tried opening it in Internet Explorer?

Kind Regards,
cr3ative

ausant
11-11-2004, 07:03 PM
normally i put a script that i can't get to work in notepad or what ever you use to make sites.. and edit it myself, try and figure it out, you can't hurt the script(it will ALLWAYS BE ON DD) Thats how i learn't heaps off css and script lang.
:)

captapollo
11-11-2004, 07:38 PM
Thanks for the reply ausant.

I get a page error when I open the page in I.E.

I removed the / that you suggested, and I now get an error on line 4, Error: 'menus' is undefined, and the same 'menus' is undefined error on line 36.

I put the / back in and it reverts to the original error.

You asked "Otherwise, which line is it expecting an object upon", the error referred to line 36, the <body... line, is that what you meen?

Thanks again.

John

cr3ative
11-11-2004, 07:40 PM
Ah, if menus is undefined, your scripts aren't being accessed.

Make sure the paths to your scripts are AOK and try again. They all have to be in the same folder.

Its more likely than not a path error.

cr3ative

captapollo
11-12-2004, 12:22 PM
Hi Cr3ative, sorry I didn't realize the first reply was from you. Some how I thought they were both from ausant. Anyway, thanks to both of you for your replies.

In your first reply, you suggested I remove the / from before config in src="/config.js"></script>. When I do that, that is when the menus undefined error appears. Otherwise, all I get is the Error: Object Expected on the <body onload="init()"> line 36. That is what is happening.

Thanks again.

John.

cr3ative
11-12-2004, 03:10 PM
Strange. Upload it and send us a link.

cr3ative

captapollo
11-12-2004, 05:23 PM
Great! Here it is: www.jwschaaf.com

Let me know what you think.

John.

captapollo
11-14-2004, 12:51 PM
When I put the code for the script into the html of my page I copied it. The trouble is, I copied it from the instructions page that comes with the zip file. It apparently put in bad characters that were not displaying in html view. :mad:

I did some experimenting and I had the example files working in a temporary folder and everything was identical, but mine would not work. I then replaced the code in my web page with code copied from the supplied example html files viewed with notepad, and the menu started working.

Live and learn. I am now modifying the menus and they are working fine. As I said, I am a newbie to this.

Thanks again for your help folks.

John. :) :) :)

Mars12
11-15-2004, 12:09 AM
What do these letters mean, Ausant? DD?

(it will ALLWAYS BE ON DD)

Guess I'm new at this script language. :D

captapollo
11-15-2004, 12:16 AM
:)

DD = DynamicDrive, this site and where I found the menu.

My newest problem is I want to keep my site organized in folder for different areas, I want the same menu on all pages. When I moved a file that has the menu on it using FrontPage, FP edited the paths to the .js files (i.e. includes/browser.js) to ../includes/browser.js. This looks fine to me, but this page now gets the menu undefined error which I was told usually always meens a path problem. Is there a limitaion to the script running that can't handle paths like this or what? Is there another way to say ../ (back one level in the directory tree)?

Thanks again.

Mars12
11-19-2004, 03:49 PM
Never mind. I am a newbie at these things, but realize DD means Dynamic Drive. Duh!

Mars12
11-26-2004, 01:24 PM
Never Mind. I know what DD stands for. :o

Guess I am a newbie.

vanderhawk
01-03-2005, 09:50 PM
I am getting a similar error in Frontpage when I go to preview the page. The error in FrontPage is as follows:

Line: 39
Char: 3268
Error: Object expected
Code: 0

This is what line 39's code looks like in FrontPage:

</v:shapetype><v:shape id="_x0000_s1028" type="#_x0000_t202" alt="" style='position:absolute;

Here's the first 43 lines of code from Frontpage:

<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><title>Home</title><link rel="File-List" href="index_files/filelist.xml"><script language="JavaScript">
<!--
function FP_swapImg() {
var doc=document,args=arguments,elm,n; doc.$imgSwaps=new Array(); for(n=2; n<args.length;
n+=2) { elm=FP_getObjectByID(args[n]); if(elm) { doc.$imgSwaps[doc.$imgSwaps.length]=elm;
elm.$src=elm.src; elm.src=args[n+1]; } }
}

function FP_preloadImgs() {
var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array();
for(var i=0; i<a.length; i++) { d.FP_imgs[i]=new Image; d.FP_imgs[i].src=a[i]; }
}

function FP_getObjectByID(id,o) {
var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id);
else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;
if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c)
for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el) return el; }
f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;
for(m=0; m<els.length; m++){ el=FP_getObjectByID(id,els[n]); if(el) return el; } }
return null;
}
// -->
</script>
<style>
v\:* { behavior: url(#default#VML) }
o\:* { behavior: url(#default#VML) }
.shape { behavior: url(#default#VML) }
</style>
<meta name="Microsoft Theme" content="journal 1000, default">
<!--[if gte mso 9]>
<xml><o:shapedefaults v:ext="edit" spidmax="1027"/>
</xml><![endif]-->
</head><body onload="FP_preloadImgs(/*url*/'button16F.jpg', /*url*/'button170.jpg', /*url*/'button179.jpg', /*url*/'button17A.jpg', /*url*/'button17F.jpg', /*url*/'button180.jpg', /*url*/'button188.jpg', /*url*/'button189.jpg', /*url*/'button19A.jpg', /*url*/'button19B.jpg', /*url*/'button1A6.jpg', /*url*/'button1A7.jpg', /*url*/'button1DC1.jpg', /*url*/'button1DD1.jpg', /*url*/'button1DF1.jpg', /*url*/'button1E4.jpg', /*url*/'button1E5.jpg', /*url*/'button1E6.jpg', /*url*/'button1DF.jpg', /*url*/'button1E0.jpg', /*url*/'button1E2.jpg', /*url*/'button1E3.jpg', /*url*/'button248.jpg', /*url*/'button249.jpg', /*url*/'button28F.jpg', /*url*/'button290.jpg', /*url*/'button2B0.jpg', /*url*/'button2B1.jpg'); dynAnimation()"><p align="left"><img border="0" src="VC_Just_Logo_Oval_No_Text-2_10-07-04.jpg" width="207" height="134"
<p align="left"> &nbsp;</p><p align="left">&nbsp;</p><p align="left">&nbsp;</p><p align="left">&nbsp;</p><p align="left">&nbsp;</p><p><!--[if gte vml 1]><v:shapetype id="_x0000_t202"
coordsize="21600,21600" o:spt="202" path="m,l,21600r21600,l21600,xe">
<v:stroke joinstyle="miter"/>
<v:path gradientshapeok="t" o:connecttype="rect"/>
</v:shapetype><v:shape id="_x0000_s1028" type="#_x0000_t202" alt="" style='position:absolute;
left:7.5pt;top:103.5pt;width:157.5pt;height:32.25pt;z-index:1' filled="f"
stroked="f">
<v:textbox>
<table cellspacing="0" cellpadding="0" width="100%" height="100%">

In Internet Explorer, I get an Error on Page as follows:

Line: 33
Char 692
Error: Object Expected
Code: 0
URL: http://www.vanderhawk.net[/url]

I apologize if this posting is too long. I am new to this and felt it would be better to include too much info as opposed to too little.

I noticed that this error would sometimes occur if I added animation to an element of my page. Other than that, I am lost.

Any help would be greatly appreciated!

Mat