Click to See Complete Forum and Search --> : help please


nalizad
08-16-2003, 11:37 PM
please help
I use a javascript from javascript.internet.com/navigation/slide-down-menu.html but it has an error!(object expected!)
-------------------------------------------------------------------
<html dir="rtl">

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
<title>Free JavaScripts provided by The JavaScript Source</title>
<meta name="Microsoft Theme" content="none">
</head>

<body>

<!-- ONE STEP TO INSTALL SLIDE DOWN MENU:



1. Copy the coding into the BODY of your HTML document -->



<!-- STEP ONE: Paste this code into the BODY of your HTML document -->



<BODY>



<!-- This script and many more are available free online at -->

<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Original: ScriptBreaker -->

<!-- Web Site: http://www.ScriptBreaker.com -->





<SCRIPT LANGUAGE="JavaScript">

function goToURL() { history.go(-1); }

</script>



<style>

.menu

{

position:relative;

background-color:gold;

border:1px solid darkblue;

width:150;

font-size:11px;

font-family:verdana;

font:bold;

position:absolute;

cursor:se-resize;

}

.item_panel

{

width:150;

border-left:1px solid darkblue;

border-right:1px solid darkblue;

clip:rect(0,150,0,0);

position:absolute;



}

.item_panel a

{

text-decoration:none;

color:black;

cursor:hand;

}

.item

{

background-color:lightyellow;

width:148;

font-size:10px;

font-family:verdana;



}

</style>



<script language="JavaScript" src="sliding_menu.js"></script>

<center>

<table width=150><tr><td>

<script language="JavaScript">

//Link[nr] = "position [0 is menu/1 is item],Link name,url,target (blank|top|frame_name)"

var Link = new Array();

Link[0] = "0|Home";

Link[1] = "1|Home|http://www.javascriptsource.com|";

Link[2] = "1|More Scripts|http://www.javascript.com|";

Link[3] = "1|Contact|http://www.javascriptsource.com/contact-us.html|";

Link[4] = "1|Traffic|http://www.thecounter.com|";

Link[5] = "0|Access";

Link[6] = "1|Login|Login.asp|";

Link[7] = "1|Logout|Logout.asp|"

Link[8] = "0|Scripts";

Link[9] = "1|Asp|http://www.javascriptsource.com|";

Link[10] = "1|JavaScript|http://www.javascriptsource.com|";

Link[11] = "0|Links";

Link[12] = "1|JavaScript sites|http://www.javascripts.com|blank";

startup(4);


</script>







<p><center>

<font face="arial, helvetica" size"-2">Free JavaScripts provided<br>

by <a href="http://javascriptsource.com">The JavaScript Source</a></font>

</center><p>



<!-- Script Size: 2.13 KB --></body>

</html>
----------------------------------------------------------------------------------------------------------------------------------------
it has error Object Expected! in line 164 char 3

xataku_nakusute
08-17-2003, 12:03 AM
simply becuz
<script type="text/javascript" src="sliding_menu.js"></script>
that right there is referring to an external .js file that you do not possess.

i think javascript.internet.com made a lil mistake there

also, for all of our browsers sake, make language="JavaScript" type="text/javascript instead and also, change <style> to <style type="text/css">


hope thats all

nalizad
08-17-2003, 01:47 AM
Dear xataku_nakusute

thank you for your help but error is also
object expected! in line 163
-------------------------------------------------------------------
<html dir="rtl">

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
<title>Free JavaScripts provided by The JavaScript Source</title>
<meta name="Microsoft Theme" content="none">
</head>

<body>

<!-- ONE STEP TO INSTALL SLIDE DOWN MENU:



1. Copy the coding into the BODY of your HTML document -->



<!-- STEP ONE: Paste this code into the BODY of your HTML document -->



<BODY>



<!-- This script and many more are available free online at -->

<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Original: ScriptBreaker -->

<!-- Web Site: http://www.ScriptBreaker.com -->





<SCRIPT LANGUAGE="JavaScript" type="text/javascript">

function goToURL() { history.go(-1); }

</script>


<style type="text/css">

.menu

{

position:relative;

background-color:gold;

border:1px solid darkblue;

width:150;

font-size:11px;

font-family:verdana;

font:bold;

position:absolute;

cursor:se-resize;

}

.item_panel

{

width:150;

border-left:1px solid darkblue;

border-right:1px solid darkblue;

clip:rect(0,150,0,0);

position:absolute;



}

.item_panel a

{

text-decoration:none;

color:black;

cursor:hand;

}

.item

{

background-color:lightyellow;

width:148;

font-size:10px;

font-family:verdana;



}

</style>



<script language="JavaScript" type="text/javascript" src="sliding_menu.js"></script>

<center>

<table width=150><tr><td>

<script language="JavaScript" type="text/javascript">

//Link[nr] = "position [0 is menu/1 is item],Link name,url,target (blank|top|frame_name)"

var Link = new Array();

Link[0] = "0|Home";

Link[1] = "1|Home|http://www.javascriptsource.com|";

Link[2] = "1|More Scripts|http://www.javascript.com|";

Link[3] = "1|Contact|http://www.javascriptsource.com/contact-us.html|";

Link[4] = "1|Traffic|http://www.thecounter.com|";

Link[5] = "0|Access";

Link[6] = "1|Login|Login.asp|";

Link[7] = "1|Logout|Logout.asp|"

Link[8] = "0|Scripts";

Link[9] = "1|Asp|http://www.javascriptsource.com|";

Link[10] = "1|JavaScript|http://www.javascriptsource.com|";

Link[11] = "0|Links";

Link[12] = "1|JavaScript sites|http://www.javascripts.com|blank";

startup(4);


</script>







<p><center>

<font face="arial, helvetica" size"-2">Free JavaScripts provided<br>

by <a href="http://javascriptsource.com">The JavaScript Source</a></font>

</center><p>



<!-- Script Size: 2.13 KB --></body>

</html>
----------------------------------------------:confused:

Khalid Ali
08-17-2003, 02:06 AM
looks like your code is missing a function

startup(4);


make usre it is present in the code second..Do you have the this file its beeing imported in this page

<script language="JavaScript" type="text/javascript" src="sliding_menu.js"></script>

nalizad
08-17-2003, 02:18 AM
thanks Khalid Ali
but I have start up (4)
in my code
:confused: :confused:
and get error!
Moderators Note

You did not need to post this message in a new thread,since its the continuation of the previous one.
http://forums.webdeveloper.com/showthread.php?s=&postid=81921#post81921

Khalid Ali
08-17-2003, 08:11 AM
Yes you do have the startup(4).howeveer you do not have(mostlikely) this file in your path
"sliding_menu.js"

locate the code below in our code and see which file I just referred to. and then make sure its there.

<script language="JavaScript" type="text/javascript" src="sliding_menu.js"></script>

pyro
08-17-2003, 09:34 AM
Here's the link to that file: http://javascript.internet.com/navigation/sliding_menu.js