Results 1 to 9 of 9
  1. #1
    KTYorke
    Guest

    JavaScript code working?

    OK, here's my dilemma. I went to Javascript.com to look for an effect I wanted to play with for my web page. I found mainly what I want to do here: http://javascript.internet.com/navigation/...-down-menu.html

    All well and good. However, when I copy the code as directed into a test page, I can't get even the generic to show up. I can see the sample on the original page, so why can't I see it when I try to save it to my hard drive? I would think that if the problem was that I didn't have Java enabled then I couldn't see it anywhere.

    As far as I can see, there's nothing blatantly wrong with the code and I even saved the original page with the example on it to my desktop to see if when I opened it it would work... it didn't. This leads me to believe that it's not the fault of the code, or me copying it wrong. Can anyone shed some light on this for me?

    thanks a ton
    have fun

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: JavaScript code working?

    Hi KT,

    On first glance, the code references a .js file: sliding_menu.js.
    Do you happen to have that file? If so, do you have it properly referenced? The code will not work without the code in the JS file.

    The example page doesn't appear to have any way to download the file. Of course, you could possibly open your Temporary Internet Files folder and find it there...(assuming the example they provided actually uses the file).

    Please post back with your findings... I'm curious about this one.

    (By the way - is the effect you're looking for similar to this: http://JohnstonData.com/BUMusic - mouse over the menu names at the top. Don't worry - they don't do anything yet. This is just a one-page demo for a potential client.)

  3. #3
    KTYorke
    Guest

    Re: JavaScript code working?

    I knew that looked suspicious! grrr... OK I'll have a look tonight and figure it out (lunch break is over <img src=/S/wink.gif border=0 alt=wink width=15 height=15>) It upsets me that they didn't mention it and normally they're pretty good about giving you EVERYTHING you need to make something work. I guess that's what had me so confused.

    RE your site yes, that's what I want... sort of... Mine is a side navigation (see my sig) and I'm looking to get rid of the buttons on the side and replace it with text. The effect though would be a combination of yours and the script I'm looking at. For one, the one I'm looking at is vertical... however I was also going to incorporate the automatic drop-down when moused over from yours.

    Thinking about it some more... I think that .js file may be referring back to another script called the sliding menu... but I'm not sure what part of it. Again, I'm surprised they didn't either write it up in there or at least mention that you needed that piece... I'll let you know what I find out tonight.
    have fun

  4. #4
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: JavaScript code working?

    The example of mine that you saw is not exactly something I can take credit for writing from scratch. I used the "Pop-up Menu" feature in Macromedia's Fireworks.

    It has quite a few options for customizing this type of DHTML - even opening horizontally. If you have Fireworks, give it a look-see. If not, and you're interested, you can download a 30-day evaluation copy from Macromedia's Download site.

    As far as I can tell, this works in all 4.0 and higher browsers. It may work with some 3.0 browsers, although I doubt many people will still have those around. (<soapbox>My thinking is that if anyone using a 3.0 or non-script browser has problems with my site, they'll also have problems with millions of other sites. Therefore it's their responsibility to upgrade rather than my responsibility to write "older" code.</soapbox>)

  5. #5
    KTYorke
    Guest

    Re: JavaScript code working?

    OK, I got the sliding_menu.js from the original author of the script at http://www.scriptbreaker.com/examples/sliding_menu.asp. I guess Javascriptsource forgot about it. Oh well, I'm glad they put the original contributor information in with their scripts!

    I think I have an older version of fireworks somewhere at the house because I seem to remember Mike playing with it and him telling me it was pretty easy to use and figure out. I do have a version here at work but I've never used it. I'll look into it though. I do have a question about load time... would the DHTML or javascript be quicker? I'm just getting my feet wet with all this fancy stuff... I'm merely at the lifting and analyzing stage <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    I completely agree with you about the older browser issue!! Amen!! Thanks for everything Mark! I knew you'd be able to help!

    have fun

  6. #6
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: JavaScript code working?

    Great! I'm glad you got that .JS file...

    The output from the Fireworks menu generator is actually DHTML/Javascript. The script file behind the page is kinda big - 31Kb, but it's only a 1-time download.

    Let me know when you've gotten your page up. I'd love to see it! <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

  7. #7
    KTYorke
    Guest

    Re: JavaScript code working?

    I'm still tweaking the links and things... but you can see the result of the javascript up on the site now. Click the link in my sig. I'm slowly but surely rearranging my directories and folders and things so it's easier for me to keep track of everything. <img src=/S/bananas.gif border=0 alt=bananas width=33 height=35>
    Thanks for all the help!
    have fun

  8. #8
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: JavaScript code working?

    It looks great! Is it going to "drop down" when the user mouses over it - or just as the page loads?

    (I've also found myself rearranging files and folders AFTER putting a site up. It's a pain! It makes me wish I had taken more care to plan the structure before starting... It's all about learning the hard way. <img src=/S/stupidme.gif border=0 alt=stupidme width=30 height=30>)

  9. #9
    KTYorke
    Guest

    Re: JavaScript code working?

    I had good intentions when I started and it was pretty well put together at first... then more and more stuff was added and well, now I have to move everything around again. <img src=/S/sigh.gif border=0 alt=sigh width=15 height=15>

    Thank you! <img src=/S/blush.gif border=0 alt=blush width=15 height=15> I'm still thinking about the mouse over for now I'm not sure if I want to or not... I figured I'd stare at it for a few days and see. I have set three of the categories to drop-down automatically when the page loads. I was going to have them all closed when it started but I uploaded the convenient version I was working on at home... one where I didn't have to click more times than I needed to see if a page was working... I'll probably change that back when I get home tonight.

    have fun

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •