HTML Site Search

Posted on 2011-10-29
Medium Priority
Last Modified: 2012-05-12
I have a Template from Template Monster with a "Site Search" section in the top.

This is a straight forward HTML site and I'm wondering what to do with this?
<form id="form-top" action="" method="post" enctype="multipart/form-data">
                    <div class="form-top">					
                        <span><input name="name" value="Site Search" onBlur="if(this.value=='') this.value='Site Search'" onfocus="if(this.value =='Site Search' ) this.value=''" /></span>
                        <a href="#" onclick="document.getElementById('form-top').submit()"></a>									

Open in new window

Question by:lrbrister
  • 2

Expert Comment

ID: 37051366
Really, you need something on the server side to handle this. The code you have submits the string to a script that does the search. Doing it on the client side isn't effective, because they'd have to download the entire text content of the website, search it, generate the code needed to present the results, and have the browser load it. Just isn't feasible.

Accepted Solution

GregArnott earned 2000 total points
ID: 37051370
Is there any reason you'd be wanting a search box for your website?

If yes, then the (action="") would then be hooked up to either some server side code or another page on your web site with search functionality.

Try reading this page for ways of getting that going easily:

Expert Comment

ID: 37051386
Also I should mention, unless you plan on dealing with HTML5, it really isn't possible to do anything like what you want with pure HTML, since HTML is meant for display.

Author Closing Comment

ID: 37052882

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question