refresh some pages every 2 seconds

K

Kevin

Hi guys,
I want to refresh some pages every 2 seconds.
however, these html pages are not in my site, they could be any pages from
yahoo.com or msn.com.
I can create a page, which redirect to public internet html page, but how
can I do this in a loop?
do I need to write a console application to make it work?


thanks
k
 
S

S. Justin Gengo

Kevin,

Two ways I can think of:

1) Use a frame / iframe to call the other page. Then use client side code to
refresh the frame.
2) Get a copy of the page via an html request object, place the entire page
into a literal control within your own page. (This method may cause
unexpected results depending on the code contained in the other pages. For
example if they include a form tag or two it could mess things up a great
deal. You may need to parse the string returned to eliminate things like
that.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 
K

Kevin

I don't think frame/iframe is possible.

for example:
having navigation.html and main.html in the frame.
I don't think a frame can contain aspx page. therefore just plain html is
not possible.


<META HTTP-EQUIV="Refresh"
CONTENT="5;URL=http://www./your_host.com/your_site/your_page.html">

so this refresh can only refresh page on nav.html. The point is I want
refresh happen on main.html every 2 seconds.
I understand client code needs to be on nav.html. but still, it's not
possible
 
S

S. Justin Gengo

Kevin,

Here's the way it would work:

You split your page into two frames any size. Let's say the top frame is
very small. Then load a page into the top frame, let's call it refresh.html.

The refresh.html page will contain a javascript with a timer that refreshes
the bottom frame, something like

window.parent.mainFrame.location.reload();

Now, load your .aspx page into the bottom frame.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top