473,732 Members | 2,205 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 1655
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.getEle mentById('myTex t').style.backg roundColor='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
8946
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9307
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9235
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6031
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4550
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4809
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3261
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2180
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.