Web Design: Dynamic Tables with Clickable Content


thanks david

Code is My Drug

My preferred method for building tables with dynamic content (search results, etc) is to do so in PHP.
The problem there is, how do I make it so the user can interact with my table data?

I do this using class and id within the appropriate tr/td tags, concatenating a row identifier to the id. This gives me the information I need to identify the rowset that the user wants to address.

When the user clicks on one of these elements, I use a class selector in JQUERY to capture the event, strip the known value, using string.replace from the element id, leaving me with the row identifier. This allows me to pass on the appropriate reference to whatever query I need to run.

Here’s an example:

php script

JQuery function

I’m certain that you would do something more useful than pop up an alert box (unless your users are…

View original post 35 more words

Advertisements
About

myself pramodh kumar yet another php developer from India and have worked on oops,procedural,yii framework,codeigniter,wordpress,joomla,api and more.

Tagged with: , , , , ,
Posted in javascript and jquery

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow php tutorial on WordPress.com
categories
Calendar
March 2014
M T W T F S S
« Feb   Apr »
 12
3456789
10111213141516
17181920212223
24252627282930
31  
Follow me on Twitter
Blog Stats
  • 72,886 hits
%d bloggers like this: