September 19, 200520 yr I have a php script. This script takes a few variables via POST and performs an action, I would like to make a small page where this action is automaticly performed, since entering the form gets old and I don't want to use GET. Basically, I need a script that does, in the following order: Uses POST to provide a specific value for three different variables, which we can call "1", "2" and "3", without the need for an actual visible (well, it doesn't really matter if it's visible or not :P) form. Sends the visitor to the script which uses the POST-variables after a second or two. I have no idea how to do this and it would be awesome if someone could help me out. Hopefully I made some sense :)
September 19, 200520 yr Author Hmm, the variable thing was simpler than I thought. What I do need however is still a script that triggers the submit button after a second or two.
September 20, 200520 yr Author function onLoadAutoSubmit() { var form = document.getElementById("myForm"); setTimeout(form.submit, 2000); }
September 20, 200520 yr onload="onLoadAutoSubmit();" edit: and I would personally just use static reference to the form.. setTimeout(document.myForm.submit, 2000); i believe that should work. the submit of javascript on the javascript side for a long time :P
September 22, 200520 yr Tried both changes, still doesn't submit automaticly :/ any js errors in the js console?
September 30, 200520 yr Author Works great! I need to work out a few details, but that should do the trick. Thank you everyone :)
Create an account or sign in to comment