Article View: borland.public.cppbuilder.internet.web
Article #1380Re: get text from javascript?
From: bcb
Date: Fri, 25 Feb 2005 02:00
Date: Fri, 25 Feb 2005 02:00
54 lines
2389 bytes
2389 bytes
Hi Remy :)
Here is the piece of the html source:
the script:
<script language="JavaScript" type="Text/JavaScript">
<!--
var countDownInterval = 46;
var countDownTime = countDownInterval + 1;
if (document.all||document.getElementById)
countDown();
else
window.onload = countDown;
function countDown() {
countDownTime--;
if (countDownTime == 0) {
countDownTime = countDownInterval;
window.location.reload();
return;
}
else if (countDownTime < 5)
countDownTime = countDownTime + 00000;
if (document.all)
document.all.countDownText.innerText = secsToMins(countDownTime);
else if (document.getElementById)
document.getElementById("countDownText").innerHTML =
secsToMins(countDownTime);
counter = setTimeout("countDown()", 1000);
}
function secsToMins(theValue) {
var theMin = Math.floor(theValue / 60);
var theSec = (theValue % 60);
if (theSec < 10)
theSec = "0" + theSec;
return(theMin + ":" + theSec);
}
// -->
</script>
the part of the html source involved with actually displaying the info looks
something like,
<tr>
<td class="td01" height="63" colspan="3" valign="middle" align="center">
<br>
Count down display (<span id="countDownText"></span>)<br>
<br>
</td>
</tr>
Technical Details
Message-ID:
<421e86d1$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!feeder2.on.meganewsservers.com!meganewsservers.com!textfeed1.on.meganewsservers.com!38.119.100.83.MISMATCH!news-out.nntp.be!propagator2-sterling.newsfeeds.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<421d5299$1@newsgroups.borland.com> <421d944d@newsgroups.borland.com> <421e225a$1@newsgroups.borland.com> <421e56d9$1@newsgroups.borland.com> <421e6cba$1@newsgroups.borland.com> <421e7228$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,f36d577767323824 X-Google-Attributes: gidfeeec,public X-Google-Language: ENGLISH,ASCII-7-bit From: "bcb" <noemail@sorry.com> Newsgroups: borland.public.cppbuilder.internet.web References: <421d5299$1@newsgroups.borland.com> <421d944d@newsgroups.borland.com> <421e225a$1@newsgroups.borland.com> <421e56d9$1@newsgroups.borland.com> <421e6cba$1@newsgroups.borland.com> <421e7228$1@newsgroups.borland.com> Subject: Re: get text from javascript? Date: Thu, 24 Feb 2005 21:00:53 -0500 Lines: 56 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 NNTP-Posting-Host: 24.184.197.61 Message-ID: <421e86d1$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1109296849 24.184.197.61 (24 Feb 2005 18:00:49 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!feeder2.on.meganewsservers.com!meganewsservers.com!textfeed1.on.meganewsservers.com!38.119.100.83.MISMATCH!news-out.nntp.be!propagator2-sterling.newsfeeds.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail