6 Replies Latest reply on May 10, 2009 7:14 PM by Levsky

    javascript use ..

    Levsky

      Hi

      Here is the issue.I decided to use JavaScript to create popup window and I need to help again

       

      here is a scrip i use for pop up form assigned to a button

       

      btn_txt.onRelease = function() {
      getURL ("javascript:NewWindow=window.open( ../pages/lev_att.htm , txtWin  , width=600,height=800,left=20,top=40,toolbar=No,location=No,scrollbars=No,status=No,resiza ble=No,fullscreen=No );NewWindow.focus(); void(0);");
      };

      it do not gave me errors but it do not work.

       

      Have any one have idea why?

       

       

      or any suggestions...

       

      Thanx in advance

       

      Lev

        • 1. Re: javascript use ..
          Ned Murphy Adobe Community Professional & MVP

          Compare your code to the following example taken from a Google search (http://www.flash-db.com/PopUp/JavaScriptPopUp.php?page=2).  The first thing I notice is you are not quoting (single quotes) some things:

           

          getURL ("javascript:NewWindow=window.open('ShowPopup.php','newWin','width=400,height=300,left=0,top=0,
          toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No');  NewWindow.focus();
          void(0);");

          1 person found this helpful
          • 2. Re: javascript use ..
            Levsky Level 1

            I can see what r u talking about and i had made canges however, i can not get it to work

            here how it is looking now:

            btn_txt.onRelease = function() {
            getURL ("javascript:NewWindow=window.open( '../pages/lev_att.htm' , 'txtWin'  ,'width=600,height=800,left=20,top=40,toolbar=No,location=No,scrollbars=No,status=No,resi zable=No,fullscreen=No' );NewWindow.focus(); void(0);'");
            };

            I still can here a click but form is not poping up.

             

            If i would use just actionscript  and do this way

             

            btn_txt.onRelease = function() {
            getURL("../pages/lev_att.htm","_blank");
            };

            it is ok but it openning up ful window and I need to have a pop up 600 X 800 so I am lost.

            I to google and went through several scripts...

            • 3. Re: javascript use ..
              robdillon Most Valuable Participant

              At the end of your getURL function, you have a single quote and a double quote, make it just a double quote. You may have a problem with the path to your new html file, put in the full url to be sure that the path is not the problem.

               

              If you are using a browser that has reporting capabilities, like Firefox, open the Error Console to see if there are any errors reported when this getURL call is made.

              1 person found this helpful
              • 4. Re: javascript use ..
                Levsky Level 1

                Thanx

                I was a greate idea ( why did i think of it)

                Code was SLYPPY writen spaces etc

                I run on firefox and it gave me all ther errors I just missed...

                I have fixe the errors and it is OK

                Tahnk you all for your imput

                 

                U see a little  from every one and problem is resolved

                 

                Thanx

                 

                Lev

                • 5. Re: javascript use ..
                  Ned Murphy Adobe Community Professional & MVP

                  It's good to hear that you got it working.

                  • 6. Re: javascript use ..
                    Levsky Level 1

                    Thank you Ned

                    I an presistant one

                    I will search until get the good results

                    I build my business on this proncpal

                     

                     

                    And I belive on making good friends on the way

                    My father REST his SOL use to say u don need $1000 just 10 friesnds

                    THey r more important maney alway can be made..

                     

                    Thanx

                     

                    Lev