Jul 6, 2008

Auto Refresh

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > Java, Java Servlets, Java Script, & JSP

free web hosting

Auto Refresh

kvarnerexpress
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...

Reply

SystemWisdom
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!

 

 

 


Reply

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

Reply

electriic ink
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

Reply

azka
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?

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Recent Queries:-
  1. html auto refresh jsp - 4.72 hr back.
  2. auto refresh in jsp - 15.43 hr back.
  3. automatic refresh page in jsp - 43.49 hr back.
  4. html java auto refresh code - 45.59 hr back.
  5. code for auto refreshing the page in java - 46.32 hr back.
  6. on page refresh goto anchor - 61.66 hr back.
  7. auto refresh part page - 63.27 hr back.
Similar Topics

Keywords : auto, refresh

  1. Auto Run Java Program
    Run Java program on double click (10)


      Looking for auto, refresh

Searching Video's for auto, refresh
advertisement



Auto Refresh



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE