Web Analytics Made Easy -
StatCounter Resizing Pop Up Windows By Dragging Corner - CodingForum

Announcement

Collapse
No announcement yet.

Resizing Pop Up Windows By Dragging Corner

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Resizing Pop Up Windows By Dragging Corner

    Hi

    I have a page of links to pop up windows.
    Could someone please tell me what I need to change in the code so that the user can resize the window themselves, by dragging the corner?

    Thanks

    Paul


    html code is

    <a class="white" href="songs/arles.htm" onclick="return openWin(this.href,'theantelope','width=730,height=480,scrollbars=1,menubars=0,toolbars=0,directorie s=0,status=0');" target="_lyric">Arles</a><br>

  • #2
    Code:
    <a class="white" href="songs/arles.htm" onclick="return openWin(this.href,'theantelope','width=730,height=480,scrollbars=1,menubars=0,toolbars=0,directorie s=0,status=0,resize=yes');" target="_lyric">Arles</a><br>
    that should do the job.
    i'm only 12, gimme some slack

    Comment


    • #3
      resize=yes

      Great stuff. can't get more straightforward than that.

      Thanks Ian. You are a gem


      Paul

      Comment


      • #4
        my pleasure
        i'm only 12, gimme some slack

        Comment


        • #5
          I might have got too excited too soon. I've tried adding it to the code but it doesn't appear to be working. Is there anything else I need to do?

          The page is at www.jacksonline.plus.com/pjtest2/songs.htm

          Thanks

          Paul

          Comment


          • #6
            resizable either that or resizeable. I don't know how to spell
            Single Paradox
            My Site (Under construction)

            Not too bad for a 15 year old

            Comment


            • #7
              'Resizable=yes' - it is.

              Thanks SingleParadox. Great stuff


              Best wishes

              Paul

              Comment


              • #8
                (oops. nm)
                Why you should validate your code before asking for help...

                Comment


                • #9
                  what's that supposed to mean?
                  i'm only 12, gimme some slack

                  Comment


                  • #10
                    Feeling a bit self-conscious?

                    (Oops. Nevermind.)
                    I'd posted about the resize/resizable mistake, but (being still half asleep) hadn't noticed that I'd not scrolled the full length of the thread and seen that others had already posted a correction.
                    The 'oops' was referring to my own mistake, not yours.
                    I would have deleted my post had that option been available.
                    No biggie.
                    Why you should validate your code before asking for help...

                    Comment


                    • #11
                      Hi

                      I keep thinking I've got this sorted but I still keep coming across little hurdles.
                      The popup resizing thing works fine offline but on uploading the page to the web it doesn't seem to work.
                      So I'm still scratching my head really. Can any of you chaps help at all please?

                      Is there something amiss?

                      Cheers

                      Paul

                      www.jacksonline.plus.com/pjtest2/songs.htm

                      Comment


                      • #12
                        There is a space in directories and no comma before resizable.
                        Code:
                        'width=460,height=400,scrollbars=1,menubars=0,toolbars=0,[COLOR=Red]directorie s[/COLOR]=0,[COLOR=Red]status=0 resizable[/COLOR]=yes'
                        Glenn
                        vBulletin Mods That Rock!

                        Comment


                        • #13
                          Fwiw, you should consider using a re-usable external/embedded function, rather than bloating the markup with so much inline javascript.
                          Why you should validate your code before asking for help...

                          Comment


                          • #14
                            Hi

                            I noticed that about the missing comma etc and thought that might be the case.
                            But saving the file to my desktop offline as it is seems to work okay - but not when its uploaded. I will correct the errors though in case its only affected when it goes online or something. I've no idea really.

                            Bill, would you mind telling me more about the embedded function thing? Would that be something similar to what I have in the <head>?
                            <script type="text/javascript">
                            function openWin(u, t, f)
                            {
                            var w = window.open(u, t, f);
                            w.focus();
                            return false;
                            }
                            </script>

                            Could I add more into this from what I have in each link?

                            Thanks

                            Paul

                            Comment


                            • #15
                              You can simplify the calls to openWin function from all the links by having each window feature as parameter.
                              Code:
                              function openWin(u, t, w, h, sb, m, tb, d, s, r)
                              {
                                var w = window.open(u, t, 'width='+w+',height='+h+',scrollbars='+sb+',menubars='+m+',toolbars='+m+',directories='+d+',status='+s+',resizable='+r);
                                w.focus();
                                return false;
                              }
                              ...
                              <a class="white" href="songs/october.htm" onclick="return openWin(this.href, this.target, 490, 480, 1, 0, 0, 0, 0, 1);" target="_lyric">October</a>
                              But if all the links have almost the same window features, you only need to make those unique ones as function parameters and just hardcode common features in the function.
                              Glenn
                              vBulletin Mods That Rock!

                              Comment

                              Working...
                              X