How to fix this search box error in html? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 3

How to fix this search box error in html?

I got this html search box error, when clicked on keyboard's magnifier button - Uncaught ReferenceError: start is not defined Uncaught ReferenceError: onHasParentDirectory is not defined Uncaught ReferenceError: addRow is not defined Uncaught ReferenceError: addRow is not defined Uncaught ReferenceError: addRow is not defined Here's my search box code - HTML - <form> Search - <input type="text" name="search" placeholder=" type here..."> </form> CSS - input[type=text] { width: 130px; -webkit-transition: width 0.4s ease-in-out; transition: width 0.4s ease-in-out; } /* When the input fields gets focus, changes its width to 80% */ input[type=text]:focus { width: 80%; } PLEASE HELP ME FIX THIS ERROR!!!

24th Oct 2019, 2:49 PM
Udit Jain
Udit Jain - avatar
10 Réponses
+ 1
You understand English? Build from scratch. "scratch" is not a coding language. Build from scratch means build from the beginning, with a blank page, empty canvas, no tools, to build out of nothing from the start. If you do not use a 3rd party search engine on your page, and are looking to develop your own in html, Then, you are looking to build your html search engine from scratch. Btw, you are going to need a scripting language like Javascript to build your own search engine.
24th Oct 2019, 3:55 PM
Xyenia 🦉
Xyenia 🦉 - avatar
+ 4
Xyenia i want to write the code on my own only. By the way Thank you so much!!!
24th Oct 2019, 3:30 PM
Udit Jain
Udit Jain - avatar
+ 3
Xyenia exactly! It returns nothing! So which script / code is needed to make my search box work?
24th Oct 2019, 3:16 PM
Udit Jain
Udit Jain - avatar
+ 3
Xyenia What do you mean by 'Chancing your arm, someone will do graft for you'?
24th Oct 2019, 3:19 PM
Udit Jain
Udit Jain - avatar
+ 3
Ohh, thanks for explaining in depth!
24th Oct 2019, 4:15 PM
Udit Jain
Udit Jain - avatar
+ 2
I mean , are you hoping someone will write the code for you? You can't drive a car if it has no engine. You have simply put a box on a page hoping for it to work miracles. I think many languages can be used like Javascript. But it is an arduous undertaking to do it by hand. Maybe, embrace the idea of adding a third party search box on your site and let it do the work for you. Take a look here: https://www.dummies.com/web-design-development/site-development/how-to-set-up-a-search-box-on-your-website/
24th Oct 2019, 3:26 PM
Xyenia 🦉
Xyenia 🦉 - avatar
24th Oct 2019, 3:44 PM
Udit Jain
Udit Jain - avatar
+ 2
I add this code in my html page - <!-- Google Custom Search Element → <div id=”cse” style=”width:100%;”>Loading</div> <script src=”http://www.google.com/jsapi” type=”text/javascript”></script> <script type=”text/javascript”>google.load(‘search’, ‘1’); google.setOnLoadCallback(function(){var cse = new google.search. CustomSearchControl();cse.draw(‘cse’);}, true);</script> Now i will upload my web page on the internet!
24th Oct 2019, 4:16 PM
Udit Jain
Udit Jain - avatar
+ 1
Are you saying that when somebody searches in the box, it doesn't return anything? It needs a script or execution code to be able to perform a search. At the moment, it is just a simple input box that does nothing. Are you chancing your arm, hoping someone will do the graft for you ?
24th Oct 2019, 3:10 PM
Xyenia 🦉
Xyenia 🦉 - avatar