0

I have a form that I have created using Google App Script. And it is really good because it allows me to create a form that could be moulded in any manner and not be put down by the limitation of Google Forms. But I am now having a hard time figuring out how to run a script to manipulate the innerHTML of a div using form action when the form in submitted. Can someone help me with this or suggest a solution.

1
  • Take a look at this working example I think that it does what you want. Commented Jun 17, 2013 at 1:08

1 Answer 1

2

This should be standard JavaScript. The nice thing about HtmlService is that anything you can do in jQuery, you should be able to do in JavaScript. Some restrictions apply because we need to apply Caja to sandbox the JavaScript so it is safe, but this should not interfere with what you are doing.

What you want to do is this:

  1. Attach an onClick handler to the submit button. Return false from this function so it does not do an HTTP POST/GET.

  2. In the onClick function, use the jQuery function to find the div element you want to populate and populate it with data.

I highly recommend John Resig's jQuery tutorial if you haven't done it already.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.