Mostly harmless (corto) wrote,
Mostly harmless
corto

javascript

Ok...

REGARDING THE JAVA SCRIPT PROBLEM



[ :: this link :: ] will take you to a zip file with six java files .js).

1. scrolltextitsm1.js This script places a scrolling text box in a specific location on the screen. The file is read with a [javascript src= script] call inline with the html. I impliment it by off loading the first "var =content" to a seperate file for other reasons but I merged 'em for this explanation.

2. itsmCGI.js. This is one of five files used in making a DHTML menu. Sets parameters used in forming the menu.
3. itsmmenu_preview.js. This is one of five files used in making a DHTML menu. Enables sub menu pops to work.
4. itsmmenu_ns4.js. This is one of five files used in making a DHTML menu. An offloading of all the netscape elements of the DHTML menu.
5. itsmmenu_dom.js. This is one of five files used in making a DHTML menu. An offloading of all the Non-netscape elements of the DHTML menu <so basically the same file as the previous...)
6. itsmmenu_loader.js. This is one of five files used in making a DHTML menu.The script that gets the DHTML menu ball rolling.

To test this stuff;

Put the following above the "body" element in an default html page...
<script language="JavaScript1.2">var itsm_path = '';</script>
<script language="JavaScript1.2" src="itsmmenu_loader.js"></script>
<script language="JavaScript1.2" src="itsmmenu_preview.js"></script>

Then put the following anywhere inside the body...
<script language="JavaScript1.2">itsmDisplayMenu();</script>
<script language="JavaScript1.2">itsmCreateMenu();onload=itsmLoadMenu;</script>

That should take care of putting the menu on the page.

Now the problem is that when I add the following lines (that call the scrolling text window) the SUB MENU element on the menu STOPS OPENING. only the first menu item has a sub menu... and it simply stops working when the following is added AFTER the menu codes...


<script language="javascript1.2" src="scrolltextitsm1.js"></script>

NOTE: The "scrolling text" javascript... will work if you add it AFTER the menu code... but that one part of the menu will not.
If you put the scrolling text javascript call BEFORE the menu part... the scrolling window breaks and all the menu stuff works.


Special note: you will notice some weird ass variable names in the menu code... I swapped out all the "ns4" type variables and just added the second "first letter" (hence ns4 became nns4) just to isolate that the problem was not related to the Browser test functions and variables used there.

Also... I was able to isolate the problem (I think) to the last block of code in the text scrolling java script...
it begins with;
window.onload=function(){

"Isolate" in this instance means... I simply REMOVED the functions one at a time... saved the script and tried the page saying YES to the error prompt about "Do you want to keep processing scripts?" .... The sub menu does not stop working when that one block of code is removed. That may be totally senseless... but I'm just trolling in the dark here...
Subscribe

  • shiver

    You know that shiver you get through your shoulder blades and down your back when you feel cold. Maybe you’ve just left the restaurant and you’re…

  • selfie

    as I read and read and read about "Selfies"... I quietly say to myself... "um... yeah, tell me again how selfies are a new thing." lol. :)

  • Monday, February 17, 2014

    Hiya. :) Today was one of those “oh look… LJ is still there” days. Oh how I miss the old days when LJ was pretty much a playground filled with my…

  • Post a new comment

    Error

    default userpic

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 11 comments

  • shiver

    You know that shiver you get through your shoulder blades and down your back when you feel cold. Maybe you’ve just left the restaurant and you’re…

  • selfie

    as I read and read and read about "Selfies"... I quietly say to myself... "um... yeah, tell me again how selfies are a new thing." lol. :)

  • Monday, February 17, 2014

    Hiya. :) Today was one of those “oh look… LJ is still there” days. Oh how I miss the old days when LJ was pretty much a playground filled with my…