PDA

View Full Version : My canned script doesn't work?!?!?!


scooter_pt6
11-07-2002, 09:25 PM
Please tell me what "startup(4)" is and why it's giving me an error in my javascript. It is at the very bottom.

Thanks
___________________________________________________
<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">

var Link = new Array();

Link[0] = "0|Engine Repair & Overhaul";

Link[1] = "1|Standard Aero Ltd.|http://www.standardaero.com|";

Link[2] = "0|Aviation Parts Manufacturing";

Link[3] = "1|Dunlop Aviation|http://www.dunlop-aviation.co.uk|";

Link[4] = "1|Aero Equipment|http://www.ae-web.co.uk|"

Link[5] = "1|Dunlop Equipment|http://www.dunlop-equip.co.uk|"

Link[6] = "1|Serck Aviation|http://www.serck.co.uk|"

Link[7] = "1|Stewart-Warner South Wind|http://www.stewart-warner.com|"

Link[8] = "1|Dunlop Precision Rubber|http://www.dunlop-precision.co.uk|"

Link[9] = "0|Aviation Turbine Parts Supplier";

Link[10] = "1|Dunlop Aerospace Parts|http://www.dunlopaeroparts.com|";





startup(4);

</script>
<SCRIPT LANGUAGE="JavaScript">

beetle
11-07-2002, 10:33 PM
Well, I'm going to assume that startup is a function, but I can't tell you what it does, because it doesn't appear in the code you posted, which is EXACTLY why you are getting an error. The function just isn't there.

What is this supposed to be doing?

scooter_pt6
11-08-2002, 02:16 PM
The moron who posted this Script forgot to put the .js file to download that is necessary to work the script. However, the menu speed is waaaaayyyyy too slow. I changed the parameters in the .js file but it chugs on my PC at work. At home, it motors. WTF?

krycek
11-08-2002, 02:26 PM
Hmmm... moron, eh?

I would suggest that you might need to LEARN a bit of JS - at least so you can spot simple errors like that. Whoever wrote the code probably made a simple mistake in not including the file, but remember, they wrote that code and you are using it for free without having to do much at all.

If it was me who had written it, I would feel quite annoyed at your attitude.

As for the delay, I assume one of two things:

1. The PC you use at work might be slower.
2. If the script relies on timeouts, then the interval relies in turn upon the computer's OS. Off the top of my head, WinXP is < 40ms, ealier Windows are < 80ms, Linux is < 10ms and Mac < 20ms for the minimum timeout intervals they can process (according to the OS clock). Like I said, off the top of my head... I read an article about it a looooong time ago. You may well want to do a bit of research and adjust the interval accordingly.

::] krycek [::

EDIT: Try these links:

http://www.webreference.com/dhtml/column34/
http://www.webreference.com/dhtml/column28/

(After quickly scanning those articles I think my estimates were far off... never mind! :D)

scooter_pt6
11-08-2002, 02:35 PM
Thanks for the reply and as well for the life lesson. Maybe I incorrectly worded that because you obviously didn't understand. My comment should have been: Why would the website keep the script on without the file necessary to work it? And unfortunately, I DO have alot to do and can't spend all my time in front of a computer learning something that I have the ability to just use from someone else.

Have a pleasant day.

:)