7 Replies Latest reply on Dec 1, 2008 9:36 AM by bnther

    Brain is fried :(

    bnther Level 1
      I've been at it for too many hours this weekend and something super simple is kicking my ***!

      <div id="apDiv1" onclick="window.open='HomePage2.html'" target="_blank" style="cursor:pointer" >

      Why doesn't this work? window.location works just fine but I can NOT remember how to open the new page. I know that I'm missing something easy. I blame it on Sunday night programming!

      Thanks in advance.
        • 1. Re: Brain is fried :(
          Level 7
          Perhaps a link would help.

          --

          Walt


          "bnther" <webforumsuser@macromedia.com> wrote in message
          news:ggvc4a$e3o$1@forums.macromedia.com...
          > I've been at it for too many hours this weekend and something super simple
          > is
          > kicking my ***!
          >
          > <div id="apDiv1" onclick="window.open='HomePage2.html' target=_blank"
          > style="cursor:pointer" >
          >
          > Why doesn't this work? window.location works just fine but I can NOT
          > remember
          > how to open the new page. I know that I'm missing something easy. I
          > blame it
          > on Sunday night programming!
          >
          > Thanks in advance.
          >


          • 2. Re: Brain is fried :(
            Level 7
            Don't apply such things to a div tag....

            However, if you are determined to make this poor choice, try this -

            onclick="window.open('HomePage2.html')" target="_blank"
            style="cursor:pointer" >


            --
            Murray --- ICQ 71997575
            Adobe Community Expert
            (If you *MUST* email me, don't LAUGH when you do so!)
            ==================
            http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
            http://www.dwfaq.com - DW FAQs, Tutorials & Resources
            ==================


            "bnther" <webforumsuser@macromedia.com> wrote in message
            news:ggvc4a$e3o$1@forums.macromedia.com...
            > I've been at it for too many hours this weekend and something super simple
            > is
            > kicking my ***!
            >
            > <div id="apDiv1" onclick="window.open='HomePage2.html' target=_blank"
            > style="cursor:pointer" >
            >
            > Why doesn't this work? window.location works just fine but I can NOT
            > remember
            > how to open the new page. I know that I'm missing something easy. I
            > blame it
            > on Sunday night programming!
            >
            > Thanks in advance.
            >

            • 3. Re: Brain is fried :(
              bnther Level 1
              Thanks soo much for that. It worked like a charm. I associate ()'s with Java so I ignored what I found on Google. Just for the sake of knowing, why is doing this in <div> a bad thing? Does it cause conflict problems or something? Just plain bad form, maybe? Would you have put it in a table instead?

              Thanks again for the help.
              • 4. Re: Brain is fried :(
                Level 7
                "bnther" <webforumsuser@macromedia.com> wrote in message
                news:ggvg6v$ipd$1@forums.macromedia.com...
                > Thanks soo much for that. It worked like a charm. I associate ()'s with
                > Java
                > so I ignored what I found on Google. Just for the sake of knowing, why is
                > doing this in <div> a bad thing? Does it cause conflict problems or
                > something?
                > Just plain bad form, maybe? Would you have put it in a table instead?


                I would think it's bad to put on any block level element.... The a tag is
                specifically designated for links.
                --
                Tim G.
                http://www.pactumweb.com
                http://www.shortordersite.com

                Be smart: http://www.pactumweb.com/client/tips.php


                • 5. Re: Brain is fried :(
                  Level 7
                  That's the ticket.

                  --
                  Murray --- ICQ 71997575
                  Adobe Community Expert
                  (If you *MUST* email me, don't LAUGH when you do so!)
                  ==================
                  http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
                  http://www.dwfaq.com - DW FAQs, Tutorials & Resources
                  ==================


                  "Tim G" <webservicesNOSPAM@pactumgroup.com> wrote in message
                  news:ggvht1$km9$1@forums.macromedia.com...
                  > "bnther" <webforumsuser@macromedia.com> wrote in message
                  > news:ggvg6v$ipd$1@forums.macromedia.com...
                  >> Thanks soo much for that. It worked like a charm. I associate ()'s with
                  >> Java
                  >> so I ignored what I found on Google. Just for the sake of knowing, why
                  >> is
                  >> doing this in <div> a bad thing? Does it cause conflict problems or
                  >> something?
                  >> Just plain bad form, maybe? Would you have put it in a table instead?
                  >
                  >
                  > I would think it's bad to put on any block level element.... The a tag is
                  > specifically designated for links.
                  > --
                  > Tim G.
                  > http://www.pactumweb.com
                  > http://www.shortordersite.com
                  >
                  > Be smart: http://www.pactumweb.com/client/tips.php
                  >

                  • 6. Re: Brain is fried :(
                    Level 7
                    You mean javascript, not Java, right?

                    --
                    Murray --- ICQ 71997575
                    Adobe Community Expert
                    (If you *MUST* email me, don't LAUGH when you do so!)
                    ==================
                    http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
                    http://www.dwfaq.com - DW FAQs, Tutorials & Resources
                    ==================


                    "bnther" <webforumsuser@macromedia.com> wrote in message
                    news:ggvg6v$ipd$1@forums.macromedia.com...
                    > Thanks soo much for that. It worked like a charm. I associate ()'s with
                    > Java
                    > so I ignored what I found on Google. Just for the sake of knowing, why is
                    > doing this in <div> a bad thing? Does it cause conflict problems or
                    > something?
                    > Just plain bad form, maybe? Would you have put it in a table instead?
                    >
                    > Thanks again for the help.
                    >

                    • 7. Re: Brain is fried :(
                      bnther Level 1
                      Java script right. I stink at both of them so yeah, Javascript for the web page. I'm OK at OOP but it's not natural for me yet. Everything is going that way, even ActionScript, so I had better get on board :) I'll get there...eventually.