sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [Solved] Uploading not obviously related to Sketchup

    Scheduled Pinned Locked Moved Developers' Forum
    15 Posts 2 Posters 570 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • thomthomT Offline
      thomthom
      last edited by

      @chrisglasier said:

      The thing about a direct link to a php file was that it is opened in the browser - that's the part I really don't get ... or want.

      As you're doing it now you're directing the form to a JS - I'm just not sure if form file uploads works then. I'm suggesting trying without the wrapper just to verify that everything else is working. That way we know for sure if it's the JS wrapper interfering or not.

      Thomas Thomassen — SketchUp Monkey & Coding addict
      List of my plugins and link to the CookieWare fund

      1 Reply Last reply Reply Quote 0
      • chrisglasierC Offline
        chrisglasier
        last edited by

        Yes I can make it work with a php file. I used a history.back[-1] in an embedded js script. That was OK but then I could not call the js that parses the json file and either reports a failure or incorporates the new file contents.

        With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

        1 Reply Last reply Reply Quote 0
        • thomthomT Offline
          thomthom
          last edited by

          So it sounds like it's the JS wrapper that can't be the target for file POSTs. I'm completely unfamiliar with that wrapper so I can't help much there.

          Can you avoid the use of history.back[-1] ?

          Thomas Thomassen — SketchUp Monkey & Coding addict
          List of my plugins and link to the CookieWare fund

          1 Reply Last reply Reply Quote 0
          • chrisglasierC Offline
            chrisglasier
            last edited by

            @thomthom said:

            So it sounds like it's the JS wrapper that can't be the target for file POSTs. I'm completely unfamiliar with that wrapper so I can't help much there.

            Can you avoid the use of history.back[-1] ?

            That's what I want. Am I right that action = "xxx.php" has to open that file in the browser? I think this is what I don't understand. And I am quite happy to lose the js wrapper (I didn't know it was one!)

            Thanks ... again

            With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

            1 Reply Last reply Reply Quote 0
            • thomthomT Offline
              thomthom
              last edited by

              A form POST goes to another file - the file you put in action="" - which in your above example pointed to a javacript ( action="javascript:phpOwnerFile();"). And that's the reason it didn't work because a POST was never sent.

              Your PHP snipped needs to be the target of action. And that will cause the page to navigate.

              Thomas Thomassen — SketchUp Monkey & Coding addict
              List of my plugins and link to the CookieWare fund

              1 Reply Last reply Reply Quote 0
              • chrisglasierC Offline
                chrisglasier
                last edited by

                @thomthom said:

                ...

                Your PHP snipped needs to be the target of action. And that will cause the page to navigate.

                Perhaps I should open a popup window for all this but I would prefer not to if there is another solution. I am just finishing off a mock version for my site. If you have time later perhaps you would have a look, click on owner and get a better idea of what I am trying to achieve.

                Thanks.

                With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

                1 Reply Last reply Reply Quote 0
                • thomthomT Offline
                  thomthom
                  last edited by

                  You could try to route the action to an hidden iframe. Similar to what this guy is doing: http://www.ajaxf1.com/tutorial/ajax-file-upload-tutorial.html

                  Thomas Thomassen — SketchUp Monkey & Coding addict
                  List of my plugins and link to the CookieWare fund

                  1 Reply Last reply Reply Quote 0
                  • chrisglasierC Offline
                    chrisglasier
                    last edited by

                    @thomthom said:

                    You could try to route the action to an hidden iframe. Similar to what this guy is doing: http://www.ajaxf1.com/tutorial/ajax-file-upload-tutorial.html

                    Thanks I will have a go with that.

                    Meanwhile I've uploaded the files to the site.

                    With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

                    1 Reply Last reply Reply Quote 0
                    • chrisglasierC Offline
                      chrisglasier
                      last edited by

                      First read through that seems perfect. I think I even understand it! Will try out tomorrow.

                      Many thanks

                      With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

                      1 Reply Last reply Reply Quote 0
                      • chrisglasierC Offline
                        chrisglasier
                        last edited by

                        Yes it works just fine.

                        Soon people who visit my site will be able to make and save an "ownerfile". When they return they can upload the file to work with all the named links, keys, functions, value options and config settings previously set. This will also be extended to upload shared project or activity files (later including Sketchup of course).

                        This is why the uploading business is so important in this context and why your pointer was much appreciated.

                        Many thanks,

                        Chris

                        With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post
                        Buy SketchPlus
                        Buy SUbD
                        Buy WrapR
                        Buy eBook
                        Buy Modelur
                        Buy Vertex Tools
                        Buy SketchCuisine
                        Buy FormFonts

                        Advertisement