[url=https://docs.google.com/spreadsheets/d/11U32RfkBd2_jZkqI_Rd6T9dS1ueatqrLzbAjopziBqM/edit?usp=sharing][size=150][b]View submitted data in Google Sheet[/b][/size][/url]
[font=Courier New][font=Courier New]if (confirm("Confirm to submit?")) {[br]postDataToGoogle([br]ggbApplet.getValue("[color=#ff0000]ID[/color]"),[br]ggbApplet.getValueString("[color=#ff0000]sname[/color]"),[br]ggbApplet.getValue("[color=#ff0000]n1[/color]"),[br]ggbApplet.getValue("[color=#ff0000]n2[/color]"),[br]ggbApplet.getValue("[color=#ff0000]n3[/color]"),[br]ggbApplet.getValue("[color=#ff0000]n4[/color]"));[br]}[/font][/font]
[font=Courier New]function postDataToGoogle([color=#ff0000]ID,sname,n1,n2,n3,n4[/color]) {[br]var formURL = "[color=#ff7700]https://docs.google.com/forms/d/1ISxJ5EFGRJ8DJkJ_fZBVJFZSLb1U2AdVpDKrva9e_fs/[/color][color=#0000ff]formResponse[/color]";[br]if ([color=#ff0000]sname[/color]!=="") {[br]$.ajax({url:formURL, data: {[br]"entry.[color=#9900ff]1832159614[/color]":[color=#ff0000]ID[/color],[br]"entry.[color=#9900ff]1078480704[/color]":[color=#ff0000]sname[/color],[br]"entry.[color=#9900ff]118362476[/color]":[color=#ff0000]n1[/color],[br]"entry.[color=#9900ff]825951479[/color]":[color=#ff0000]n2[/color],[br]"entry.[color=#9900ff]310748160[/color]":[color=#ff0000]n3[/color],[br]"entry.[color=#9900ff]2121488058[/color]":[color=#ff0000]n4[/color]},[br]type: "POST", dataType: "xml", statusCode:[br]{0: function(){alert("Successful!");},[br]200: function(){alert("Failed!");}}});[br]} else {alert("Data missing!");}[br]}[/font][br][font=Arial][br]Note: [br][list=1][*]The URL of the google ends with "[font=Courier New]/formResponse[/font]" instead of "[font=Courier New]/viewform[/font]".[br][/*][*]The entry IDs of the Google form can be checked by an extension in Chrome browser called "[url=https://chrome.google.com/webstore/detail/web-developer/bfbameneiokkgbdmiekhjnmfkcnldhhm]Web Developer[/url]".[br][/*][/list][/font]
[url=https://www.geogebra.org/m/ICYVVZbn]https://www.geogebra.org/m/ICYVVZbn[/url]
gMath 互動數學教室[br][url=http://www.gmath.hk/]http://www.gmath.hk[/url]