N/APosted on - 08/13/2011
I want to create a page (HTML/PHP) that loads an URL, in this URL there are a submit button that doesn't have a name but have an id ("u721957_1"). I want that when I load this page, automatically this submit button is pushed. I don't like to submit the form directly because there are some data in the button that I need, I tried this: document.getElementById('u721957_3').click() as a function in the onLoad of the body but it doesn't work (you have to note that I can't change the id of the button).
Any solution please??
You must change this code as:
Go ahead and change it.
But I have a better Idea for you. In this code specifying instruction about to onload function. You can use this code.
It will work for this function and automatically submit form when load into browser window. In this code you can also insert an option of frequently submit this form many times with defined intervals. You no need to insert your ID here because it based on single submission and will automatically pick your desire button to submit.
This may be out of your question, but you really don't need a button to put the data on the URL if you just want the button to be pressed automatically. You just need to put on the type attribute nothing.
But since you asked, I'll just answer the question.