No More Interruptions By The Record Label Execs!:
Those of you who read "More Cowbell" article about embedding new Google forms in web pages may have noticed the line:
at the bottom of the article. It has also been noted in the Google Docs user forums that the forms would be more useful for multi-entry data input if they didn't redirect when the user hit the submit button. Even using the _blank suggestion mentioned above, you'll quickly wind up with an annoyingly large number of 'Thank You' tabs or windows depending on you browser. Well, it turns out, there's an answer to this problem!
Immediately before the form tag, insert the following line of html:
Then, in the form tag, modify the target attribute so that it looks like:
target="catcher"
Voila! The record input confirmation screen is redirect to the 'zero' height iframe. The new horizontal bar you see immediately above the form below is the catcher iframe mentioned here.
Turn up the:
powered by Google Docs
Terms of Service
-Additional Terms
And that's it folks.
No more interruptions from the label between takes!
Of course, with the form in its current state, the data entry person has to have quite a bit of faith that they actually clicked the submit button. Would anyone like to contribute a piece of scriptaculous javascript code that would highlight the form background in light green with a fad after the submit button is pushed? Please? :)
Those of you who read "More Cowbell" article about embedding new Google forms in web pages may have noticed the line:
"To keep your web page from redirecting to the google success message and requiring your users to press the 'back' button, simply add:
target="_blank"
to the form tag prior to the action attribute."
at the bottom of the article. It has also been noted in the Google Docs user forums that the forms would be more useful for multi-entry data input if they didn't redirect when the user hit the submit button. Even using the _blank suggestion mentioned above, you'll quickly wind up with an annoyingly large number of 'Thank You' tabs or windows depending on you browser. Well, it turns out, there's an answer to this problem!
Immediately before the form tag, insert the following line of html:
< iframe name="catcher" height="0"></iframe >
Then, in the form tag, modify the target attribute so that it looks like:
target="catcher"
Voila! The record input confirmation screen is redirect to the 'zero' height iframe. The new horizontal bar you see immediately above the form below is the catcher iframe mentioned here.
Turn up the:
powered by Google Docs
Terms of Service
-Additional Terms
And that's it folks.
No more interruptions from the label between takes!
Of course, with the form in its current state, the data entry person has to have quite a bit of faith that they actually clicked the submit button. Would anyone like to contribute a piece of scriptaculous javascript code that would highlight the form background in light green with a fad after the submit button is pushed? Please? :)
Allright, assuming the "catcher" iframe does not catch any validation errors (so, either do your own input validation before submitting the form to Google, or do not define any validation in your Google forms definition at all), then the following works:
ReplyDelete< script type="text/javascript" >
function setCatcherOnload(){
// We cannot set the onload using
// < iframe onload = '' >
// as then it would fire right after the initial load as well...
// So: add at runtime.
document.getElementById('catcher').onload =
function(){
parent.location.href = "thankyou.html";
};
}
< /script >
< body onload = "setCatcherOnload();" >
< iframe name="catcher" id="catcher height="0" >< /iframe >
Instead of using the body onload I in fact prefer using jQuery's ready() function. And of course, there's nothing wrong with giving Google some credits!
I'd like to ask about getting a response to the form. I have a test, three questions long ... What I would like to be able to do is to have the spreadsheet do some calculations and then post the results.
ReplyDeleteSomething like: "Your score on this test was 66% correct."
Or: "You answered 2 out of three questions correctly."
My test is online here: http://pgm8693.googlepages.com/testforms
Thanks.
paul.
Sorry about not making the link live ... here it is again: http://pgm8693.googlepages.com/testforms
ReplyDelete