5 Replies Latest reply on May 2, 2016 3:24 PM by Chuck Uebele

    AdobePopupHTML and relative path

    Vova_p Level 1

      Hi everyone!

      I write a HTML panel, and i have some problem here.

      In Configurator 4 we have a comands for open new HTML window:

      _Adobe.popupHTML(url[, width, height]) _AdobePopupHTML(url[, width, height])

      Discriprion says that i can use "relative path to an HTML file in the panel’s assets folder". But only absolute path works. Like this:

      _AdobePopupHTML('Z:/PSO/3D_Art/Textures/Scripts/AURORA/nations/uk/uk_amg.html', 400, 900)
      

      And if i try to use relative path, it will not work:

      _AdobePopupHTML('germany_amg.html', 400, 900)
      

      I've tried use path from assets folder of my HTML panel and it doesn't work too =(

      Who have used this comand yet and has a expirience?

        • 1. Re: AdobePopupHTML and relative path
          Chuck Uebele Adobe Community Professional & MVP

          A relative path uses dots to denote which folder:

           

          ./myFolder/myPage.html //current directory
          ../myFolder/myPage.html //parent directory
          
          • 2. Re: AdobePopupHTML and relative path
            Vova_p Level 1

            It does't work=(

            So, i have this structure:

            Untitled-1.jpg

            AURORA -- my work folder

            configurator - folder whith configurators work files (in the red square) and exported panel (AURORA folder with content- blue square)

            nations -- parent folder for folders whith HTML pages and in which  nations folder i have some pages like in the germany folder.

             

            So, if I on the germany_amg.html page what way i should use to go to germany height map.html?

             

            This ways doesn't work:

            ./germany_height_map.html

            ../germany_height_map.html

            germany_height_map.html

            ../../germany/germany_height_map.html

            ./../germany/germany_height_map.html

            • 3. Re: AdobePopupHTML and relative path
              Chuck Uebele Adobe Community Professional & MVP

              I think you need to find out where the current location is by creating an alert showing you what the current path is. It might be the location of you script or main html page. once you get that, then you can create a relative path.

              • 4. Re: AdobePopupHTML and relative path
                Vova_p Level 1

                I found the answer: relative path must be relative to the panel’s assets folder -- folder that i copyed to

                C:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit)\Plug-ins\Panels\\AURORA\content\AURORA.assets

                And if I want to use relative path like this "germany_height_map.html", I should put the page germany_height_map.html to the

                C:\Program Files\Adobe\Adobe Photoshop CS6 (64 Bit)\Plug-ins\Panels\\AURORA\content\

                Ha-ha. I should more attentive when read manual...

                • 5. Re: AdobePopupHTML and relative path
                  Chuck Uebele Adobe Community Professional & MVP

                  That's what I figured that is was something along those lines.