469,645 Members | 1,138 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,645 developers. It's quick & easy.

live hyperlinks and Tabular Data Control (tdc) that ships with IE4.0.

can anyone add live hyperlinks to the sortable table made by the code
supplied by Machi, or know of a simple alternative
bob
Machi wrote Mar 10 1999, 8:00 am
>>>>>>>>>>

....
Hello Harjinder!
Not sure if you had this in mind or not. This is an example of
data binding and sorting using the Tabular Data Control (tdc)
that ships with IE. Please note that this will only work with IE.
Copy each section. Save the first with any name you like, but you
must save the second section (the comma delimited list) as
"docList.txt" because it's the source of the data and that name
is coded into the .html page.
--CUT 'N PASTE HTML--
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>
<!-- The following is the Tabular Data Control (tdc) that ships
with IE4.0. As such this will only work with IE4.0
-->
<OBJECT id="docList"
classid="clsid:333C7BC4-460F-1*1D0-BC04-0080C7055A83"
align="baseline" border="0" width="0" height="0">
<param name="DataURL" value="docList.txt">
<param name="UseHeader" value="True">
</OBJECT>
<!-- Define your table and dynamically fill the cells with the
items from the "DataURL" source, here "docList.txt"
-->
<TABLE border="1" id="tblDoc" datasrc="#docList">
<THEAD> <TR>
<TD><DIV id=docName><button
style="width:120;">Name</butto*n></DIV></TD>
<TD><DIV id=docDate><button
style="width:120;">Date</butto*n></DIV></TD>
<TD><DIV id=docSize><button style="width:120;">Size
(kb)</button></DIV></TD>
</TR>
</THEAD><TBODY> <TR>
<TD align=right><SPAN DATAFLD="docName"></SPAN></TD>
<TD align=right><DIV DATAFLD="docDate"></DIV></TD>
<TD align=right><SPAN DATAFLD="docSize"></SPAN></TD>
</tr>
</TBODY></TABLE>
<SCRIPT LANGUAGE="JavaScript">
<!-- Functions for sorting the columns -->
function srtName() {
docList.SortColumn = "docName";
docList.Reset();
}
docName.onclick = srtName;
function srtDate() {
docList.SortColumn = "docDate";
docList.Reset();

}
docDate.onclick = srtDate;
function srtSize() {
docList.SortColumn = "docSize";
docList.Reset();

}
docSize.onclick = srtSize;
</SCRIPT>
</BODY>
</HTML>
-- END HTML--

---CUT 'N PASTE TEXT--
docName:STRING,docDate:DATE,do*cSize:INT
index.html,03/01/1999,36
toc.html,11/20/1998,51
help.html,11/21/1998,24
source.html,10/15/1998,32
myStyle.css,12/16/1998,20
funct.js,01/16/1999,10
ie.js,02/16/1999,5
ns.js,02/17/1999,4
nav.gif,09/14/1997,22
rArrow.gif,03/12/1997,31
lArrow.gif,03/13/1997,34
--END OF TEXT FILE--
HTH
-Machi
<<<<<<<<<<<<<<<<<<<<<<<<

Jul 23 '05 #1
4 1932
No, not in Javascipt

bo*******@ukonline.co.uk wrote:
can anyone add live hyperlinks to the sortable table made by the code
supplied by Machi, or know of a simple alternative
bob
Machi wrote Mar 10 1999, 8:00 am
>>>>>>>>>>>

...
Hello Harjinder!
Not sure if you had this in mind or not. This is an example of
data binding and sorting using the Tabular Data Control (tdc)
that ships with IE. Please note that this will only work with IE.
Copy each section. Save the first with any name you like, but you
must save the second section (the comma delimited list) as
"docList.txt" because it's the source of the data and that name
is coded into the .html page.
--CUT 'N PASTE HTML--
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>
<!-- The following is the Tabular Data Control (tdc) that ships
with IE4.0. As such this will only work with IE4.0
-->
<OBJECT id="docList"
classid="clsid:333C7BC4-460F-1*1D0-BC04-0080C7055A83"
align="baseline" border="0" width="0" height="0">
<param name="DataURL" value="docList.txt">
<param name="UseHeader" value="True">
</OBJECT>
<!-- Define your table and dynamically fill the cells with the
items from the "DataURL" source, here "docList.txt"
-->
<TABLE border="1" id="tblDoc" datasrc="#docList">
<THEAD> <TR>
<TD><DIV id=docName><button
style="width:120;">Name</butto*n></DIV></TD>
<TD><DIV id=docDate><button
style="width:120;">Date</butto*n></DIV></TD>
<TD><DIV id=docSize><button style="width:120;">Size
(kb)</button></DIV></TD>
</TR>
</THEAD><TBODY> <TR>
<TD align=right><SPAN DATAFLD="docName"></SPAN></TD>
<TD align=right><DIV DATAFLD="docDate"></DIV></TD>
<TD align=right><SPAN DATAFLD="docSize"></SPAN></TD>
</tr>
</TBODY></TABLE>
<SCRIPT LANGUAGE="JavaScript">
<!-- Functions for sorting the columns -->
function srtName() {
docList.SortColumn = "docName";
docList.Reset();
}
docName.onclick = srtName;
function srtDate() {
docList.SortColumn = "docDate";
docList.Reset();

}
docDate.onclick = srtDate;
function srtSize() {
docList.SortColumn = "docSize";
docList.Reset();

}
docSize.onclick = srtSize;
</SCRIPT>
</BODY>
</HTML>
-- END HTML--

---CUT 'N PASTE TEXT--
docName:STRING,docDate:DATE,do*cSize:INT
index.html,03/01/1999,36
toc.html,11/20/1998,51
help.html,11/21/1998,24
source.html,10/15/1998,32
myStyle.css,12/16/1998,20
funct.js,01/16/1999,10
ie.js,02/16/1999,5
ns.js,02/17/1999,4
nav.gif,09/14/1997,22
rArrow.gif,03/12/1997,31
lArrow.gif,03/13/1997,34
--END OF TEXT FILE--


HTH
-Machi
<<<<<<<<<<<<<<<<<<<<<<<<


Jul 23 '05 #2
Bob,

You don't have to use a data-bound table - you can just reconstruct
the HTML for the table by getting the cell values from the DSO. Then
you can add whatever formatting (links etc) you want to.

or...

Let the data-bound table refresh on sort, and then update the contents
to include the links you want.

Tim.
bo*******@ukonline.co.uk wrote:
can anyone add live hyperlinks to the sortable table made by the
code
supplied by Machi, or know of a simple alternative
bob
Machi wrote Mar 10 1999, 8:00 am
>>>>>>>>>>>

...
Hello Harjinder!
Not sure if you had this in mind or not. This is an example of
data binding and sorting using the Tabular Data Control (tdc)
that ships with IE. Please note that this will only work with IE.
Copy each section. Save the first with any name you like, but you
must save the second section (the comma delimited list) as
"docList.txt" because it's the source of the data and that name
is coded into the .html page.
--CUT 'N PASTE HTML--
<HTML>
<HEAD>
<TITLE></TITLE>
</HEAD>
<BODY>
<!-- The following is the Tabular Data Control (tdc) that ships
with IE4.0. As such this will only work with IE4.0
-->
<OBJECT id="docList"
classid="clsid:333C7BC4-460F-1*1D0-BC04-0080C7055A83"
align="baseline" border="0" width="0" height="0">
<param name="DataURL" value="docList.txt">
<param name="UseHeader" value="True">
</OBJECT>
<!-- Define your table and dynamically fill the cells with the
items from the "DataURL" source, here "docList.txt"
-->
<TABLE border="1" id="tblDoc" datasrc="#docList">
<THEAD> <TR>
<TD><DIV id=docName><button
style="width:120;">Name</butto*n></DIV></TD>
<TD><DIV id=docDate><button
style="width:120;">Date</butto*n></DIV></TD>
<TD><DIV id=docSize><button style="width:120;">Size
(kb)</button></DIV></TD>
</TR>
</THEAD><TBODY> <TR>
<TD align=right><SPAN DATAFLD="docName"></SPAN></TD>
<TD align=right><DIV DATAFLD="docDate"></DIV></TD>
<TD align=right><SPAN DATAFLD="docSize"></SPAN></TD>
</tr>
</TBODY></TABLE>
<SCRIPT LANGUAGE="JavaScript">
<!-- Functions for sorting the columns -->
function srtName() {
docList.SortColumn = "docName";
docList.Reset();
}
docName.onclick = srtName;
function srtDate() {
docList.SortColumn = "docDate";
docList.Reset();

}
docDate.onclick = srtDate;
function srtSize() {
docList.SortColumn = "docSize";
docList.Reset();

}
docSize.onclick = srtSize;
</SCRIPT>
</BODY>
</HTML>
-- END HTML--

---CUT 'N PASTE TEXT--
docName:STRING,docDate:DATE,do*cSize:INT
index.html,03/01/1999,36
toc.html,11/20/1998,51
help.html,11/21/1998,24
source.html,10/15/1998,32
myStyle.css,12/16/1998,20
funct.js,01/16/1999,10
ie.js,02/16/1999,5
ns.js,02/17/1999,4
nav.gif,09/14/1997,22
rArrow.gif,03/12/1997,31
lArrow.gif,03/13/1997,34
--END OF TEXT FILE--
HTH
-Machi
<<<<<<<<<<<<<<<<<<<<<<<<

Jul 23 '05 #3
hi Tim,
can you speak dumbo?
what is DSO?

my attempt borrowing code from:
http://www.ncat.edu/~esterlin/c600s01/Notes/Ch18.pdf.

was simply to add links to DBPublications1.txt

content of DBPublications1.txt :
@Title@| @Authors@|@Copyright@|@Edition@|@Type@
@50525 173201@|@ISP@|@mail@|@ <a href="Http://ukonline.co.uk">ukol</a>
@|@Example:.@
@50526 152934@|@D,D@|@xxxx@|@<a
href="http://www.wlv.ac.uk/~a9722107">WHampton</a>@|@note@
@C++ HtP@|@D,D@|@1994@|@ http://ukonline.co.uk @|@BK@
@C++ HtP@|@D,D@|@1998@|@2@|@BK@
@Java HtP@|@D,D@|@1997@|@1@|@BK@
and hope the following would show live links:

<HTML><HEAD><TITLE> Sorting and Filtering</TITLE>

<OBJECT ID = "Publications"
CLASSID = "CLSID:333C7BC4-460F-11D0-BC04-0080C7055A83">
<PARAM NAME = "DataURL" VALUE = "DBPublications1.txt">
<PARAM NAME = "UseHeader" VALUE = "TRUE">
<PARAM NAME = "TextQualifier" VALUE = "@">
<PARAM NAME = "FieldDelim" VALUE = "|">
<PARAM NAME = "Sort" VALUE = "+Title">
</OBJECT>

<STYLE>
A { font-size: 9pt; text-decoration: underline; cursor: hand; color:
blue }
CAPTION { cursor: hand; }
SPAN { cursor: hand; }
</STYLE>

<SCRIPT LANGUAGE = "JavaScript">
var sortOrder; function reSort( column, order )
{if ( order ) sortOrder = ""; else sortOrder = "-";
if ( event.ctrlKey )
{Publications.Sort += "; " + sortOrder + column;
Publications.Reset(); }
else
{Publications.Sort = sortOrder + column;
Publications.Reset(); }
spanSort.innerText = "Current sort: " + Publications.Sort; }

function filter( filterText, filterColumn )
{Publications.Filter = filterColumn+ "=" + filterText;
Publications.Reset();
spanFilter.innerText = "Current filter: " + Publications.Filter; }

function clearAll()
{Publications.Sort = " ";
spanSort.innerText = "Current sort: None";
Publications.Filter = " ";
spanFilter.innerText = "Current filter: None";
Publications.Reset(); }

</SCRIPT> </HEAD>

<BODY>
<H1>Advanced Sorting</H1>
Click on the link next to a column head to sort by that column.
To sort by more than one column at a time, hold down CTRL
while you click another sorting link. Click on any cell to filter
by the data of that cell. To clear filters and sorts, click on the
green caption bar.
<a href="Http://ukonline.co.uk">ukonline>ukol</a>
<TABLE DATASRC = "#Publications"
BORDER = 1 CELLSPACING = 0 CELLPADDING = 2
STYLE = "background-color: papayawhip;">
<CAPTION STYLE = "background-color: lightgreen; padding: 5"
ONCLICK = "clearAll()">
<SPAN ID = "spanFilter"
STYLE = "font-weight: bold; background-color: lavender"> Current
filter: None</SPAN>
<SPAN ID = "spanSort"
STYLE = "font-weight: bold; background-color: khaki"> Current sort:
None </SPAN>
</CAPTION>

<THEAD> <TR> <TH>Title <BR>
(<A ONCLICK = "reSort( 'Title', true )"> Ascending</A>
<A ONCLICK = "reSort( 'Title', false )"> Descending</A>)
</TH>
<TH>Authors <BR>
(<A ONCLICK = "reSort( 'Authors', true )"> Ascending</A>
<A ONCLICK = "reSort( 'Authors', false )"> Descending</A>)
</TH>
<TH>Copyright <BR>
(<A ONCLICK = "reSort( 'Copyright', true )"> Ascending</A>
<A ONCLICK = "reSort( 'Copyright', false )"> Descending</A>)
</TH>
<TH>Edition <BR>
(<A ONCLICK = "reSort( 'Edition', true )"> Ascending</A>
<A ONCLICK = "reSort( 'Edition', false )"> Descending</A>)
</TH>
<TH>Type <BR>
(<A ONCLICK = "reSort( 'Type', true )"> Ascending</A>
<A ONCLICK = "reSort( 'Type', false )"> Descending</A>)
</TH> </TR>
</THEAD>

<TR>
<TD><SPAN DATAFLD = "Title"
ONCLICK = "filter( this.innerText, 'Title' )"> </SPAN></A> </TD>
<TD><SPAN DATAFLD = "Authors"
ONCLICK = "filter( this.innerText, 'Authors')"> </SPAN> </TD>
<TD><SPAN DATAFLD = "Copyright"
ONCLICK = "filter( this.innerText, 'Copyright' )"> </SPAN> </TD>
<TD><SPAN DATAFLD = "Edition"
ONCLICK = "filter( this.innerText, 'Edition' )"> </SPAN> </TD>
<TD><SPAN DATAFLD = "Type"
ONCLICK = "filter( this.innerText, 'Type' )"> </SPAN> </TD>
</TR>
</TABLE>
</BODY>
</HTML>

the links appear but simply as text
thanks for your tips but im too green to follow them

bob
Tim Williams wrote:
Bob,

You don't have to use a data-bound table - you can just reconstruct
the HTML for the table by getting the cell values from the DSO. Then
you can add whatever formatting (links etc) you want to.

or...

Let the data-bound table refresh on sort, and then update the contents
to include the links you want.

Tim.


Jul 23 '05 #4
Tim

if I
reconstruct the HTML for the table by getting the cell values from the DSO.
<<
would i still have sortability

its not to clear to me why to
Let the data-bound table refresh on sort, and then update the contents

to include the links <<<
will make the links active
thankyou

bob

Jul 23 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by James Broome | last post: by
1 post views Thread by rcoco | last post: by
38 posts views Thread by Sanders Kaufman | last post: by
1 post views Thread by sheldonlg | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.