Link to home
Start Free TrialLog in
Avatar of Richard Korts
Richard KortsFlag for United States of America

asked on

Javascript DOM objects

Can pure text objects be accessed and have properties manipulated by Javascript?

See attached. This is now all managed by php but due to performance issues in the field with no WiFi, I want to do it in Javascript

Note the text box labeled "Search Parts" with the word "Box" typed into it. When the search button is clicked, it searches all parts with the word "Box" contained within the part description. After the search, it displays the items to the right; including text & form elements.

Can I identify the text elements with an id and use visible / hidden properties?

Or many just inclose the whole thing in a div with an id & make the div visible or invisible?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Tom Beck
Tom Beck
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Richard Korts

ASKER

@Tom Beck,

Sorry, forgot attachment.

So if I put a div tag around the whole thing, including the text, & give the div an id, I can apply hidden or visible property to the div?

Thanks
parts-search.jpg
Correct. See if this example helps.

jsfiddle.net/tommyBoy/w4yycum2/2/

Not sure how this applies to your situation however. I guess I'd have to see how the information for the various form fields is arranged in the markup.
Hi,
not sure if this helps, but what about a nice Javascript library like Datatables.net (http://www.datatables.net/).
It is quite flexible and needs "just" jQuery and itself as plugin.
At least it has a really nice search and filtering.
Just my 2ct
Rainer
Excellent, works beautifully.