HighDots Forums  

div question

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss div question in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Aaron Fude
 
Posts: n/a

Default div question - 07-12-2004 , 08:50 AM






Hi,

Is there a way to define the content of a div or a span in one place, but
then place it in the document in another place? I do not want to do absolute
position. I will probably want to include that span in a table cell. The
reason I want to do this is to make the table code nice and compact and to
be able to see the table structure even if the div has long content.

Many thank in advance,

Aaron Fude



Reply With Quote
  #2  
Old   
rf
 
Posts: n/a

Default Re: div question - 07-12-2004 , 08:54 AM







"Aaron Fude" <aaronfude (AT) yahoo (DOT) com> wrote

Quote:
Hi,

Is there a way to define the content of a div or a span in one place, but
then place it in the document in another place? I do not want to do
absolute
position. I will probably want to include that span in a table cell. The
reason I want to do this is to make the table code nice and compact and to
be able to see the table structure even if the div has long content.
No.

Well... yes if you code your server side process correctly.

But why bother, why should a table cell contain so much anyway, that is if
it *is* tabular data?

--
Cheers
Richard.




Reply With Quote
  #3  
Old   
Aaron Fude
 
Posts: n/a

Default Re: div question - 07-12-2004 , 09:36 AM




"brucie" <shit (AT) usenetshit (DOT) info> wrote

Quote:
in post: <news:ccu1dv$1vpm$1 (AT) news (DOT) wplus.net
Aaron Fude <aaronfude (AT) yahoo (DOT) com> said:

Is there a way to define the content of a div or a span in one place,
but
then place it in the document in another place?

http://allmyfaqs.com/faq.pl?Include_one_file_in_another

The reason I want to do this is to make the table code nice and
compact and to be able to see the table structure even if the div has
long content.

thats fine using the server side options at the link above before the
server does its majic but the end result spat out at the browser end
will have the <td> containing goodies.

and just in case you're using <table>s for layouts. <smack on wrist/
stop it. use css.

ok, ok - I'll reveal what I'm really trying to do. I have a page with a lot
of content. It is tablular data and the able has 1000 lines. I was planning
to break it up into 20 tables with 50 rows each. I will then use COOLjsTree
(http://javascript.cooldev.com) to hide all but one table. The darn thing
is, COOLjsTree requires its HTML content to be a valid javascript string
which is cubersome for a table with 50 lines. So I thought I would put that
table in a div and just mention the dive in the javascript string.

Here's an example for COOLjsTree developers (which I think is ugly):

var t1 = '<table bgcolor="#4682B4" width="400" cellspacing="0"
cellpadding="0" border="0"><tr><td align=center><font
color=white><b>Personal Info</b></font></td><tr></table>';
var f1 = '</a><table width="400" cellspacing="0" cellpadding="0"
border="0"><tr><td bgcolor="#EEEEEE">';
f1 += '<table width="100%" cellspacing="2" cellpadding="2" border="0">';
f1 += '<form action="javascript:alert(\'Submitted\');" method="get">';
f1 += '<tr><td><p class="last">First Name</td><td><input
type="text"></td></tr>';
f1 += '<tr><td><p class="last">Last Name</td><td><input
type="text"></td></tr>';
f1 += '<tr><td><p class="last">Age</td><td><select><option>from 10 to
15<option>from 16 to 20<option>from 21 to 30<option>from 31 to
40<option>older 40</select><td></tr>';
f1 += '<tr><td colspan=2 align=center><input type="submit"
value="Submit">&nbsp;<input type="reset" value="Reset"></td></tr>';
f1 += '</form>';
f1 += '</table></td></tr></table>';

.... lator on f1 is used:

var FORM_NODES = [
[t1, null, null,
[f1, null, null],
],


SO, I'm looking to avoid creating a long javascript string wih HTML content.

Quote:
--
b r u c i e





Reply With Quote
  #4  
Old   
Mark Tranchant
 
Posts: n/a

Default Re: div question - 07-12-2004 , 09:50 AM



Aaron Fude wrote:

Quote:
ok, ok - I'll reveal what I'm really trying to do. I have a page with a lot
of content. It is tablular data and the able has 1000 lines. I was planning
to break it up into 20 tables with 50 rows each. I will then use COOLjsTree
(http://javascript.cooldev.com) to hide all but one table. The darn thing
is, COOLjsTree requires its HTML content to be a valid javascript string
which is cubersome for a table with 50 lines. So I thought I would put that
table in a div and just mention the dive in the javascript string.
Yuk. Use PHP and put the table content into a database. Then you can
dynamically generate separate pages for each of the 20 sub-tables.

PHP and MySQL rules, and takes way less time to learn than you might
think. My site is entirely generated thusly, and performance is
excellent, even on the old P100 that's serving it.

--
Mark.
http://tranchant.plus.com/


Reply With Quote
  #5  
Old   
Webcastmaker
 
Posts: n/a

Default Re: div question - 07-12-2004 , 11:19 AM



In article <ccu45r$2da0$1 (AT) news (DOT) wplus.net>, aaronfude (AT) yahoo (DOT) com
says...
Quote:
ok, ok - I'll reveal what I'm really trying to do....
Oh you are headed in the right direction...

Quote:
I have a page with a lot...
snip

Is putting each set of 50 on a different page not an option? With a
link to all 20 pages included somewhere on each page so you can jump
around. That would probably work on all browsers. If you want
javascript, then google "collapsible div DHTML" and you will be
rewarded with a ton of examples.


--
WebcastMaker
The easiest and most affordable way to create
Web casts, or put presentations on the Web.
www.webentations.com


Reply With Quote
Reply




Thread Tools
Display Modes

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



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.