position

Changing Scrollbar Position

Is it possible to change the scrollbar position when the user reaches a certain point scrolling down a web page? For example once you reached half way down down the page the scrollbar would move automatically back to the top. Thanks. ...

Is there a fast way to get the character index of a regex match?

I am creating a Perl script which will have to process the markup of millions of Wikipedia articles - so speed is an issue. One of the things I'm looking for are occurrences of templates, which always look like this: {{template}}. Because these can be complicated and nested, I need to find the start and end tags separately, and know th...

Jquery Firefox error in finding position() of a DIV

Hello, I am facing a weird issue with firefox, I have a DIV tag with ID="popup_layer". I'm using Jquery to find this DIV which works fine : var rightPosition=$j("#popup_layer") But when I try to find the position of the DIV: var rightPosition=$j("#popup_layer").position().left; I get the following exception in Firebug: [Excep...

CSS absolute position alignment

Hi, I have a login form on my website that displays when a user clicks a button. It is a div that floats over other content. It only takes up a small portion of the page (directly below the sign in link). It all works fine apart from one small thing. It displays aligned to the left of the sign in link (i attempted a diagram below). ...

Given an x,y coordinate, I need to find all html elements underneath it.

I am building an app where I repeatedly need to get lists of html elements sitting under a specific location (x,y relative to the viewport, e.g.). I am considering the following approaches, but none are satisfying: (1) Go through the html, build a data-structure that keeps track of the x,y position of every element (x,y -> set of eleme...

Javascript to modify all absolutely positioned elements

Hi Effectively what I need to do in JS is move all absolutely positioned elements down by x pixels. Do I need to loop through every element and try to figure out if it's positioned absolutely? Or is there a better way? Thanks, Mala Update: specific: I am using a bookmarklet to inject JS onto any page - thus I cannot change the markup ...

Start an app and set its size and position in windows

In Windows I would like to be able to run a script or application that starts an another application and sets its size and location. An example of this would be to run an application/script that starts notepad and tells it to be 800x600 and to be in the top right corner. Does anyone have any ideas regardless of language? ...

JQuery reposition div elements on page load

Hi, I am implementing a portlet/widget JQuery interface using Interface and JQuery. The user drags and drops widgets adn the screen can handle it. I am able to use serialize which displays the order of the div elements on the screen. I can save this in a cookie or DB - that doesnt matter yet. My question is how is it possible to load a...

c# datatable insert column at position 0

Hi, does anyone know the best way to insert a column in a datatable at position 0? ...

How to change the location automatically of a div when it's right of left side element is removed from document.

hello guys, Here i have a probs, i wanna sift automatically a div when it's right side element is removed from document. let all the elements are start from the right to left side like D C B A. in above example A is the first Div B is Second and so on. what i want that when i removed element A, the element B that was after A will b...

iPhone > Set position of an control

Hello, I'm currenly learning Obj-C and try to find the easiest way to set a position of an control. So this works to set the object +100px: [panel setFrame:CGRectMake( panel.frame.origin.x, panel.frame.origin.y + 100, panel.bounds.size.width, panel.bounds.size.height) ]; But of course this is painful. Unfo...

What listbox event should I use to set scroll position.

on my page, I have a listbox in an update panel. I am successfully trapping the scroll position, however when the update panel refreshes, I'm having trouble finding a suitable javascript event in which to call my function to set the scroll position. Any ideas? i had really hoped that "onAfterUpdate" was going to work, but no... ...

Finding the offset client position of an element

Hi all, How to find the offset client position of an element using Javascript? (I assume the same code can be written in a BHO or Gecko/NPAPI). The problem I am facing is a way to find out the offset client position of the element. The e.srcElement.offsetX/Y does not give the correct value always (same goes for clientX/Y). In some cas...

Css, child-divs and floating

Hello... I'm tired to work with this divs :(. Here is my problem: I have 2 divs: <div id="content"> <div id="row_left"></div> <div id="row_middle"></div> <div id="row_right"></div> </div> <div id="bottom"></div> css: #content { overflow: hidden; width: 100%; } Content-div is including another 3 divs, which should stay horiz...

How Do I Get the Usable Coordinates of the Screen in Delphi

With Screen.DesktopHeight and Screen.DesktopWidth, I can get the size of the "virtual" desktop and I believe that works for one or multiple monitors. I save the position (top and left) and size (height and width) of my application into the registry when it closes. When it opens, I want to ensure it is entirely visible, since it may have...

Div positioning

Hey guys, I am giving the if else statements a stab, not sure if I am writing this correctly… Trying to get it so that if the popupHeight dimension is bigger than the windowHeight dimension, then it would position it to the top of the viewport + 10px… $("#data").load("/content/" + htmlName + ".html", null, function(){ //Set Variable...

Jquery dialog box not positions center screen

I have a jquery dialog box that is mean't to position in the middle, however it seems slightly off center vertically. Here is the code: $(\'#add_box\').dialog({ autoOpen: true', width: 300, modal: true, resizable: false, bgiframe:true }); Any ideas why this won't center? ...

html - divs position to relative.

Hi guys, I have a question: There are 3 divs. 2 of them should have their background-images and their position is to the 2 sides of user-area. (one to the right, and one to the left). The 3rd div should be over them and full-width. How can I do this with css? ...

2 divs position

Again me with my divs =(. I have this: <div id="header"></div> <div id="body"> <div id="..."></div> <div id="..."></div> <div id="content"></div> </div> <div id="footer"></div> and css: #body { width: 100%; margin 0 auto; } #content { position: absolute; height: 200px; width: 100%; } #footer { height: 63px; clear:both;...

How to find the position or location of string in given document.

How to find the position or location of string in given document.I have one word document and i want to store all its words and word positions in database so thats why i need to find the position of the words. so please tell me how can i find position or location of word or string in given document. Thanks in Advance. Dhiraj ...