position

Setting HTML page vertical position with JavaScript

I have an HTML page that scrolls up and down (not a lot, but it does scroll). I'd like to set the scroll position in the page after executing some JavaScript. Can I do that? I'm using jQuery to inject some additional HTML at the bottom of the page and I'd like to programmatically scroll to the position of that new content after it's ad...

Scroll to a postion in a Web Browser using Wpf

I cannot seem to programmatcally scroll in WPF in a normal Windows Form I would use the code below but that property does not exist in WPF. HtmlDocument doc = this.webBrowser1.Document; doc.Body.ScrollTop = 800; return; Is there an alternative to doing this? ...

Qt QListwidget Icon Reposition and able to be saved.

I have created Qlistwidget with Icon viewmode. I can drag and drop icon within the list view But how do i know the position of the icon so that i may save the position and display icon at the same position when i next time start my program. Thanks you... ...

Dynamically retrieve Html element (X,Y) position with JavaScript

Hi all I want to know how to get X and Y postion of HTML elements such as img, div in JavaScript. thanks ...

Maintaining/updating record order in mysql

I have a table of records in mySql. I need to maintain an order for them as specified by the user. So I've added a 'position' column. What would be the SQL statement to update all the records when I move a specific record? I've got something like: UPDATE items SET position = '2' WHERE id ='4'; UPDATE items SET position = position+1 WHE...

Determining allowable moves on a grid

Can anyone suggest a suitable way of figuring out a pieces allowable moves on a grid similar to the one in the image below. Assuming piece1 is at position a1 and piece2 is at position c3, how can I figure out which grid squares are allowable moves if piece1 can move (say) 3 squares and piece2 can move 2? I've spent way too long devel...

How to retrieve iframe top position in IE6 using JavaScript?

Does anyone know how to retrieve an iframe top position within a page for IE6 using JavaScript? The following code works for IE7: window.frames(0).screenTop but the same code in IE6 retrieves the wrong value (far too high). Any ideas? ...

Position child div relative to grandparent div

I got a CSS Problem, and I don't know if it's actually possible to achieve what I want. Here's a sketch to illustrate what I want to achieve: http://dl.getdropbox.com/u/103519/pkstudio/IMG.jpg And here's the demo page: http://dl.getdropbox.com/u/103519/pkstudio/menu_test.htm Actually the child div should be positioned relatively to the...

Saving element position and size (JQuery ui resizable and draggable)

Hi, I'm new to jquery and even javascript. I'm trying to create a system where you can edit very simple, static page by logging in and just dragging and resizing divs. The system works to the point where you get to edit the site, but the problem is how to save the coordinates and sizes of the divs. The system doesn't use mysql, since t...

iPhone UITextView position relative

Hi, i got a news page (a view) at my application and it has news' image and text. Text is in a UITextView and i want my text to start next to image and when the image ends continue from the down of the image, like the text is surrounding the image. i tried autoResizingMask but as i ve understood it is for the relations between subview a...

How do I get the coordinate position after using jQuery drag and drop?

How do I get the coordinate position after using jQuery drag and drop? I want to save the coordinate to a database, so that next time I visit, the item will be in that position. For example, x: 520px, y: 300px? EDIT: I am PHP and mysql programmer :) Is there any tutorial out there? ...

Getting element name based on position in DOM

Hello. I want to find the name or ID of a element where I got top and left position. I know how to use jquery to find the position of an element (Hovering over the div will trigger that position text will appear on screen): $(".item").hover(function () { var eleoffset = $(this).offset(); $("#mouse").text("Mouse - Top: ...

How to name a struct that represents both a size and a position?

I have a structure named WaveSize to represent both an amount of samples or an amount of time, but I'm also using this structure to represent a position or an offset within a wave. While it's pretty common to represent both sizes and positions within a coordinate system with a Vector2d type, I'm unable to find a good name abstract enoug...

jquery: Variables return NaN

Hello. Don't let below code scare you away. The question is really simple, only two lines are making trouble: Why do my code generated a NaN error code? I am trying to substract one variable value from another so position of elements will be correct. The variables got their value from jQuery position() which is supposed to be integer ...

How to Remember a match and its position in an array in perl?

Please help I am working with a file whose lines of data look like the one below. As can be seen, the data is divided into 4 by '|||', so I will have four arrays( if I divide it). what I want is this: I want to check if there are punctuation marks in the first array, if there is one, remember the position in the array. Go to the same ...

How can I set the scrollbar position of the web

Hi all! How can I set the scrollbar position instead of default on the top update:I mean that when the user open the web first time the scrollbar is on the top of the screen(it default) how can I set the scrollbar position(the middle or on the bottom)? so the user can see the middle of the web or the bottom of the web,How I can do i...

How can I find the position in the page of an element using jQuery?

I'm aware of the position method, but that retrieves the position relative to the offset parent. Do I just throw in a loop to transverse up the document nodes? I guess that I'm surprised that it isn't part of the core, and I'm wondering if it's tucked away somewhere that I don't know about. ...

Get the mouse position during drag and drop

Does anyone know how to get the correct mouse position during a drag-and-drop operation in WPF. I've used Mouse.GetPosition() but the returned value is incorrect. Thanks. ...

how to add a new modulo position on a joomla template?

hi there, i'm using a joomla template called decayed and it doesn't have the right position, only the left one and nothing more. i would like to add a right and a button positions on that template. how can i do it? cheers ...

Binding a Popup to another controls relative screen position

I'm writing an XBAP w/a complex popup(canvas zindex of 99 w/a grid on it...) that I would like to "attach" to the button that opens it and follow that button around wherever it goes on the screen. For example if the button is in a ListBox or a XamDataGrid I would like the popup to follow the button as it scrolls through. If it is benea...