"trower" <pa*********@mottmac.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
I would like to be able to grab another sites source code and put it
into a field on my form so that I can then grab information from it.
The website is :
http://www.oddschecker.com/oddscheck...s/559716x/sid/
520998
(You may need to change the 559716 to a larger number if it doesn't
work)
Can anyone help ? I have tried a few things like view.source, iframes
but am either doing things wrong or they are being blocked.
Thanks
Paul
Will this help? Watch for word-wrap.
<html>
<head>
<title>oddschecker.htm</title>
<script type="text/javascript">
function Odds() {
var sURL =
"http://www.oddschecker.com/oddschecker/mode/o/card/m14099x/odds/559716x/sid
/520998";
document.getElementById("odds").innerHTML = sURL;
var oXML = new ActiveXObject("Microsoft.XMLHTTP");
oXML.Open("GET",sURL,false);
oXML.send();
try {
var sXML = oXML.ResponseText;
sXML = sXML.replace(/</g,"<");
sXML = sXML.replace(/>/g,">");
document.getElementById("odds").innerHTML = sXML;
} catch(e) {
alert("Failed!");
}
}
</script>
</head>
<body>
<input type="button" value="Odds" onclick="Odds()">
<hr>
<span id="odds"></span>
<hr>
</form>
</body>
</html>