i have a div of height 500px and width 800px. i have set it as auto on over flow and usually i have 500 records displayed so it scrolls. lets say i trigger an even on row number 478 inside that scrollable div and that event causes a page reload, can i go back to that same position in side that div? how?
I would like to have the scroll box content to go to the same position that it had before the page is refreshed rather than go to the top of the scroll box content. In other words, if the user scrolls down, then refreshes the page, I want to scroll box content to come back to the same position after the refresh.
I have a fairly conventional page split into basically 2 divs one at the top of the viewport and the other at the bottom. The top div represents the header and the bottom div represents the content.
I have a problem in that the content loads in dynamically and when you scroll the content on a page and then click a link to navigate to another page the new content loads partially scrolled, and I need the scrollbar to always start at the top of the page so that the content also does.
Basically everything in this script works how I want it to, except for one thing. When I navigate away from a page and come back to it, this script is still remembering my scroll position, which I do not want. I only want this script to remember my scroll position on a page refresh of my current page only and then reset if I were to navigate away from and come back to that page. How would I go about modifying this script to work how I want it to?
Apologies for the almost duplicate post but thought this was much clearer description of the issue than what I originally posted.
I'm trying to do simple integration with a third-party web application. The app has an 'Action' button on all pages that can be associate with a JS function. Our application is very proficient at parsing text provided it is in some reasonably standard structure.
Is what we are trying to do is have a JS function that can be called from any page in their system that will provide a reasonable representation of the text on the screen. I need something close to document.body.innerText; the problem with this function is that it strips spacing from tables so we can't get consistent layout.
The consistent layout I am looking for would be the same as if you did the following on any page:
1) Select all 2) Copy 3) Paste to notepad
Is there a function or process that will retrieve all text and retain formatting?
I have a text box if a user enters a phrase he enters it within single(') or double quotes(").
If the properties for test box are like this <input name="test" id="test" value = "<%=queryText"%>"> then the text box value is blank after submitting the form and when sourcecode is checked the value is ""testing"".
if modified to <input name="test" id="test" value = <%=queryText"%>> then the value is shown after submitting the form as testing without quotes
The page is JSP search page.After submitting the page appears with all the results since it is a search page How can I retain the value as it is when the value is entered in quotes.
I'm using a plugin in Wordpress that checks for mobile browsers and sets a variable to "true" if a mobile browser is being used. I have a script I want to use on the same page where I'd like to use that variable rather than have to redo the check again. Is it possible to make a variable in one script global so that it can be used in a separate script on the same page? Greatly simplified, I mean ...
Using a similar concept, I have another application that uses a textbox like an editor window and has a save and other buttons. Problem is - when I save/post/reload, the textbox returns to cursor the top again.
How can I preserve / save the exact cursor spot and return to the exact same spot I was in before I saved. Code:
My site's working perfectly in the other browsers, and when I delete line 28 (see below) it works in IE but not exactly how I want. Is there a way to retain two jquery references on a single page in IE?
Rather than have several different pages, an app was designed to have different sections, all on one page. To get to the different sections the browser is scrolled down. It may take several submits before everything gets filled out correctly. The user complained because the page would not scroll to the previous position, code was installed to save and restore the page position, but it doesn't always go to the same place. Sometimes it does. Sometimes it doesn't. Two text boxes are used to save position, and the page is regenerated with x and y as literals by the server. The problem seems to be what values are saved as the page is submitted. Code:
I've got a div with an id of messages - It is essentially a chat system however chat usually adds messages to the bottom of a list which means the messages do not get pushed down while you are reading them. This system instead adds the messages to the top. I need a way of finding the current scroll position so that when a new message is added the scroll remains in the same place.
Or, is there a better way to achieve what it is I'm trying to do? I just want to have my iframe automatically scroll to specific position on the webpage.
I am making an iphone app...the how-to section is basically one long page that shifts the view to a different div on a touch event. So, say I scroll down 50 lines on div1 and click a link to take me to the top of div2. How would I maintain the scroll position of div1 so when i click 'back' it shifts the view back to div1 and to the last position they were at?
how to automatically scroll the page inside an IFrame? I have an IFrame that has no scroll bars, but there's a bit of whitespace that I want to get rid of. Unfortunately, the page in question doesn't have an element in the right area with an ID that I can anchor to.