Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
11-17-2010, 08:03 AM #1
- Join Date
- Jun 2008
- Thanked 9 Times in 9 Posts
document.location.reload(true) vs. regular refresh
I am writing a little bookmarklet to help me with the online registrations at my school. Here is the setup.
Load up a page on the domain.
Remove all body elements.
Insert an iframe.
Set iframe to page for class roster search.
(in iframe on school search page) Select class search options, POST the form data, and view results in frame.
*This works perfectly, but I need to have it refresh results every minute or so.
When I use frame.contentDocument.location.reload(true); the frame loses the post data or something and the page is broken.
BUT when I just right click on the frame and select "reload frame" it works perfectly.
Whats the deal here?
PS: using chrome
Last edited by hotwheelharry; 11-17-2010 at 08:21 AM.
11-17-2010, 04:05 PM #2
- Join Date
- Oct 2008
- Some say it's everything.
- Thanked 397 Times in 390 Posts
I'm not sure why it would do that. I believe it is supposed to be 1:1 with the reload button on the browser, which would re-post the data.
Even if you succeed in getting the reload to re-post the data I'm pretty sure that the user will (or at least "should") get a browser alert box asking if they want to send the post data again every single time the reload occurs. That will wreck your user interface and user experience, so it's probably not worth wrestling with the current issue.
Can you switch over to a GET structure on the target page (the class search page)?The object of opening the mind, as of opening the mouth, is to shut it again on something solid. –G.K. Chesterton
See Mediocrity in its Infancy
It's usually a good idea to start out with this at the VERY TOP of your CSS:
Seek and you shall find... basically: validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting