Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JQuery datatable 1

Status
Not open for further replies.

sdagger3

Programmer
Apr 14, 2011
8
GB
Hi

I have built a datatable (array version) based on this example:

I am new to the code but managed to add components such as filtered dropdowns and working great. I am having trouble making one of the columns as hyperlinks.

If you look at the above example, it shows the code for the array, say for example I wanted the first column data to be <a href> links. How can I tweak the code to be able to do this?

Thank you to anyone who can help.
 
It appears it just directly taes the text and generates the tale, so I would guess simply adding the link around whichever piece of data you want would do the trick:

Code:
['Trident','[red]<a href="page.html">[/red]Internet Explorer 7[red]</a>[/red]','Win XP SP2+','7','A'],

----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Behind the Web, Tips and Tricks for Web Development.
 
Hi again

Thank you for your last post, that worked a treat.

I am now trying to add one last feature but cannot get it to work. I am trying to add checkboxes for filtering multiple items within a column.

For example:
Based on the table at:

I am trying to add the function allow checkboxes to be selected so given column one is called "Engine", I would like to unselected boxes leaving only "KHTML" and "Presto" checked thus only showing all data with Engine types of the above.

I know this should use the RegExp function and I have found a page that explains this but when I try and implement, It just won't work. The page with the code on how to do this can see at:

Could anybody help me add this code so I can get it working?

Many thanks for any help.
 
Hi

I'm not sure if this has been marked as complete? I never had any replies?

 
What does your regexp look like?

Do you get any errors?

What are your filtering by?

We'd need to know exactly what your columns look like to help you out with the regexp.




----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Behind the Web, Tips and Tricks for Web Development.
 
Hi

Some time ago I was working with datatables and asked for help with how to implement checkboxes for filtering. I managed to implement it into a test table and all works great apart from one last hurdle I am trying to overcome to complete the project.

My page now has two checkbox filters, one for the term column which works 100%, and one for the rating column. I basically copied the same function as the term column and changed the parametes for the rating column but the code loop is bahaving strangely and I cannot work out why. If you look at the attached code for the html file, you'll see on line 155 what i'm doing. The data is held in an array from line 41.

If you filter by Term, it works great, but if you filter by rating, then it will only work with A+ and CCC. these are the only two. Can somebody please help me from pulling my hair out further by helping me see what the problem is? I am also wanting to do a filter for the currency column but again, it misbehaves with £ and $ symbols.

Many thanks for any help you can give.
 
 http://www.mediafire.com/file/y33spipekr5iiwb/for-forum-help.zip
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top