SharePoint 2007 Form auto submit
문제
I would like to use standard SharePoint form for list (NewForm.aspx), but want to auto submit it after specified time - 60 minutes to list. All fields will be optional. This will be used for quiz for users.
Is there a way how to simply insert a piece of script into NewForm.aspx source to do this? Or with use of customized form instead?
해결책
I'm not sure why you would want to do this but... you could probably accomplish this with a little JavaScript on the page.
My JavaScript library of choice is Prototype.js so you can find the OK buttons with a selector like:
input[id$="diidIOSaveItem"]
Then, it is just a matter of "clicking" them after an hour (60 minutes * 60 seconds * 1000 = 3,600,000 ms):
function SubmitFormAfterAnHour() {
$$('input[id$="diidIOSaveItem"]').each(function(elem){
elem.onclick();
});
}
setTimeout("SubmitFormAfterAnHour()", 3600000);
(I am typing this in Notepad so please test)
제휴하지 않습니다 sharepoint.stackexchange