• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 719
  • 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Featured Post

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.

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