Jump to content

Refresh Without Jumping To Top Of Page


Distortion

Recommended Posts

Sometimes I want the page to be refreshed to show updated data from the database. I use the header(); funtion for this.When the 'refresh' button is at the bottom of the page it'll jump to the top of the page, which I find very annoying. Is there a way to refresh the page without changing the view? Preferably in php, otherwise in another language.

Link to comment
Share on other sites

Hmmm... yes that is clever, maybe I could use that somehow. But I meant to go exactly where you user was before the page refreshed, not a particular point on a page.Try refreshing a long page on internet explorer and firefox. Firefox will jump to the top of the page, which is what I don't want, and internet explorer will keep the same position.

Link to comment
Share on other sites

That is up to the browser. If you were hoping for a special function or tag, there is none. You could maybe put something together in javascript. It would mean getting the scrollTop value of the body or html element and posting that data to your PHP script. Then send it back in the document somehow and let javascript scroll back to that position. Or you could store it in a cookie. That would save the trouble of posting it and sending it back. Just read the cookie on page load and scroll to that place.Google things like scrollTop, window.scroll and window.scrollTo

Link to comment
Share on other sites

WOW! This is just ultimately scary. Look at my first post and compare it to this, which I googled.

Sometimes I poverty the tender to be refreshed to exhibit updated accumulation from the database. I ingest the header(); funtion for this.When the ‘refresh’ fix is at the lowermost of the tender it’ll move to the crowning of the page, which I encounter rattling annoying. Is there a artefact to change the tender without dynamical the view?Preferably in php, otherwise in added language.
http://ebookslab.info/free-tutorials/refre...op-of-page.htmlDoes this site steal content here but has a code that finds synonyms or something... very weird :).
Link to comment
Share on other sites

That's like translated into something Asian and then translated back into English. Or like you said, an anti-plagiarizer thesaurus on drugs. It's especially funny because I teach College English for a living. You should see the crappy research papers I get . . .

Link to comment
Share on other sites

That's like translated into something Asian and then translated back into English. Or like you said, an anti-plagiarizer thesaurus on drugs. It's especially funny because I teach College English for a living. You should see the crappy research papers I get . . .
You're a college english teacher? You seem to be an expert at web development. how come you dont go into that?
Link to comment
Share on other sites

That blog is one of the most ridiculous things I've seen. They take our posts, but only the first posts (not the replies), turn the language into something terrible, and post it on their blog. Who does that help? I see their "blog" articles signed by people like jkloth and Son, asking questions like what do the icons on this forum mean and what does null mean. They don't bother to pull the answers, only the questions.

Link to comment
Share on other sites

EDIT: I think I misunderstood your question at first. When you mentioned "going into that" I thought you meant you wanted me to talk about my background. So here I am doing that. The real answer to your question is at the end. Hope I'm not too boring! :)

You're a college english teacher? You seem to be an expert at web development. how come you dont go into that?
If you really want to know . . . Computers were always a hobby of mine. I cut my teeth in the 1970s on an old Digital PDP that interfaced with a teletype machine. No monitor at all. Programs were stored on strips of paper that could get to be 50 feet long. That sounds ridiculous, but there was one advantage over modern media: they could be repaired with Scotch tape!I have no idea why I went into English. Personal computers were dinky and rare when I went to college, and I had no interest in corporate computing, which mostly meant using FORTRAN to access accounting data. Blecch.I got my first PC when I was in grad school and fell in love all over again. I remembered some BASIC from my high school experiences, and my PC came with GW-BASIC built in. I bought the thing to write papers on, but I started programming right away. I got a C compiler for Christmas that year. The Internet was still all about FTP and Gopher (anyone remember that?), so I wasn't too interested. I mostly wrote screen savers and games.When I took my current teaching job in 1992, I had Internet access in my office, which was kind of a big deal. Even then we were on a T-1 line. Programming had got pushed to the side when I was writing my thesis. But suddenly everyone was talking about this thing called Mosaic, the first serious web browser. I investigated a little and then set up a server on my desk. I literally had the only web server for 40 miles in any direction! Of course, HTML was primitive in those days. You could learn all the tags in an afternoon. JavaScript and CSS did not yet exist. Then Netscape came along, the Internet went corporate, and everything changed quickly.I stayed interested because I saw ways the web could help my teaching, and also because it was easy to make money back then. You just walked door to door and asked who was interested, and a lot of people were. My skill set developed as the web developed. If a new thing came along, I wanted to do it. So becoming an "expert" hasn't ever seemed like a big deal, because I didn't have to learn everything at once.What I do web-wise is consulting. I choose the work I want to do, and that's not a problem, because my regular job comes with insurance and a pension and free lunch on Tuesdays. If I had to report to a boss, I think the web would get boring real fast. And if I was the boss, I'd probably spend more time in meetings than actually developing. So what I'm doing now works for me.
Link to comment
Share on other sites

interesting story DD. I'm just a student in college, but im not really sure which career path i should take. My major is industrial engineering/engineering management and i got a minor in web development. I like web development a whole lot more, but sometimes i wonder if I'd still be interested if I did web work for a company and i'd have to report to a boss. I do spend a lot of my spare time just reading books and learning more about php and jQuery, and making my own projects.

Link to comment
Share on other sites

  • 1 month later...

DD- I find your background very interesting. I do web design as a hobby for a couple of organizations. I learned HTML a few years ago, then CSS, and now I'm learning PHP. I started out on a Color Computer by Tandy in 1981, and learned Basic back then. Didn't get into computers much until I started working as a librarian in a small community, and the library director was a computer geek. He had internet access in 1997, before anywhere else for one hundred miles. But, to the point, I have appreciated your help in this forum when I've had questions. I have another question, but will post a new topic, so it won't be confused with this thread. Thanks again for all of your help. I got a real laugh out of the re-translated post earlier.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...