|
#1
|
|||
|
|||
|
<html>
<head> <script language="JavaScript"><!-- function MyReload() { window.location.reload(); } //--></script> </head> <Body onload="MyReload()"> Heloo .. how r u ? </body> </html> **i tried this but the page always continuing refresh, any other ways to refresh it once only when loaded? Thanks |
|
#2
|
||||
|
||||
|
The easiest way to do this is create a seperate page. It's also possible to pass a GET variable to the page, then retrieve it via ECMAScript (i.e. "index.htm?firsttime=no"). If you search the archives, you'll find a few examples of this.
__________________
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP! |
|
#3
|
||||
|
||||
|
Code:
<body onload="if (location.href.indexOf('reload')==-1) {location.replace(location.href+'?reload')}">
__________________
WWWWWWWWWWWW - John________________________ Really Show Your Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate |
|
#4
|
|||
|
|||
|
oh. i am using a iframe inside a html. however, that iframe is using MySQL to get data. I do not want to refresh my html. i just wanna to refresh the data in the iframe as it is goin to retrieve data from database.
|
|
#5
|
||||
|
||||
|
How often do you want to refresh the data in the iframe? In any case you should be able to do something like this:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript">
function update(){
setInterval("dataFrame.location.replace('data.htm')",5000)
}
</script>
</head>
<body>
<iframe onload="update();" name="dataFrame" src="data.htm" width="300" height="250" scrolling="auto" frameborder="1"></iframe>
</body>
</html>
__________________
WWWWWWWWWWWW - John________________________ Really Show Your Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate |
|
#6
|
||||
|
||||
|
May I suggest AJAX? http://developer.mozilla.org/en/docs...etting_Started
__________________
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP! |
|
#7
|
|||
|
|||
|
Heres what i did to refresh a page once when visitor click back browser button:
1. framset with 2 pages. created 1 mainframe page and 2 blank hiddenframe pages. frameset parts: ......<frame src="hiddenframe1 url" name="hiddenframe" id="hiddenframe">...... 2. mainframe parts: <body><script language="javascript"> a=top.hiddenframe.location.href; if (a.match('hiddenframe2 url')){top.mainframe.location='mainframe url';top.hiddenframe.location='hiddenframe1 url'}</script> <form......<input type="submit".......onclick="top.hiddenframe.location='hiddenframe2 url';"> </form>....... |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
|
|