Screen Options and make sure Custom Fields is checked --> This program converts any number from 0 to 999,999 into Chinese Characters.
// make a function which returns a promise. First it will load jQuery. Only after it loads jQuery, will it proceed // to be able to submit the user's input and then get the feedback from the server function loadScript(scriptUrl) { const script = document.createElement('script'); script.src = scriptUrl; document.body.appendChild(script); return new Promise((res, rej) => { script.onload = function() { res(); } script.onerror = function () { rej(); } }); }loadScript('https://code.jquery.com/jquery-3.6.0.min.js') .then(() => { console.log('Script loaded!'); $("#submit").click(function() { console.log('button clicked') var url = "https://mandarinportal.com/chinese_programs/compute_trying_1-10k.php"; // the script where you handle the form input.// a = $("#numbers_to_chinese_chars").serialize(); // an example would be yourNumber=0&name=Mom&email=Email%3F%3F%3F // console.log(a) $.ajax({ type: "POST", url: url, // data: $("#idForm").serialize(), // serializes the form's elements. data: $("#numbers_to_chinese_chars").serialize(), // serializes the form's elements. success: function(data) { // alert(data); // show response from the php script. // console.log('data is', data) let serverChineseData = JSON.parse(data); // console.log('the keys are ', Object.keys(serverChineseData));let origNumber = serverChineseData['original_number']; let convertedChineseCharacters = serverChineseData['converted_chinese_characters']; console.log('original number was', origNumber); console.log('converted Chinese Characters are', convertedChineseCharacters);let origNumDiv = document.querySelector('#originalNumber'); origNumDiv.innerHTML = `The original number was ${origNumber}`;let chineseCharsDiv = document.querySelector('#convertedChineseCharacters'); chineseCharsDiv.innerHTML = `The converted Chinese Characters are ${convertedChineseCharacters}`; } });return false; // avoid to execute the actual submit of the form. // Without the return false, the console.log('button clicked won't work') }); }) .catch(() => { console.error('Script loading failed! Handle this error'); });
🚀 Embark on an Epic Time-Travel Adventure with Watson! 🐕🦖🎨
Take a journey through time with Watson the Time-Travelling Dog: Dogs and Dinosaurs Adventure Coloring Book 1.
Join Watson and his dog brother Sherlock as they meet dinosaurs, make new friends, and embark on an unforgettable adventure! Perfect for kids, dog lovers, and coloring book enthusiasts alike.
Why you'll love it:
Engaging, fun-filled story
Beautiful illustrations to color
Ideal for family fun or a thoughtful gift
Ready for an adventure that sparks creativity and fun? 📖 Grab your copy today and let the time-traveling excitement begin!