Hi folks,
Here’s a puzzler for you
I want to create a new window with a page loaded inside and use javascript in the calling page to examine the contents of the new page (after waiting a couple of seconds) and based on what the new page holds branch off in different directions. Its almost a bit like page scraping but client side on my PC through the browser.
How would I accomplish this, I know the basics of javascript (very basics) and thought something along the lines of this might work:
<html>
<script language="javascript">
function openwindow()
{
winobj = window.open("http://www.google.com","tester1","height=200,width=400,status=yes,toolbar=no,menubar=no,location=no");
}
function chkstuff()
{
newstuff = winobj.document.getElementById("body").value;
alert(newstuff);
}
</script>
<body>
<form name=frm>
<input id=text1 type=text>
<input type=button onclick="javascript:openwindow()" value="Open window..">
<input type=button onclick="javascript:chkstuff()" value="Chkstuff">
</form>
</body>
</html>
But it doesnt and Ive not really done much coding in the last while (before I was doing more PHP stuff).
Could someone lead me in the right direction on this one please.
many thanks,
Rik
PS: That code above was just me trying to access the page thats loaded up and ALERT it up on screen, just in case anyone thought I was completely crazy