Solved

getUrl : reload window not at top of page

Posted on 2009-04-15
7
689 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 500 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 500 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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…

717 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