jquery question... a way to automatically submit a form and move to the next step? -
Actually, I have a process that is divided into 4 forms (thus, 4 urls), but I Wish the third person completely left I can not really get the code myself because it is a third party provider and not open-source. What I was hoping to do was to use jQuery to automatically fill out and submit the form, For the third stage, and it does so quickly / automatically, the page itself is really ignored ... is there something like this capable of doing?
So, here is a simple breakdown of the process ...
One step: http://sample.com/step1.aspx & Lt; Input type = "submit" name = "steponesubmit" value = "submit" /> & Lt; / Form & gt; Two steps: http://sample.com/step2.aspx & lt; Form name = "step 2" & gt; & Lt; Input type = "text" name = "steptwo" value = "" /> & Lt; Input type = "submit" name = "steptwosubmit" value = "submit" /> & Lt; / Form & gt; Step three: http://sample.com/step3.aspx (This is what I want to fill myself and submit ... Basically, I want to duplicate the user by pressing the "consent" button) & lt; Form name = "step 3" & gt; & Lt; Input type = "submit" name = "stepthreeagree" value = "agree" /> & Lt; Input type = "submit" name = "stepthreedisagree" value = "disagree" /> & Lt; / Form & gt; Step Four: http://sample.com/step4.aspx & lt; Form name = "step 4" & gt; & Lt; Input type = "text" name = "stepfour" value = "" /> & Lt; Input type = "submit" name = "stepfoursubmit" value = "submit" /> & Lt; / Form & gt;
You can do jQuery ('input [name = stepthreeagree]') Are there. Triggers ('Clicks').
If Form DOM is available.
Or you can try to post / get to the place with the proper data. IE.pdf ('blahblah.html', {stepthreeagree: 'Agree'})
Many times though, these multi-step forms Daisy Chain your data (either through sessions or hidden input) so this solution can be insufficient.
Just a comment: It seems as if you are doing some sketches here, there is a good theoretical question, but why are you trying to bypass someone's compromise form?
Sarfraz: Multiple submit buttons are valid. What is clicked is the same as the value of which is presented. Not sure whether this is specific or is the case for PHP.
Comments
Post a Comment