in the parent window, i have some objects that will release a pop-up window. in the pop-up window you can make various changes that will affect the database. to see those changes in the parent window, i need to refresh...right?
well, when i refresh...if you're working at the bottom of the page it pops the scrollbars all the way back up to the top. is there a way to reposition the scrollbars without the use of anchors?
I have three DIVs that are stacked vertically. Each section (div) I want to be able to 'collapse' or minimize, and when that happens, for instance when the first div is 'minimized' the second two divs shift their left/top positions to fill the space. Right now, I'm doing this automatically, by creating a javascript function and changing the top/left and "height" properties manually.
I'm having some trouble with absolute positioning:
I have a main div, with some nested divs inside, one of which is "position:absolute". When a user hits a button, a message will appear at the top of the div (by using "myDiv.style.visibility = 'block'"), which pushes all other sections, relative or absolute, down appropriately. This is what i want.
However when the message div is clear (using "myDiv.style.visibility = 'none'"), all the relative divs go back to their original position, but the absolute div stays at its pushed down position.
ive tried several complicated schemes to correct this, including setting the absolute sections top to certain values, and it doesn't want to move back.
Does anyone know a solution to this problem, or of a way to "refresh" a divs position?
After a javascript-generated post event (this is a post, not ajax messaging) the current screen has to be redrawn. But on *long forms* (longer than a single screen) then the current screen positioning is lost, and the current form ends up redrawn, with a different vertical positioning--after the post event.
However, If I sent the x,y mouse position as post parameters, and if the current widget (that generated the post) had a well-known anchor tag name, would there be a way to combine that much information, after the post, in order to redraw the form close to it's original vertical positioning?
Does anybody understand why the technique described in http://www.macromedia.com/devnet/se...ositioning.html
doesnt work in Netscape 6/7 and Mozilla? I tried it out but to no avail. I am certainly not a (javascript) programmer / DOM expert but it seems to me it should work .
I need some help on how to reposition a layer depending on the position of an image? I know this should be somewhere in the forum, but I searched without success.
I use $().load() to place an HTML snippet from the server into a dialog box which i then need to position relative to the size of the element which has just had the HTML loaded into it. When the main HTML page DOM is ready, I hide() the dialog box, and then use fadeIn() to show with various click() events. I have managed to position the dialog box in the centre of the screen given that there is no content loaded.
However, it seems that when I load the new content into the dialog box the new dimensions aren't taken into account untill the next time load() is called.
Is there a way to get the new dimensions of the element before the dialog is shown in order to position it centre screen?
Here is my code:
function showDialogBox(sender) { var width = $(document).width(); var height = $(document).height();
it's possible to bind a function to an element that is fired if that element is 'moved'/repositioned via the browser.
For a more specific example what I have is a function that calculates height and width of certain elements to allow them to all fit nicely on the page without having scroll bars, and this is bound to the window onresize event. It works nicely most of the time but occasionally something will change the height of one of the elements and this effectively bumps one element right off the page.
So I'm wondering if its possible to have an event bound to an element that is fired when an elements position is moved/recalculated by the browser? Short of polling every second or so, to see if it has moved/recalculate layout.
IE6 in standards mode doesn't seem to hide scrollbars on the body element (overflow:hide) Ain't this a quandary. I have it in my head that I need to specify html instead. The scrollbars do hide on Gecko browsers though, so there is definitely a disagreement among browser developers on how to implement scrollbars (as a side note, Gecko browsers with their notoriously bug-ridden resize code seem to always screw up when asked to stretch and scroll divs, even when the page is reloaded on every resize!)
My first thought is to modify the CGI that generates the style sheet as I already have code that deprecates the document type when hidden scroll bars are required on IE6 (but not IE5.) This is based on the simple empirical evidence that the scroll bars are still there on IE6 in standards mode, so the optimal document type (XHTML strict) cannot be used. So I could just change this to output an html style (rather than a body style) for IE6 and lose the deprecation (it wouldn't be needed at this point.)
So the question is this. Given that CGI-based processing of browser versions for these kinds of tweaks is taboo, what would you check on the client side before dynamically generating the style for the body and/or html element? It doesn't seem like you could just send both as this would surely break some older browsers (I know you can do tricks with comments and such, but that only works for NS4 and maybe IE3 AFAIK.)
documentElement is the only thing I can think of that indicates standards mode and NS6/Mozilla support this AFAIK.
IE Conditional comments perhaps? I would hate to hard-code a test for a browser version number into the actual document (for obvious reasons), but I guess it is an alternative if the browser version is exposed to these things.
I don't see any other way to deal with a situation like this than with server-side code that looks at the browser's version number and makes the necessary adjustment. And there are lots of little differences like this that just don't seem to have viable client-only solutions. There's DirectX stuff (probably is an object detect for that) and funky colored scrollbars (hey people ask for them) and document margins (Opera did them slightly differently than the rest as I recall) and now this scrollbar thing.
I have used a textarea to display typewriter effect text. The scrollbars are displayed by default. What is the code to disable the scrollbars in a textarea form field? < scrolling="no"> does not seem to work.
<script> var newWindow = null; var scrolling = 0;// Controls whether the layer is scrollin or not var yT = 25;// Pixel position the top of the scrolling layer should be set to var lT = 25;// Initial position for the top of the layer var yI = 5;// Increment that the scrolling layer should move at var yH = 0; var domStyle;// Stores the generic DOM for the scrolling layer to access style properties var dom;// Stores the generic DOM for the scrolling layer var isDHTML = 0; var isLayers = 0; var isAll = 0; var isID = 0;
Is there anyway to detect if scrollbars were made visible in a textarea? I'm not talking about initial setting of the scrolling attribute, but rather whether scrollbars have been added either horizontally or vertically based on the users text input?
I'm looking for an solution to find out the real vertical viewport - without the height of horizontal scrollbars.
I have two frames side by side. The left one declared 'scrolling="no"' and the right one 'scrolling="auto"'. For the left frame it is important to know if the right frame has a horizontal scrollbar and how sick it is. So I have tried to compare the viewport of both frames.
Using 'window.innerHeight', 'document.documentElement.clientHeight', 'document.body.clientHeight' or 'document.body.offsetWidth' I get the height including the scrollbars.
The same problem with two frames (rows="50%,50%) i've solved with block elements declared with a width of 100%. Comparing the offsetWidth of both, I can see if there is a scrollbar in one frame. But with frames side by side that doesn't work.
I was checking on jQuery plugins, but most of the scrollbar ones are using like 4 - 5 div classes just to stylize one scrollbar and most of the classes names must be specific to make it work with the plugin, is there any way to give some style to a scrollbar without doing all that coding?
How exactly does the sizing of the grid work? I have a grid that I've tried to experiment with and it seems like no matter what setting I use, there is a vertical and a horizontal scrollbar. the only thing that changes is if it stretches to fill the its container div. How do I get it to fit within a specific width and also to not display scrollbars?
I am trying to add a link to a web page which will open a new window which has no scrollbars ,toolbars,menu etc for a nice clean look(the window will display a flash image display gallery) I know you do this with javascript but am having trouble placing the javascript in the html ,what would be ideal is if someone was kind enough to give me an example of exactly how the complete page code would look with the javascript included,it need only be a very simple page with no content except the link which maybe we could just call sample.
I setup the image popup ( http://www.sitepoint.com/article/res...it-images-size) on our portfolio:www.visualdevelopments.com/portfolio but the large image I want to display the whole thing. Can I set this somehow to add scrollbars so the user can see the entire image if the image is larger then their screen size?
I'm working on a script that involves dragging an element around a page. When it is dragged so that part is out of the window, the scrollbars are activated. Is there a way to turn off this behavior?
I have a div that is filled with content dynamically and is fixed so it will always be in the same place even when you scroll. I need scrollbars to appear when the div is has too much content and goes beyond the screenborder.
I have an iFrame on which I wish to display scrollbars ONLY when the mouse is over the iFrame AND the source of the iFrame is larger than the iFrame can display I am using the following code for the iFrame but believe that I need to add some script to make it work: