Working Search Field on a Plain HTML Page - html

Is it possible to have a search field without a database?
I have a basic HTML and CSS website where on only one page I need a search box to search only that page (large page with lots of data), if possible to search the whole site would be great but only need one page now and don't want to use a database.
Have you seen this done or know if it is possible? I have seen search fields where you link to Google's database and you embed results on your site but that won't work.

Since you have only CSS and HTML code (and no PHP + MySQL) the only solution for you is to use JavaScript which runs on client side. You can use the window.find() function but it doesn't work on all browsers. See: Use Browser Search (Ctrl+F) through a button in website?
What you need is to tell the user to hit CTRL + F in order to use the browser's search module.

FOUND IT...
It works on Firefox, Chrome, Safari, and even Opera. Don't care about IE.
http://www.javascripter.net/faq/searchin.htm
If you use, read the bottom. You will want to use an iframe for the HTML otherwise your search box searches the keyword in the actual box... which is kind of funny. Anyways thanks for the votes guys and sorry you couldn't be as cool as #valicu2000 who pointed me in the right direction to find this solution.

Related

Is there a way to search for things on a page using an element in html? [duplicate]

I have created a website and have added a button and lot of text. What I want is to use the browser search (Ctrl+F), when I press the button which I added in website.
How can I achieve this?
It kind of works for FF. See this page
Find in This Page...
update: from mark's comment:
From my testing
window.find()
is supported in Chrome 37, and FF31, but
not IE11
update:
for more information on this window.find go here
No. In general, you cannot invoke browser controls from inside the webpage - security, sandboxing, and all that.
You need to make some sort of in-page search - if you're using a CMS, most of them have a simple search feature built-in.
If you want to do this in JavaScript, there are various scripts that emulate this in-page; randomly selected from my query "javascript find in page" is this one: http://www.seabreezecomputers.com/tips/find.htm

Mediawiki exclude/hide page in internal search

Is there a way to use, for example, a magic word on a page so it doesn't appear in the Mediawiki search-bar?
I know there is __NOINDEX__, but as I understand, it only excludes your page from Google or other search engines. What I need is, when I type the page on the top right I won't find it. Or at least it won't show me the page as recommended.
Is there a way to archive that?
Not at the moment. See T24251.

Make a Search Box that will Search a Websites Text in HTML

So I need to have a search box search through text on a web page and show relevant searches. I have no clue how to do this and didn't find anything online on how to. So if I have a search box on www.example.com/index.html, and and user enters text into it, then it searches the text on www.example.com/example.html and displays the result. Finally just an FIY it needs to be in HTML. Thanks for any help in advanced!
Well, you would need to know javascript (and probably php) to do that properly, which your request sounds like you do not.
If you need to add a search engine without knowing javascript/php, then your best bet is probably to look into something like Google's Custom Search - https://support.google.com/customsearch/answer/2630969?hl=en
Setting it up sounds simple enough for someone who doesn't understand what the code is actually doing - all copy and paste. Don't do that with any old script on the web, though. There's plenty of dodgy ones out there!

How can I find out the POST form sent to an ASP page?

There is an online dictionary I would like to add to my search engine list in Google Chrome. The problem is, the website in question does not show the form used in the address bar, so I can't just substitute the search term with %s in Chrome like other search engines.
I know barely anything about developing web pages or web scripting languages, so I'm not even entirely sure that POST is the correct term for what is going on here.
Here is the website I am talking about. If you type a word in the English-Basque box and, "dog" for example, and hit Search, it just shows http://www1.euskadi.net/morris/resultado.asp, obviously not containing "dog". I've inspected the sources of both the HTML page of the first link and the ASP page of the results page, but don't see anything blindingly obvious, but then again I don't really know what I'm looking for.
I use this dictionary a lot, so being able to add it to Chrome and use a simple keyword for it, I can just use the keyword and a search term in the omnibar instead of having to load the page every time, saving much time. :)
If anyone can point me in the right direction for how to figure this out, I would greatly appreciate your help. Thanks!
Someone else seems to have found a workaround for your problem;
It consists of writing a FORM using javascript instead of a URL in Chrome.
A cleaner alternative would be to write a proxy page; a page that you write in asp/php/whatever that can take querystring parameters coming in, and then POST these parameters to the euskadi.net pages, returning the results.
This will require you to have a server or hosted page somewhere online though.

Help with creating a demo website

I have a question of how to develop a small website which is quick and easy which has html support unlike google sites. For one of my course project I have to develop a prototype of the website but just html pages. Want to implement the clicks, text fields, checkboxes etc., I have created a small site of googlesites but that doens't allow me to put the html like text fields radio buttons etc., I just wanted to know if there is any free WYSIWYG capable for doing my stuff.
Thanks in advance
EDIT:
I dont want to use the div tags and arrange the location of HTML. I just want to drag and drop the fields and the site should automatically place the fields appropriately on the webpage something as easy as google sites
I found jsfiddle.net to be really useful. Basically you can put in HTML, CSS, and Javascript, click "Run" and see the result.
It's great for testing or hacking some CSS or Javascript, as it gives you instant feedback, saving you the "edit, save, launch, wait, repeat" cycle you might find using a text or HTML editor.
UPDATE
I'm not sure if I understood your question correctly. Perhaps you are looking for a tool like Google sites but with more capabilities? If so, http://www.weebly.com/ is a good option and it is free.