To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
PHPBuilder.com  
 

 

Go Back   PHPBuilder.com > Misc Help > ClientSide Technologies

ClientSide Technologies Discuss HTML/CSS/Javascript, and any other client-side technologies, here.

Reply
 
Thread Tools Rate Thread Display Modes
Old 03-05-2006, 05:27 PM   #1
blaster_master
Member
 
Join Date: Dec 2004
Location: Very close to nowhere
Posts: 56
modifying HTML cells in PHP

How is it possible to refer to a specific HTML table cell in PHP? Example:

Assume there is a simple HTML table with m rows and n columns. Outside this table there is a link which when pressed should change the color of the 2 - 4 cell (row 2, column 4) from #A to #B. If not possible in PHP, how can one do it in HTML? (I'd just echo the HTML solution in PHP)

Any help is appreciated.
blaster_master is offline   Reply With Quote
Old 03-05-2006, 09:32 PM   #2
Weedpacket
Custom User Title™
 
Weedpacket's Avatar
 
Join Date: Aug 2002
Location: Rapid Offensive Unit "Foreign Object Damage"
Posts: 19,128
You wouldn't want to do it in PHP, because PHP runs on the server and wouldn't know if anyone had clicked anything until it was asked to deliver a new page, and I suspect you don't want to reload the entire page just so that you can change the colour of a table cell. You can't do it in HTML because HTML isn't a programming language and so can't do anything.

You could do it in javascript: give the relevant <td> element an id attribute, and then Javascript can locate the cell with getElementById('whateveryoucalledit');
__________________
On two occasions I have been asked [by Members of Parliament], "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.
Weedpacket is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 05:23 AM.






Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.