•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 375,174 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,192 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 1618 | Replies: 3
![]() |
•
•
Join Date: Aug 2005
Posts: 20
Reputation:
Rep Power: 3
Solved Threads: 0
Everyone knows yahoo mail. When you just logged on to your account you see on the page "You have 0 unread messages". I just womdered is there any way how can i find something on the page using javascript and return as variable. So what i've done is:
1. I have a frame with src="http://mail.yahoo.com"
2. every 10 seconds it refreshes iframe
Now i need to find in the content of iframe that "simple number" and display it on the title.
Example @ http://www.geocities.com/cppforlife/...tml/yahoo.html
thanks everyone...
1. I have a frame with src="http://mail.yahoo.com"
2. every 10 seconds it refreshes iframe
Now i need to find in the content of iframe that "simple number" and display it on the title.
Example @ http://www.geocities.com/cppforlife/...tml/yahoo.html
thanks everyone...
You cannot do this client-side, because that would mean a script from your domain would need access to the contents of a page from another domain, and browsers don't allow that. You'll need to use a server-side language to perform what's called "screen scraping". I found this discussion on client-side scraping: http://ask.metafilter.com/mefi/23180
•
•
Join Date: Aug 2005
Posts: 20
Reputation:
Rep Power: 3
Solved Threads: 0
Thank you for answer but i am not sure because i saw somewhere it.
you can call predefined function find like (ctrl+f) and it will return result.
then you look at the result and take it. sounds easy but how to do that. i am sure i saw that method somewhere ...
Thanks
-------------------------
Also i dont know what's it . Is it bug in IE. Sometimes(if i ususally open page it works but when i refresh it it gives me error) when set interval to 1 milisecond (setInterval("func()", 1)) browser gives me error 'getElementById is null or not an object'.
|
\/
very useful thing that progress bars...
Thanks again
you can call predefined function find like (ctrl+f) and it will return result.
then you look at the result and take it. sounds easy but how to do that. i am sure i saw that method somewhere ...
Thanks
-------------------------
Also i dont know what's it . Is it bug in IE. Sometimes(if i ususally open page it works but when i refresh it it gives me error) when set interval to 1 milisecond (setInterval("func()", 1)) browser gives me error 'getElementById is null or not an object'.
|
\/
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Progress Bars</title>
<script>
var curr=0;
var curr1=1;
var max=8;
var str="";
function add(){
curr++;
str=str.concat("");
document.getElementById('pb').innerHTML="<b>"+str+"</b> "+curr;
}
var count=setInterval("add()", 3000);
function add1(){
curr1++;
document.getElementById('pb1').style.width=curr1;
}
function clearAll(){
clearInterval(count);
clearInterval(count1);
}
var count1=setInterval("add1()", 100);
setTimeout("clearAll()", 200000);
</script>
</head>
<body>
<div name=pb id=pb style="border: 1px solid blue; height: 20px" valign=center></div>
<div style="position: absolute; left: 120px; top: 90px; background-color: red; width: 1px; height: 20px" name=pb1 id=pb1></div>
</body>
</html>very useful thing that progress bars...
Thanks again
A 1ms interval? Yes, I'd imagine that would cause problems. Either it isn't enough time for your function to run, or the element hasn't been rendered yet.
Sorry, you can't run cross-domain scripts. You're welcome to keep searching and correct me if I'm wrong (it won't be the first time!), but your best bet really is to do server-side screen scraping.
Sorry, you can't run cross-domain scripts. You're welcome to keep searching and correct me if I'm wrong (it won't be the first time!), but your best bet really is to do server-side screen scraping.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
- Simple Hash Function for Integer Arrays (C)
- Maximum Array (C#)
- using a varible from main method (Java)
- Anybody can help me make a game? (Java)
- how to reverse a numbers input by user (C)
- estimated prices on websites (IT Technologies and Trends)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Javacript Slide Show
- Next Thread: Passing a Javascript variable to a PHP using <script> call



Linear Mode