Forum Moderators: open
Of course I want to automate that with Javascript, but I can't change the page on the server. I tried to do it this way:
- I copy the page to my local disk. Relative URLs are changed in absolute.
- A cookie saves a counter to know which checkboxes have been processed yet.
- Another JS function "checks" the following 15 boxes and submit the page.
- And here is where the problem shows up. In the form tag, the action attribute shows the URL to a perl script on the server. This script shows a new page, mentioning that the 15 lines are processed (kind of thank you page). I'd like to submit and process those items, but then return to the original page, where an automatic refresh after 10 minutes would continue with the next 15 items (cookies and checking functions...).
Does anyone have any experience with this? I know it's not something you use for a own-managed website, for sure there you have at least access at your server, and here I haven't.
In this case, all that is required is to set the target attribute of the form to either "_blank" or "ANameForTheWindow"
If the former, the action page will open in a new window each time the form is submitted, if the latter, the action page will be displayed in the same window each time. If no such named window exists, a new one is created.
Alternatively, the action page could use javascript to go back (using the history object I think).
You could also use javascript on the action page to close the window after a few seconds.
You could also ensure that the action page is somehow invalid so that it is not displayed - there may be a clean way to do this but the user would still not see a confirmation message.
Kaled.
Indeed, the action page says something like "your data is processed correctly". The target attribute with "ANameForTheWindow" will do the trick.
For the other solutions: the "_blank" would open too much (dozens...) browser windows and I have no rights to change the action page.
But, as said, your "ANameForTheWindow" solution will do the trick. Sorry, digging into Javascript kept me away from clear HTML thinking ;)
nuna