473,672 Members | 2,506 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

On Page Load, Set Focus of Browser to specific point in a Large image

I am developing a kiosk application, this will not have a keyboard or
mouse for use.

The system rotates through a series of images - no problem

One image is very large, like this one...

http://radar.weather.gov/Conus/Loop/NatLoop.gif

I want to browser focus to be on Georgia (bottom Right) when the image
loads instead of the default Washington State (Top Left)

I have tried image maps and other onMouse events, but this needs to
occur automatically not when someone touches the mouse or keyboard,
since the system will not have any interaction from a human...

any ideas?

Oct 16 '06 #1
2 2708
ke****@gmail.co m wrote in news:1161032213 .380933.193550
@i3g2000cwc.goo glegroups.com:
I am developing a kiosk application, this will not have a keyboard or
mouse for use.

The system rotates through a series of images - no problem

One image is very large, like this one...

http://radar.weather.gov/Conus/Loop/NatLoop.gif

I want to browser focus to be on Georgia (bottom Right) when the image
loads instead of the default Washington State (Top Left)

I have tried image maps and other onMouse events, but this needs to
occur automatically not when someone touches the mouse or keyboard,
since the system will not have any interaction from a human...
Look into scrollTo:

window.scrollTo (x-coord, y-coord)

Oct 16 '06 #2

<ke****@gmail.c omwrote in message
news:11******** **************@ i3g2000cwc.goog legroups.com...
I want to browser focus to be on Georgia (bottom Right) when the image
loads instead of the default Washington State (Top Left)
You can use CSS to set the image as a background-image with a negative
position, e.g.:

body {
margin: 0; padding: 0; border: none; overflow: hidden;
position: relative; width: 100%; height: 100%;
background: white url(natloop.gif ) -[x_offset]px -[y_offset]px no-repeat;
}

If you don't know window dimensions, you can set the background-position
property in a window.onload function. I believe the following will do it in
most browsers:
----------------------
var x = [x offset in image to center of Georgia] - (window.innerWi dth ?
window.innerWid th : (document.docum entElement.clie ntWidth ?
document.docume ntElement.clien tWidth : document.body.c lientWidth))/2;

var y = [y offset in image to center of Georgia] - (window.innerHe ight ?
window.innerHei ght : (document.docum entElement.clie ntHeight ?
document.docume ntElement.clien tHeight : document.body.c lientHeight))/2;

document.getEle mentsByTagName( 'body')[0].style.backgrou ndPosition='-' + x +
' -' + y
----------------------

You can also put the image in a relatively-positioned DIV and
negatively-offset the top and left of the DIV.

nf

Oct 17 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
8253
by: Charles Eubanks | last post by:
The enclosed html snippet displays an area map. The behavior I want is for each area to show up (eg show the outline of the poly) when the user mouses over it. This happens nicely BUT in order for this to occur, the user must hit the tab key to set the focus into the image (or the map -- I am not sure which at this point). In any case, I need a way to automatically force the browser focus into the image (or map) -- because end-users do...
22
5135
by: Jonathan Snook | last post by:
I've been contemplating what the recommended usage of a "top of page" link should be? Should there only ever be one at the bottom of the page? Should they be sprinkled at various points on the page? Or should they be used at all? Lately, I've been leaning towards the last option because my thought is that most browsers have a method to make it back to the top of the page (home button, scroll bar, whatever). It seems I never use the...
2
3884
by: Dave Bootsma | last post by:
Is it possible to programatically save a certain image from a certain web page? I want to automatically get a specific graphic from a specific web page programatically so I can automate the task. I know I can NAVIGATE to the page with the MS web browser control, but at that point I am stumped as to wether I can even save the page... TIA
18
2141
by: J-T | last post by:
Hi All, There is a picture on the following URL which I want to have it in one of my asp.net pages .I mean I want to embed the content of this page in my own page and get its image.Is there a control or tecnique which I can accomplish this? http://www.tehrantraffic.com/gif.asp?g=cam3_ttcc_00001.jpg&t=TTCC%20website Thanks a lot
23
5918
by: Peter | last post by:
I have a problem with a page show_image.asp that returns a jpg image under Windows XP Pro SP2. The page sets content type as: Response.ContentType = "image/jpg" While this works perfectly fine on most machines, on some machines I experience this problem: When loading the page a window pops up that asks if I want to open the document show_page.asp. When I click "Open" Interdev pops up and opens up a
42
3862
by: smerf | last post by:
Using javascript, is there a way to trap an external page inside a frame? I've seen scripts to break out of frames, but nothing to keep a page trapped in a frame.
1
2231
by: | last post by:
I've built an application that scrapes JPG images of webpages and PDF instances of those webpages automatically from an RSS feed. References to the scraped resources are persisted to our database. I've also built an administrative interface that allows someone to scroll through a datalist of the JPG images of the page and to delete the unwanted items. The JPG previews of the webpage are rendered in several sizes: iconic, mid-sized 600px...
0
1768
by: minimini1015 | last post by:
I hava an iframe inside my default.aspx, and i have put another aspx (map.aspx) inside the iframe. In the map.aspx, it has a drag panel and a large image (actually a floor plan) inside it. I have already set up a database to store location of different shops on the image, but i don't know how to set focus to particular position of the image, so that when user search for a shop, the image will automatically move and the searched shop will be...
3
1855
by: randy.buchholz | last post by:
I have been encountering strange behaviour on client machines where the pages truncate the display in the middle of the page. At some point the browser just goes white from one line to the bottom of the browser. No error shows, and the visible portions of the pages function normally. I can't find any way to reproduce. It will happen on different pages and will truncate at different points on the same page for different users and...
0
8418
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8840
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8628
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8694
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7457
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6249
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4237
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4433
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2830
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.