Client Side Things
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesClient Side Things

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old September 25th, 2002, 08:16 AM
Dicky Dicky is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 99 Dicky User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
Print Table

I am finding that if I try and nest a table within a table using the print command the nested table is farmatted the same as the parent table even if you specify borders and colours within both of the table tags.
Example:
print("<table width="400" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#990000">");
print("<TR>");
print("<TD");
print("<TABLE WIDTH="100%" border="0">n" );

Reply With Quote
  #2  
Old September 25th, 2002, 11:59 AM
Matt Matt is offline
Contributing User
Codewalkers Specialist (4000 - 4499 posts)
 
Join Date: Apr 2007
Location: Florida
Posts: 4,158 Matt User rank is Private First Class (20 - 50 Reputation Level)Matt User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 h 12 m 16 sec
Reputation Power: 7
RE: Print Table

This sounds have nothing to do with the print command. Can you post up some full html that has this problem?

Check the source of this page...it is nothing but tables within tables.....

Also, moving to Client side forum...

Reply With Quote
  #3  
Old September 26th, 2002, 02:30 AM
EvilivE EvilivE is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Milwaukee, WI USA
Posts: 291 EvilivE User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
Send a message via Yahoo to EvilivE
RE: Print Table

your third print statement does not have a ">" after the "D" in TD

Reply With Quote
  #4  
Old September 26th, 2002, 09:38 PM
Dicky Dicky is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 99 Dicky User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: Print Table

Thanks for that I am on holiday as from tomorrow and will not have time to check till I get back (weeks time) but will post my results...

Reply With Quote
  #5  
Old October 4th, 2002, 12:48 AM
sarah's Avatar
sarah sarah is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Auckland, New Zealand
Posts: 127 sarah User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 5 m 32 sec
Reputation Power: 3
Send a message via ICQ to sarah Send a message via AIM to sarah Send a message via Google Talk to sarah
RE: Print Table

According to what I've discovered at http://www.richinstyle.com/ this is consistent behaviour. An element will take on the format of it's parent. In this case the second table is a child of the first table and will be formatted as per the parent.

Stylesheets are incredibly powerful but you do have to know what you are doing!

Reply With Quote
  #6  
Old October 11th, 2002, 11:58 AM
crickettdt crickettdt is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Chippenham
Posts: 4 crickettdt User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to crickettdt
RE: Print Table

This adaptation of your code works:

<html>
<body>
<?

print("<table width="400" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#990000">");
print("<TR>");
print("<TD align=center>");
print("<TABLE WIDTH="100" border="4" bordercolor="blue">n");
print("<TR>");
print("<TD width=50 align=center>Hello");
print("</TD>");
print("</TR>");
print("</Table>");
print("</TD>");
print("</TR>");
print("</Table>");

?>
</body>
</html>

You have to be careful of nesting. In HTML, tags need to be properly nested for them to behave properly.

The code i've posted shows a new table inside another table, with different properties, notice blue border.

If you are having problems of this sort, its always useful to view your page in a browser, right click the mouse, and choose view source.

Save this, and validate it at: http://validator.w3.org/

Its an HTML validator, and will highlight any problems with the outputted HTML.

Reply With Quote
  #7  
Old October 11th, 2002, 12:00 PM
crickettdt crickettdt is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Chippenham
Posts: 4 crickettdt User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to crickettdt
RE: Print Table

This adaptation of your code works:

<html>
<body>
<?

print("<table width="400" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#990000">");
print("<TR>");
print("<TD align=center>");
print("<TABLE WIDTH="100" border="4" bordercolor="blue">n");
print("<TR>");
print("<TD width=50 align=center>Hello");
print("</TD>");
print("</TR>");
print("</Table>");
print("</TD>");
print("</TR>");
print("</Table>");

?>
</body>
</html>

You have to be careful of nesting. In HTML, tags need to be properly nested for them to behave properly.

The code i've posted shows a new table inside another table, with different properties, notice blue border.

If you are having problems of this sort, its always useful to view your page in a browser, right click the mouse, and choose view source.

Save this, and validate it at: http://validator.w3.org/

Its an HTML validator, and will highlight any problems with the outputted HTML.

Reply With Quote
  #8  
Old October 21st, 2002, 07:43 AM
Dicky Dicky is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 99 Dicky User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 3
RE: Print Table

Thanks to all - My PHP was ok it was as some of you have said the fact that you have to be carefull when nesting the HTML and embarrassingly for me it was a mistake in my HTML and not nesting the HTML correctly as well as missing out a ">" - thanks Evilive....

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesClient Side Things > Print Table


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

Request Your Free Technology Downloads!
 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

Request Your Free Technology Downloads!
 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

Request Your Free Technology Downloads!
 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

Request Your Free Technology Downloads!
 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek