We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6726
    • 7,075 Posts
    I am sure this is a dumb question, but I failed to find the answer by googling...

    I have an upload form which is located down on a page and when the user submits the file(s) the page reloads and he is back on top of the page... using JS with onclick doesn’t seem to be a valid option...

    What do you use for this kind of thing ?

    Thanks smiley
      .: COO - Commerce Guys - Community Driven Innovation :.


      MODx est l'outil id
      • 36416
      • 589 Posts
      Quote from: davidm at Oct 28, 2008, 05:02 AM

      What do you use for this kind of thing ?

      Quick copy from eForm template that I’m working on right now:
      <a name="adform"></a>
      <p id="fm-intro">
       [+validationmessage+]
      </p>
      <form id="frmAd" action="[~[*id*]~]#adform" method="post" enctype="multipart/form-data">
      ...
      
        • 6726
        • 7,075 Posts
        Thanks Eol !

        Hmmm, did try this but it doesn’t work...
          .: COO - Commerce Guys - Community Driven Innovation :.


          MODx est l&#39;outil id
          • 36416
          • 589 Posts
          Quote from: davidm at Oct 28, 2008, 05:49 AM

          Hmmm, did try this but it doesn’t work...

          Hm, strange... which snippet, browser, caching parameters etc.?
            • 7231
            • 4,205 Posts
            make sure that the anchor is available. If it is the thank you page the entire form tpl will not be there so if the anchor is in the form template it will also be gone. try either including the anchor in the thankyou tpl or wrapping the eForm call in the anchor div.

              [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

              Something is happening here, but you don&#39;t know what it is.
              Do you, Mr. Jones? - [bob dylan]
              • 6726
              • 7,075 Posts
              In my case it’s not eForm but the FileUpload snippet
                .: COO - Commerce Guys - Community Driven Innovation :.


                MODx est l&#39;outil id
                • 36416
                • 589 Posts
                Quote from: davidm at Oct 28, 2008, 06:38 AM

                In my case it’s not eForm but the FileUpload snippet

                Hopefully there is HTML form involved somewhere (or my example isn’t going to work).
                  • 6726
                  • 7,075 Posts
                  I am going to check out why it doesn’t work if you’re sure about it...
                  Probably something I overlooked...
                    .: COO - Commerce Guys - Community Driven Innovation :.


                    MODx est l&#39;outil id