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

B

bobdedogh

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
<<<<<<<<<<<<<<<<<<<<<<<<
 
B

bobdedogh

No, not in Javascipt





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
<<<<<<<<<<<<<<<<<<<<<<<<
 
T

Tim Williams

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.
 
B

bobdedogh

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
 
B

bobdedogh

Tim

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



its not to clear to me why toto include the links <<<
will make the links active


thankyou

bob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,743
Latest member
WoodrowMea

Latest Threads

Top