Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

getUrl : reload window not at top of page

Posted on 2009-04-15
7
Medium Priority
?
714 Views
Last Modified: 2012-05-06
Hi
I have the following code on a button which causes the page to reload.
getURL("javascript:window.location.reload()")
The button is positioned way down the page.
When the page reloads in IE I'm at the top .. great.
When it reloads in FF it goes to where the button is (way down the page) .. not great.

I can't find a way of adding an anchor to the link ..

Any help please ..

E.
getURL("javascript:window.location.reload()")

Open in new window

0
Comment
Question by:eppyfone
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 2000 total points
ID: 24155071
getURL("javascript:window.location.reload(1)")

or

getURL("javascript:window.location='someurl#top")

where the page has

near the top


0
 
LVL 75

Assisted Solution

by:Michel Plungjan
Michel Plungjan earned 2000 total points
ID: 24155075
If you are really desperate do this
getURL("javascript:window.location.reload(1); setTimeout('window.scrollTo(0,0)',10)")

Open in new window

0
 

Author Closing Comment

by:eppyfone
ID: 31570514
Hi
The number(1) instead of the empty brackets works.
Excellent

Thanks
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:eppyfone
ID: 24155792
Hi
version with (1) instead of () works
version with url doesn't
version with (1) and settimeout works .. but could just be the (1) ?
Thanks anyway .. SOLVED
E.
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 24157188
The (1) means "from server"
0
 

Author Comment

by:eppyfone
ID: 24157701
I'm noticing that Safari isn't behaving the same .. any reason it doesn't like a forced refresh ?
 
E>
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 24158004
Not that I know of... Should work too.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question