Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 726
  • Last Modified:

getUrl : reload window not at top of page

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
eppyfone
Asked:
eppyfone
  • 4
  • 3
2 Solutions
 
Michel PlungjanIT ExpertCommented:
getURL("javascript:window.location.reload(1)")

or

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

where the page has

near the top


0
 
Michel PlungjanIT ExpertCommented:
If you are really desperate do this
getURL("javascript:window.location.reload(1); setTimeout('window.scrollTo(0,0)',10)")

Open in new window

0
 
eppyfoneAuthor Commented:
Hi
The number(1) instead of the empty brackets works.
Excellent

Thanks
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
eppyfoneAuthor Commented:
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
 
Michel PlungjanIT ExpertCommented:
The (1) means "from server"
0
 
eppyfoneAuthor Commented:
I'm noticing that Safari isn't behaving the same .. any reason it doesn't like a forced refresh ?
 
E>
0
 
Michel PlungjanIT ExpertCommented:
Not that I know of... Should work too.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now