473,503 Members | 3,722 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Advanced Javascript search within html

Daxthecon
63 New Member
What I need.

-When there is nothing in the cell it needs to be red
-When there is something in the cell it should be green
-There should be a search input and it should bring up(on the next page after clicking search) the columns that apply to that search keyword only.

All this needs to be done in html and javascript. I've created the frame turned the excel to a csv and then made frames so tht it will look presentable. If I have to I will have to take the frames out. But I wanted to know if there was a way to do all this in just html and java. If there is please help me because it's been 2 days and I have nothing.
Jul 29 '08 #1
7 1640
acoder
16,027 Recognized Expert Moderator MVP
Can you show some example HTML to begin with. Is it a table?

For the search, use the string methods for searching (link) once you have the values.
Jul 29 '08 #2
Daxthecon
63 New Member
Unfortunately I didn't get this project done with the parameters and it was contracted out to someone who is more experienced then me in the web department. Well he decided to that it was to hard and sent an email to me to tell me that he's doing it in VB win form. I did it in 2 hours and sent it to the client. The conclusion we all came too is this is a massive project undertaking and wish I would have had more time to exerience it and see what I could have done with it.

Thank you for your attempt to help me but I have been busy for the last 2 weeks and haven't been able to get to many of my own posts.
Aug 5 '08 #3
acoder
16,027 Recognized Expert Moderator MVP
No problem. Thanks for letting us know.

From the requirements in the first post, it shouldn't have been a very difficult task for an experienced programmer.
Aug 6 '08 #4
RamananKalirajan
608 Contributor
Hi Dude,

[HTML]document.getElementById('myText').style.background Color='red'; [/HTML]

The above piece of code will help you in setting the background color of a textbox when it is null or not. But I don't know how to perform search within a page. I will try it out. The search work in the search box should search all the input elements within that page and show it in the next page. Is this your requirement.

pls: remove the unnecessary whitespace in the code

Regards
Ramanan Kalirajan.
Aug 7 '08 #5
acoder
16,027 Recognized Expert Moderator MVP
But I don't know how to perform search within a page. I will try it out.
Since it's a search within the table, you can just use the String methods such as indexOf on each cell. If you want to search the whole page, you're better off using window.find (for Mozilla/Netscape) or, better still, the Range object.
Aug 7 '08 #6
RamananKalirajan
608 Contributor
Since it's a search within the table, you can just use the String methods such as indexOf on each cell. If you want to search the whole page, you're better off using window.find (for Mozilla/Netscape) or, better still, the Range object.

Hi Acoder, thanks for your suggestion, I am aware of those methods and string.match() also but i haven't worked i.e created any working application to search a keyword in the whole page. that's what I have mentioned over there. Thanks for your suggestion.

Regards
Ramanan Kalirajan
Aug 7 '08 #7
acoder
16,027 Recognized Expert Moderator MVP
I should clarify that the String search methods are only useful if there's only text in the cells. If there's HTML, you'll have to parse it to get the text only.
Aug 7 '08 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

0
7192
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7064
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7261
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7315
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5559
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4991
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4665
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3158
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
369
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.