0

Hello Everyone,

I am new to Javascript and would appreciate any help here. My client has a requirement of a search function which is specific. That is, if a user puts in the word "lexus printer" in the search field the result for that would be "toner123" and it should appear in the same page. Also the result can be same for another search keyword too. For eg. "toner123" could also be the result for "hp printer".

How could I acheive this with JavaScript?

Thanks,

Saktiyantra.

3
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by saktiyantra
0

Just check the textbox value

var x=document.getElementById("txtbax");
x1=x.value;
if(x1 == "lexus printer")
{
x.value="toner123";
}
0

Hello Everyone,

I am new to Javascript and would appreciate any help here. My client has a requirement of a search function which is specific. That is, if a user puts in the word "lexus printer" in the search field the result for that would be "toner123" and it should appear in the same page. Also the result can be same for another search keyword too. For eg. "toner123" could also be the result for "hp printer".

How could I acheive this with JavaScript?

Thanks,

Saktiyantra.

I think you would like to add some tags too, for every entry you put in the database, as a seperate column in the database.
And your search will compare against this tags too apart from the actual entry name.

0

Hi,

Thanks for the reply. However, please keep in mind that I am well versed just in HTML and you will have to explain everything in detail. Even the code that would go into the head tag etc.

Thanks

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.