IT Community - Software Programming, Web Development and Technical Support

How can I automatically load another page or reload the same page?

This is a discussion on How can I automatically load another page or reload the same page? within the C# Programming forums, part of the Software Development category; You can do this by using Client-Pull or JavaScript. or you can do this by using Client-Pull or ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > C# Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 07-16-2007, 12:10 AM
Archer Archer is offline
D-Web Programmer
 
Join Date: Jun 2007
Posts: 52
Archer is on a distinguished road
Default How can I automatically load another page or reload the same page?

You can do this by using Client-Pull or JavaScript. or you can do this by using Client-Pull or JavaScript.

Here are the instructions for Client-Pull method using <META>:

1. Use <META> in the <HEAD> section of your document.
2. Write HTTP-EQUIV and CONTENT in <META> to accomplish client-pull.
We have chosen some of the best advanced editors there are. We are aware about that you all have different demands, so this is just the software's we recommend.
Examples
To reload the document itself:
<HEAD>
<META HTTP-EQUIV=REFRESH CONTENT=5>
</HEAD>
CONTENT=5 means wait for 5 seconds to reload the page.
To load visitors to another page:
<HEAD>
<META HTTP-EQUIV=REFRESH CONTENT="5;URL=http://someurl.com/">
</HEAD>
URL=http://...... This is the URL of the page you want to load a visitor to.
That's it. Is it easy? Remember that HTTP-EQUIV will work in some browsers such as Netscape 2.0 and Internet Explorer 3.0 or higher. So, don't forget to make an alternative for visitors who are using old browsers.
Another alternative is using JavaScript.
<html>
<head>
<title>Auto Reload</title>
<script language="JavaScript">
<!--
var time = null
function move() {
window.location = 'http://yoursite.com'
}
//-->
</script>
</head>
<body onload="timer=setTimeout('move()',3000)">
<p>see this page refresh itself in 3 secs.<p>
</body>
Above is an example of JavaScript that will reload a page in 3 seconds. See timer=setTimeout('move()',3000) 3000 is number of milliseconds which equals to 3 seconds. If you want to load visitors to another page, change the URL, window.location = 'http://yoursite.com', to your destination.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there any way to load data in dropdownlist based on the other without Page Refresh poornima ASP and ASP.NET Programming 2 03-15-2008 02:38 AM
'Page' ia an unambiguous reference between 'System.Web.UI.Page' and 'Project1.Page' poornima ASP and ASP.NET Programming 1 03-05-2008 03:12 AM
Is there any way to Call or Load a page from the Class File?(Question) kingmaker C# Programming 1 02-27-2008 09:38 PM
How to transferring user to new web page automatically? oxygen HTML, CSS and Javascript Coding Techniques 1 07-27-2007 03:53 AM
What methods are fired during the page load? prasath ASP and ASP.NET Programming 1 07-18-2007 03:04 AM


All times are GMT -7. The time now is 09:11 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0