Click to See Complete Forum and Search --> : skipping text in dynamic data acces


al sole
05-11-2003, 01:24 PM
Hello,

I am a starter in dhtml.
I have used the next code for access text on another page .


<OBJECT ID="partijen" CLASSID="CLSID:333C7BC4-460F-11D0-BC04-0080C7055A83">
<PARAM NAME="DataURL" VALUE="analyse1.html">
<PARAM NAME="UseHeader" VALUE="TRUE">
<PARAM NAME="TextQualifier" VALUE="">
<PARAM NAME="FieldDelim" VALUE="|">
<PARAM NAME="RowDelim" VALUE="~">
</OBJECT>
<TABLE DATASRC="#partijen" BORDER="0" width=100%>
<tr><TD ><SPAN DATAFLD="."></SPAN></TD></tr>
<tr><TD bgcolor=orange><SPAN DATAFLD="wit"></SPAN></TD></tr>
<tr><TD bgcolor=orange><SPAN DATAFLD="zwart"></SPAN></TD></tr>
<tr><TD bgcolor=c8e0fe><SPAN DATAFLD="uitslag"></SPAN></TD></tr>
<TR><td><SPAN DATAFLD="toernooi"></SPAN></td></TR>
<TR><td><SPAN DATAFLD="door"></SPAN></td></TR>
<TR><td bgcolor=c8e0fe><SPAN DATAFLD="partij"></SPAN></td></TR>

</TABLE>

This works, but :

I would like to skip certain pieces of text that are created on the input file (analyse1.html) .
This is output from a hostsupplied CGI-script which I cannot change on the input side.So I have to use a kind of Javascript when reading the input file.

:confused:
can anyone help me?

Al

Fang
05-12-2003, 02:07 AM
Something like this should work:

var TableString='<table border="0" width="100%">';
partijen.recordset.MoveFirst();
for(var i=1; i<=partijen.recordset.AbsolutePosition; i++) { // skip header, so start at 1
if(partijen.recordset("door").value=="de Bruin") {
TableString+='<tr><td bgcolor="orange">'+partijen.recordset.("wit").value+'</td></tr>'; // add more recordsets as needed
}
partijen.recordset.MoveNext();
}
TableString+='</table>';
document.write(TableString);

al sole
05-12-2003, 05:52 PM
problem is : I get a <br> tag for every new line in the page where I substract information from. I need a script to extract all the information from each line , skipping the "<br>"tag

note: this is on every record i substract from the "analyse1.html"

Al

Fang
05-13-2003, 01:40 AM
Your data is coming from a html document, probably the source of the <br> tag, but without a site link or full script it's difficult to help.

al sole
05-13-2003, 03:32 PM
thx,

putting the dataformatas="html" in the datafield tags, cleared the tags that were visible.

Al