Javascript Popups - Can anyone help me fancify them?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Donius

    Javascript Popups - Can anyone help me fancify them?

    Hello!

    I've been headhunting for a javascript popup that i saw once, that when
    it's called, pops open and grows from the center to its desired h and
    w. Does anyone have any idea where i could start on this one? Haven't
    found through googling or list searching.

    Thanks!
    -Brendan

  • Nigel Molesworth

    #2
    Re: Javascript Popups - Can anyone help me fancify them?

    On 27 Jun 2005 15:36:16 -0700, "Donius" <randomnameforf un@gmail.com>
    wrote:
    [color=blue]
    >pops open and grows from the center[/color]

    Are you trying to build the world's tackiest web site?


    --
    Nigel M

    Comment

    • Donius

      #3
      Re: Javascript Popups - Can anyone help me fancify them?

      Ha ha ha ha ha...yes! Exactly!

      No, but our client is stuck in the late nineties. She wants everything
      moving, everything blinking and noise coming up through her speakers.
      So instead of folding to *all* of her ridiculous whims, maybe if we do
      some small things, we could make her happy, and if we do things like
      this sparingly enough, then it could add to our site.

      Comment

      • Nigel Molesworth

        #4
        Re: Javascript Popups - Can anyone help me fancify them?

        On 28 Jun 2005 05:17:16 -0700, "Donius" <randomnameforf un@gmail.com>
        wrote:
        [color=blue]
        >She wants everything
        >moving, everything blinking and noise coming up through her speakers.[/color]

        <fx: shudder>

        I'd be inclined to tell her to get someone else to do it. Are you
        going to put your name on this site?

        If there's one thing that makes me leave a site, it's bloody noise!


        --
        Nigel M

        Comment

        • alu

          #5
          Re: Javascript Popups - Can anyone help me fancify them?


          "Donius" <randomnameforf un@gmail.com> wrote
          [color=blue]
          > No, but our client is stuck in the late nineties. She wants everything
          > moving, everything blinking and noise coming up through her speakers.
          > So instead of folding to *all* of her ridiculous whims, maybe if we do
          > some small things, we could make her happy, and if we do things like
          > this sparingly enough, then it could add to our site.[/color]


          I recall I have just such a tacky old script archived, um, somewhere -
          except the window starts in the top right & grows to the bottom left to
          accommodate content.
          If you're serious, I'll have a look for it.
          -alu


          Comment

          • Donius

            #6
            Re: Javascript Popups - Can anyone help me fancify them?

            That'd be wonderful! Yes, i am serious. :)

            Comment

            • alu

              #7
              Re: Javascript Popups - Can anyone help me fancify them?


              "Donius" <randomnameforf un@gmail.com> wrote[color=blue]
              > That'd be wonderful! Yes, i am serious. :)[/color]




              OK, for what it's worth, here ya go. Apologies for the long post.

              option #1, goes within popup:
              _______________ _______________ _______________ _______________ __

              var doneResize= 'false'

              function popupResize() {
              if (doneResize== 'false') {
              doneResize = 'true'
              imageWidth = (document.image s[0].width + 100)
              imageHeight = (document.image s[0].height + 100)
              var popupWidth = 320; var popupHeight = 360

              while ((popupWidth < imageWidth) || (popupHeight < imageHeight)) {
              self.resizeTo(p opupWidth , popupHeight); self.moveTo(scr een.availWidth -
              popupWidth - 5,5)
              if (popupWidth < imageWidth) {popupWidth = popupWidth + 10}
              if (popupHeight < imageHeight) {popupHeight = popupHeight + 10}
              }
              }
              }

              _______________ _______________ _______________ _______________ __

              option #2
              I found this in the same archive (doesn't look like mine, some IE-only
              filter references in there),
              might be more what you're after...... see form at the end for image
              attributes.

              _______________ _______________ _______________ _______________ __


              <html>
              <head>
              <meta http-equiv="content-type" content="text/html;charset=is o-8859-1">
              <title></title>
              </head>
              <body bgcolor="white" >
              <center>

              <script language="JavaS cript1.2" type="text/javascript">
              var winheight=100
              var winwidth=100
              var cat=null

              // pixels to resize by per step
              step=3;

              function catswindows(nam e,width,height, title)
              {

              if (!document.all)
              {
              if (!document.laye rs)
              {
              paramstp="heigh t="+height+",wi dth="+width+",t op=10"+
              ",left=10,scrol lbars=no,locati on=no"+
              ",directories=n o,status=no,men ubar=no,toolbar =no,resizable=n o"
              cat=window.open ("","cat",param stp);
              oldstr="<html>< title>"+title+" </title><body
              background="+na me+">"+"</b"+"ody></h"+"tml>";
              cat.document.wr ite(oldstr);
              if (cat.focus){cat .focus();}
              return;
              }
              else
              {
              LeftPosition=(s creen.width)?(s creen.width-width)/2:100;
              TopPosition=(sc reen.height)?(s creen.height-height)/2:100;
              paramstp="heigh t="+height+",wi dth="+width+",t op="+TopPositio n+
              ",left="+LeftPo sition+",scroll bars=no,locatio n=no"+
              ",directories=n o,status=no,men ubar=no,toolbar =no,resizable=n o"
              cat=window.open ("","cat",param stp);
              loadpos=height/2-40
              string="<html>< title>"+title+" </title><body bgcolor=black>< div
              id=loadintxt style='position :absolute;top:" +loadpos+"px'></div>"
              string1='<s'+'c ript>var
              animColorIndex= 0;colorArray=["#FFFFFF","#CCC CCC","#999999", "#666666","#333 33
              3","#000000","# 333333","#66666 6","#999999","# CCCCCC"];'
              string2='functi on
              textLooping(){i f(animColorInde x==10)animColor Index=0;documen t.loadintxt.doc u
              ment.open();'
              string3='docume nt.loadintxt.do cument.write("< center><font size=4
              face=Comic Sans MS
              color="+colorAr ray[animColorIndex]+"><b>Loading.. .</b></font></center>");doc
              ument.loadintxt .document.close ();'

              string4='animCo lorIndex++;};an imInterval=setI nterval("textLo oping()",200);</
              s'+'cript>'
              string5='<s'+'c ript language="jav'+ 'ascript1.2">'
              string6="functi on
              init(){document .catpic.visibil ity='show';clea rInterval(animI nterval);docume n
              t.loadintxt.vis ibility='hide'; };"
              string7="</s"+"cript>"
              string8="<div id=catpic
              style='position :absolute;left: 0px;top:0px;vis ibility:hidden' >"
              string9="<img src='"+name+"' width="+width+" height="+height +" border=0
              onload='init()' ></div></b"+"ody></h"+"tml>";
              cat.document.wr iteln(string);
              cat.document.wr iteln(string1);
              cat.document.wr iteln(string2);
              cat.document.wr iteln(string3);
              cat.document.wr iteln(string4);
              cat.document.wr iteln(string5);
              cat.document.wr iteln(string6);
              cat.document.wr iteln(string7);
              cat.document.wr iteln(string8);
              cat.document.wr iteln(string9);
              if(cat.focus){c at.focus();}
              return;
              }
              }
              LeftPosition=(s creen.width)?(s creen.width-width)/2:100;
              TopPosition=(sc reen.height)?(s creen.height-height)/2:100;
              paramstp="heigh t="+winheight+" ,width="+winwid th+",top="+TopP osition+
              ",left="+LeftPo sition+",scroll bars=no,locatio n=no"+
              ",directories=n o,status=no,men ubar=no,toolbar =no,resizable=n o"
              cat=window.open ("","cat",param stp);
              string="<html>< title>"+title+" </title><body topmargin=0 leftmargin=0
              bgcolor=black>"
              string1="<div id=loadintxt
              style='position :absolute;width :100%;top:45%;t ext-align:center;vi sibility:vis
              ible;font-family:Comic Sans
              MS;font-size:16px;font-weight:bold'>Lo ading...</div>"
              string2="<div id=errtxt
              style='position :absolute;width :100%;top:45%;t ext-align:center;vi sibility:vis
              ible;font-family:Comic Sans
              MS;font-size:16px;color :red;font-weight:bold;vis ibility:hidden' >ERROR!!!
              Please try again</div>"
              string3='<s'+'c ript>'+'var animColorIndex= 0;'+

              'colorArray=["#FFFFFF","#CCC CCC","#999999", "#666666","#333 333","#000000", "#3
              33333","#666666 ","#999999","#C CCCCC"];'+
              'function textLooping(){i f(animColorInde x==10)animColor Index=0;'+
              'loadintxt.styl e.color=colorAr ray[animColorIndex];'+
              'animColorIndex ++;}animInterva l=setInterval(" textLooping()", 200);'
              string4='functi on erroccur(){clea rInterval(animI nterval);'+
              "loadintxt.styl e.visibility='h idden';"+
              "errtxt.style.v isibility='visi ble';}"+'</s'+'cript>'
              string5='<s'+'c ript language="jav'+ 'ascript1.2">'+
              'function init(){clearInt erval(animInter val);'+
              "loadintxt.styl e.visibility='h idden';"+
              'fltr.filters.i tem(0).Apply(); fltr.filters.it em(0).Play();'+
              'fltr.style.vis ibility="visibl e";}'+'</s'+'cript>';
              string6='<img id="fltr"
              style="filter:B lendTrans(Durat ion=5);visibili ty:hidden" src="'+name+'"
              border=0'+
              ' width='+width+' height='+height +' onload="init()"
              onerror="errocc ur()">'+
              '</b'+'ody></h'+'tml>';
              cat.document.wr iteln(string);
              cat.document.wr iteln(string1);
              cat.document.wr iteln(string2);
              cat.document.wr iteln(string3);
              cat.document.wr iteln(string4);
              cat.document.wr iteln(string5);
              cat.document.wr iteln(string6);

              x = y = step
              while (x | y)
              {
              cat.resizeBy (x, y)
              if (cat.document.b ody.clientWidth >= width) x = 0
              if (cat.document.b ody.clientHeigh t >= height) y = 0
              }
              if(cat.focus){c at.focus();}
              }

              function CloseCatWin()
              {if(cat!=null && cat.open)cat.cl ose()}

              window.onfocus= CloseCatWin;
              </script>

              <p>
              <center>
              <form>
              <input type="button" tabindex="2" value="View Image"
              onclick="catswi ndows('image.jp g','400','450', 'title goes here'); return
              false" onfocus="this.b lur()">
              </form>
              </center>
              </center>
              </body>
              </html>


              Comment

              • ASM

                #8
                Re: Javascript Popups - Can anyone help me fancify them?

                Donius wrote:[color=blue]
                > Ha ha ha ha ha...yes! Exactly!
                >
                > No, but our client is stuck in the late nineties. She wants everything
                > moving, everything blinking and noise coming up through her speakers.[/color]

                give hers url we can try to do not come
                [color=blue]
                > So instead of folding to *all* of her ridiculous whims, maybe if we do
                > some small things, we could make her happy, and if we do things like
                > this sparingly enough, then it could add to our site.[/color]


                it is in french
                clic one of 3 1st yellow links (choice of an image)
                then
                clic one of 2 in 2nd line of yellow links (center or left-top origines)


                --
                Stephane Moriaux et son [moins] vieux Mac

                Comment

                • Donius

                  #9
                  Re: Javascript Popups - Can anyone help me fancify them?

                  Well, thanks to both of you! Those are fabulous for that, i was
                  looking for something simpler which i gave up and wrote on my own,
                  eventually. This is what i was more looking for...i can't get it to
                  open up in quite the right spot yet, for IE, FF, & Saf, but i'll work
                  on it.

                  Thanks so much! Sorry i didn't explain myself well enough!

                  function popWinGrow(new_ height,new_widt h) {
                  width = 100;
                  height= 100;

                  popWin= window.open('po pup.html','test ',
                  'width='+width+
                  ',height='+heig ht+
                  ',left='+((scre en.width/2)-(width/2))+
                  ',top='+((scree n.height/2)-(height/2)));
                  while(new_width > width || new_height > height){
                  if(new_width > width){
                  width = width+(width/7); }
                  if(new_height > height){
                  height = height+(height/7); }

                  popWin.resizeTo (width, height);
                  popWin.moveTo(( screen.width/2)-(width/2),
                  (screen.height/2)-(height/2));
                  }
                  }

                  Comment

                  Working...