I need to make a box with option to input a single number in a HTML google ad banner. Depending on the number entered banner would have different endings.
I've tried a few things, and read help and forum but I didn't find any easy way to do this.
Can someone please help with the problem or reefer me to a page where that might be explained or answered.
Thanks
Josip
Right click on the input element on stage and select Add event...
Select Mouse > click > Custom > Add custom action
Add the custom action which is what you want the content to do when there is a change in the input field, for example, I would like the console log to trace the value of the input field when it's changed:
inputContent = document.getElementById('input').value;
console.log(inputContent)
Click ok to save
Now, the click event is triggered instead of change, so you need to go to code view and edit click to change in 2 places:
Now when you switch back to design view, you would see the change event in the events panel and you can edit it to change the action to whatever way you want.
Attached is also the sample Google Web Designer file.
Hope it helps.
San
Google Web Designer team