View Full Version : How to Concatenate javascript?

01-16-2007, 10:11 PM

Let's say I want to use AnyLink Drop Down Menu on an existing roll-over.
I saved the parts in the head as external CSS and javascript files. But, the image I need to have the drop-down menu come from has a javascript rollover there, already.

So, I have this code:

<a href="./Auto-Parts-Search.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('AutoParts','','./images/navbar/syds_auto-parts_navbar_ro.jpg',1)"><img src="files/syds_auto-parts_navbar.jpg" alt="Search Syd's Eastside Auto for Used Auto Parts or Used Truck Parts" name="AutoParts" id="AutoParts" border="0" height="31" width="111">

Now, how do I incorporate the code I need to call the drop-down menu?:

<a href="./Auto-Parts-Search.php" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu1, '150px')" onMouseout="delayhidemenu()"></a>

Obviously, I need a couple of functions/scripts to be run at once. In particular, both peices of code call onMouseOver and onMouseOut. How do I combine these?

Man, I have a tough time with JavaScript. I bought the Peachpit press visual start guide, but javascript code doesn't make much sense to me. It doesn't read well, look logical or make sense. HTML and CSS does, but then I run into this DHTML stuff. And DHTML is NOT CSS, but that's all I see on CSS sites.

I hate javascript. Can anyone point me to a book that will make sense of it for me? It seems I can't do in CSS what I need to (though I should be able to). But I need to master some kind of interactivity and apparently CSS fails this promise.