Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Auto Refresh
kvarnerexpress
post May 4 2005, 08:59 PM
Post #1


Super Member
*********

Group: Members
Posts: 407
Joined: 13-December 04
Member No.: 2,696



Does anyone know if there is a javacript command to bring the browser to the same part of a long page after a refresh called by a pop up (populating a db).

I have tried various methods including refresh() and reload() as well as redirecting back to the original page in the opener window.

Does this functionality exist ?? please help...
Go to the top of the page
 
+Quote Post
SystemWisdom
post May 4 2005, 10:45 PM
Post #2


Advanced Member
*******

Group: Members
Posts: 117
Joined: 3-May 05
From: A Canadian South of the 49th Parallel
Member No.: 6,544



What you are looking for is possible, but it is not JavaScript.. Rather, it is part of the HTML standard. Just use simple anchor tags (<a>) but instead of using the href attribute, you use the name attribute. That creates an anchor to a page spot (like half way down a long page).. then, when you want to link to that page AT the anchored spot you would use: index.html#named_anchor

The pound sign '#' is a directive that says "look for an anchor in this page with the same name.." or something of the sort..

An example would be:

Filename = mypage.html:
CODE

<html>
<head>
</head>
<body>

<a name="pageTop"></a>

<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>

<a href="mypage.html#pageTop">Go To Top of Page</a>

</body>
</html>


I hope you could follow that.. it is pretty simple really.. And you don't have to direct to the top of a page, it could be anywhere, wherever you put the <a name="pageTop"></a> tag(s) you can link to..

I hope that helps!
Go to the top of the page
 
+Quote Post
nipun
post May 5 2005, 08:05 AM
Post #3


Newbie [Level 2]
**

Group: Members
Posts: 29
Joined: 5-May 05
Member No.: 6,649



<meta http-equiv="refresh" content="page.htm;5">
Go to the top of the page
 
+Quote Post
electriic ink
post May 5 2005, 06:57 PM
Post #4


Incest is a game the whole family can play.
Group Icon

Group: [MODERATOR]
Posts: 1,210
Joined: 11-February 05
From: Heaven
Member No.: 3,709



QUOTE
CODE
<meta http-equiv="refresh" content="page.htm;5">


Just to correct you on your on your code there:

HTML
<meta http-equiv="refresh" content="5;url=page.htm">


A guide to the key points:

refresh - tells the browser to refresh
5 - after 5 seconds
page.htm - to the url page.htm

Notice from snlildude87:
Use [html] tags for HTML codes smile.gif


This post has been edited by snlildude87: May 5 2005, 07:54 PM
Go to the top of the page
 
+Quote Post
azka
post May 10 2005, 08:15 AM
Post #5


Newbie
*

Group: Members
Posts: 3
Joined: 10-May 05
Member No.: 6,863



I have similar problems in my Java application with Swing. The panels refresh only when I maximize/minimize the frame. Can someone tell me how to rectify this?
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Auto Run Java Program(11)


 



- Lo-Fi Version Time is now: 21st August 2008 - 01:38 AM