Is there a better/shorter way to accomplish this?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • CroCrew
    Recognized Expert Contributor
    • Jan 2008
    • 564

    #16
    can you back end this with a database? It would be better. If you can then I could give you an example on how to do this. Mide you my examples will be done in asp or asp.net with SQL or Access as the database.

    Comment

    • Death Slaught
      Top Contributor
      • Aug 2007
      • 1137

      #17
      YAY! Something I understand thanks acoder, and gits.


      I'll post the finished product, it should only take me 2 days with school and all.

      Thanks, Death

      Comment

      • Death Slaught
        Top Contributor
        • Aug 2007
        • 1137

        #18
        Originally posted by CroCrew
        can you back end this with a database? It would be better. If you can then I could give you an example on how to do this. Mide you my examples will be done in asp or asp.net with SQL or Access as the database.
        I could, but I don't really feal up to it. Besides dealing with a server slows it down a little. Furthermore, I'm in the middle of learning C++, and not ready to go after another langauge yet. You will see me eventually because I aim to learn every langauge I can.

        Thanks, Death

        Comment

        • acoder
          Recognized Expert MVP
          • Nov 2006
          • 16032

          #19
          Originally posted by Death Slaught
          I'll post the finished product, it should only take me 2 days with school and all.
          Good luck!

          Comment

          • Death Slaught
            Top Contributor
            • Aug 2007
            • 1137

            #20
            Originally posted by acoder
            Good luck!
            Thanks I would have had it finished tonight but it's really ironic that when I have something I want to do, my english teacher gives us a 10 page essay to write on a 132 page book.

            ^_^ I'll have it finished soon then I get to have some fun :)

            Thanks, Death

            Comment

            • Death Slaught
              Top Contributor
              • Aug 2007
              • 1137

              #21
              Well I'm getting there but I've hit a snag. When the name of the band, album, or song reaches a certain length it jumps down to the next line making each word on its own line. I originaly wanted the drop down menus to be in a vertical line with about 36px of space inbetween each one, but now I need them to be going straight down in a horizontal line.

              Here's the JavaScript used to make the menu drop down (at least I think that's what does it).

              [CODE=javascript]
              function navMenuExp(){ //v1.1.0.2 by PVII-www.projectseve n.com
              if(navigator.ap pVersion.indexO f("MSIE")==-1){return;}
              var i,k,g,lg,r=/\s*p7hvr/,nn='',c,cs='p7 hvr',bv='navMen ubar';
              for(i=0;i<10;i+ +){g=document.g etElementById(b v+nn);if(g){
              lg=g.getElement sByTagName("LI" );if(lg){for(k= 0;k<lg.length;k ++){
              lg[k].onmouseover=fu nction(){c=this .className;cl=( c)?c+' '+cs:cs;
              this.className= cl;};lg[k].onmouseout=fun ction(){c=this. className;
              this.className= (c)?c.replace(r ,''):'';};}}}nn =i+1;}
              }
              [/CODE]

              This makes the menu drop straight down. I want to make it 'drop' to the right and then down. If this doesn't make any sense (wich it doesn't much to me when I think about it) I'm looking for an example.

              The first attachment is what it looks like now. The second is what I want it to look like.

              Thanks, Death

              Comment

              • acoder
                Recognized Expert MVP
                • Nov 2006
                • 16032

                #22
                Originally posted by Death Slaught
                The first attachment is what it looks like now. The second is what I want it to look like.
                Where are the attachments?

                Comment

                • Death Slaught
                  Top Contributor
                  • Aug 2007
                  • 1137

                  #23
                  Originally posted by acoder
                  Where are the attachments?
                  Yeah really sorry about that. I had them uploaded but the editor had an error so I couldn't save it, and my dad was screaming at me already to get off so I couldn't upload them again.

                  Here they are.

                  ^_^ Thanks, Death

                  Comment

                  • acoder
                    Recognized Expert MVP
                    • Nov 2006
                    • 16032

                    #24
                    Originally posted by Death Slaught
                    Yeah really sorry about that. I had them uploaded but the editor had an error so I couldn't save it, and my dad was screaming at me already to get off so I couldn't upload them again.
                    LOL.

                    I thought the attachments would be images that I could have a look at.

                    Can you just show the relevant code instead if it's not too much. The code in the earlier post would only work in IE because if the navigator string doesn't have MSIE in it, it just returns.

                    Comment

                    • Death Slaught
                      Top Contributor
                      • Aug 2007
                      • 1137

                      #25
                      Originally posted by acoder
                      LOL.

                      I thought the attachments would be images that I could have a look at.

                      Can you just show the relevant code instead if it's not too much. The code in the earlier post would only work in IE because if the navigator string doesn't have MSIE in it, it just returns.

                      Sorry, I thought it would be easier if you had all the code to tamper with.

                      I never thought i'de be saying this, but i'm not looking for cross-browser compatability. If it only works in IE (which it needs to). Then I don't care.

                      I can't find any sites that have the type of navagation i'm looking for so that makes it difficult to explain/show you what i'm trying to accomplish. I think I may have another solution but I still would like to know how to change around the drop down menu.

                      ^_^ Oh well, Death

                      Comment

                      • acoder
                        Recognized Expert MVP
                        • Nov 2006
                        • 16032

                        #26
                        Originally posted by Death Slaught
                        Sorry, I thought it would be easier if you had all the code to tamper with.
                        True, I may do if I have the time to look at it.

                        Originally posted by Death
                        I never thought i'de be saying this, but i'm not looking for cross-browser compatability. If it only works in IE (which it needs to). Then I don't care.
                        Why would that be (out of curiosity)?

                        Comment

                        • Death Slaught
                          Top Contributor
                          • Aug 2007
                          • 1137

                          #27
                          I'd be glad to answer. There's only going to be about 20 users that will ever be on my site, and they will all be using IE so there's is no reason to have the site cross-browser compatable.

                          ^_^ Thanks, Death

                          Comment

                          • acoder
                            Recognized Expert MVP
                            • Nov 2006
                            • 16032

                            #28
                            Fair enough, but there's no harm in keeping the good habit!

                            Comment

                            • Death Slaught
                              Top Contributor
                              • Aug 2007
                              • 1137

                              #29
                              Sup, i've been working on the site for the music player to go into (because i'm not done with the musicp layer yet). And I was just curious what the heck does that code below do exactly? I understand that it shows the menu but wouldn't it just be easier to do something like this?

                              [HTML]
                              <div id="nav">
                              <ul>
                              <li>
                              <a href="#" class="trigger" onmouseover=sho w('list');">Lin k</a>
                              <ul>
                              <li id="list" onmouseout=hide ('list');">
                              Links or Text
                              </li>
                              </ul>
                              </li>
                              </ul>
                              </div>
                              [/HTML]

                              [CODE=javascript] function show(show) {
                              document.getEle mentById(show). display="block" ;
                              }

                              function hide(hide) {
                              document.getEle mentById(hide). display="none;
                              }
                              [/CODE]

                              And this basicly gives you the same effect (but with out all the special decorations).

                              ^_^ Thanks, Death

                              Comment

                              • acoder
                                Recognized Expert MVP
                                • Nov 2006
                                • 16032

                                #30
                                Originally posted by Death Slaught
                                And I was just curious what the heck does that code below do exactly? I understand that it shows the menu but wouldn't it just be easier to do something like this?
                                I assume you mean the code in post #21. That code is unobtrusive - no need for inline JavaScript code, though I don't like how it's all squashed up. If you indent and space out the code, it'd be easier to follow.

                                Comment

                                Working...