473,563 Members | 2,895 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

stopping the focus on a page from moving

I have a test page http://www.files.maproom.org/00/12/q/w.html which
almost does what I want.

The idea is that, when you hover the mouse over one of the dates near
the top of the page, it updates _both_ the appearance of the map, _and_
the text appearing in the iframes further down the page. I would like
it to do this smoothly; but each time you select a new page, the
browser window jerks down to the iframes (where the text was refreshed)
and back to the top of the page (where I have arranged for another
invisible iframe to be refreshed, to bring the focus back to the top).

Both Mozilla and IE show this behaviour (IE doesn't display the map
properly, but that's another problem which I can do nothing about).
Opera6 actually shows the behaviour I am looking for.

Can anyone suggest a way to refresh the contents of my iframes without
the focus going down there to look at them, however briefly? I have
tried putting a div round the iframes and temporarily making it hidden
while I do the refresh, but this doesn't help, the focus still goes to
look at the invisible iframes.

Nick
--
Nick Wedd ni**@maproom.co .uk
Dec 1 '05 #1
4 1829

Nick Wedd wrote:
I have a test page http://www.files.maproom.org/00/12/q/w.html which
almost does what I want.

The idea is that, when you hover the mouse over one of the dates near
the top of the page, it updates _both_ the appearance of the map, _and_
the text appearing in the iframes further down the page. I would like
it to do this smoothly; but each time you select a new page, the
browser window jerks down to the iframes (where the text was refreshed)
and back to the top of the page (where I have arranged for another
invisible iframe to be refreshed, to bring the focus back to the top).

Both Mozilla and IE show this behaviour (IE doesn't display the map
properly, but that's another problem which I can do nothing about).
Opera6 actually shows the behaviour I am looking for.

Can anyone suggest a way to refresh the contents of my iframes without
the focus going down there to look at them, however briefly? I have
tried putting a div round the iframes and temporarily making it hidden
while I do the refresh, but this doesn't help, the focus still goes to
look at the invisible iframes.

Nick
--
Nick Wedd ni**@maproom.co .uk


Looking at your changedate function, you are changing the "source"
through the use of the hash in the uri. This normally causes the page
to jump to where the named anchor is located. I would try placing the
individual dates in separate html pages instead so the jump does not
occur.

Dec 1 '05 #2
Nick Wedd wrote:
I have a test page http://www.files.maproom.org/00/12/q/w.html which
almost does what I want.

The idea is that, when you hover the mouse over one of the dates near
the top of the page, it updates _both_ the appearance of the map, _and_
the text appearing in the iframes further down the page. I would like
it to do this smoothly; but each time you select a new page, the
browser window jerks down to the iframes (where the text was refreshed)
and back to the top of the page (where I have arranged for another
invisible iframe to be refreshed, to bring the focus back to the top).

Both Mozilla and IE show this behaviour (IE doesn't display the map
properly, but that's another problem which I can do nothing about).
Opera6 actually shows the behaviour I am looking for.

Can anyone suggest a way to refresh the contents of my iframes without
the focus going down there to look at them, however briefly? I have
tried putting a div round the iframes and temporarily making it hidden
while I do the refresh, but this doesn't help, the focus still goes to
look at the invisible iframes.
Start by validating your page, you have 34 errors, many serious (a DIV
element inside a HEAD and others inside A elements).

<URL:
http://validator.w3.org/check?uri=ht...2%2Fq%2Fw.html

You also have:
<script language="JavaS cript">
The language attribute is deprecated, type is required:

<script type="text/javascript">

<!--
Do not use HTML comment delimiters inside script tags, they peform no
useful function and are potentially harmful.

window.onresize = new Function("sifw( )");


There is no need to create a new function object every time the page is
resized, you just want to run the existing function:

window.onresize = sifw;

--
Rob
Dec 1 '05 #3
In message <GJ************ ****@news.optus .net.au>, RobG
<rg***@iinet.ne t.au> writes
Nick Wedd wrote:
I have a test page http://www.files.maproom.org/00/12/q/w.html which
almost does what I want.
The idea is that, when you hover the mouse over one of the dates
near the top of the page, it updates _both_ the appearance of the
map, _and_ the text appearing in the iframes further down the page. I
would like it to do this smoothly; but each time you select a new
page, the browser window jerks down to the iframes (where the text
was refreshed) and back to the top of the page (where I have arranged
for another invisible iframe to be refreshed, to bring the focus back >>to the top).
Both Mozilla and IE show this behaviour (IE doesn't display the map
properly, but that's another problem which I can do nothing about).
Opera6 actually shows the behaviour I am looking for.
Can anyone suggest a way to refresh the contents of my iframes
without the focus going down there to look at them, however briefly?
I have tried putting a div round the iframes and temporarily making
it hidden while I do the refresh, but this doesn't help, the focus
still goes to look at the invisible iframes.
Start by validating your page, you have 34 errors, many serious (a DIV
element inside a HEAD and others inside A elements).


The DIV inside the HEAD has gone, that was a bodge made unnecessary by
web.dev's advice, which I have taken. Thank you, web.dev.

I have also rearranged things so that there is no longer a DIV element
inside an A element. Thank you for this advice.
<URL:
http://validator.w3.org/check?uri=ht...aproom.org%2F0
0%2F12%2Fq%2Fw .html
Thank you for recommending this. I shall run this page, and others,
through the validator.
You also have:
<script language="JavaS cript">


The language attribute is deprecated, type is required:

<script type="text/javascript">


Ok, thank you, I have made that change.
<!--


Do not use HTML comment delimiters inside script tags, they peform no
useful function and are potentially harmful.


They _do_ perform a useful function (I am sure you know what it is), and
they seem to do no harm. But I accept that if someone looks at this
page with a browser that knows nothing about javascript, they aren't
going to have any joy anyway.
window.onresize = new Function("sifw( )");


There is no need to create a new function object every time the page is
resized, you just want to run the existing function:

window.onresize = sifw;


This sounds like good advice. However,
window.onresize = new Function("sifw( )");
works with Mozilla 1.6, Opera 6, IE6, and Firefox 1.0.7, while
window.onresize = sifw;
fails to work with any of these browsers, and moreover generates an
error message with IE6.

I have uploaded a new version of
http://www.files.maproom.org/00/12/q/w.html
incorporating various improvements, thanks to you and to web.dev;
also a version
http://www.files.maproom.org/00/12/q/ww.html
which incorporates your suggestion of using
window.onresize = sifw;
The sifw function is meant to cause the iframe panels, with German and
English text, to resize when the browser window is resized.

Nick
--
Nick Wedd ni**@maproom.co .uk
Dec 2 '05 #4
Nick Wedd wrote:
[...] RobG [...] writes
Nick Wedd wrote:
<!--
Do not use HTML comment delimiters inside script tags, they peform no
useful function and are potentially harmful.


They _do_ perform a useful function (I am sure you know what it is),


They do not. There is no compliant HTML UA out there that is allowed to
interpret the content of the `script' element as text (introduced in HTML
3.2, previous HTML versions being obsoleted and control about HTML passed
on to W3C by RFC2854 [June 2000]) , especially not within the `head'
element where _no_ text node is allowed to result in visible display.
and they seem to do no harm.
There is no standard or reference on how to parse such code in HTML.
Examples in the Specification are informative, not normative.

There is no standard or reference on how to parse such code in any
ECMAScript conforming implementation as `<', `!' and `--' are operators.
Strictly, it leads to a script SyntaxError if the parser correctly
considers the `script' element's content as CDATA that is _not_ to be
parsed (except of looking for the CDATA-closing ETAGO delimiter `</'.)

In XHTML, it is potentially harmful as that is an XML application. An XML
parser is allowed to remove all comments before building the parse tree.
<script ...><!-- ... --></script> results in <script .../>, an empty
`script' element. Calls to functions supposed-to-be declared in that
`script' element would result in a ReferenceError as they would not be
declared at all.

See also news:13******** ********@Pointe dEars.de
But I accept that if someone looks at this page with a browser that
knows nothing about javascript, they aren't going to have any joy
anyway.


That is not the issue. The support, i.e. the ability of parsers to
recognize the `script' element and to ignore it altogether with its
content if the required script support is not present, especially
not to display it within the `head' element, is the issue. That
support can be considered present nowadays while the opposite (that
those delimiters are either overlooked by the markup parser or the
script engine) cannot be considered present.
window.onresize = new Function("sifw( )");


There is no need to create a new function object every time the page is
resized, you just want to run the existing function:

window.onresize = sifw;


This sounds like good advice. However,
window.onresize = new Function("sifw( )");
works with Mozilla 1.6, Opera 6, IE6, and Firefox 1.0.7, while
window.onresize = sifw;
fails to work with any of these browsers, and moreover generates an
error message with IE6.


Syntactically, it does not. If it does, there is something wrong the
Function object referred to. What is wrong, probably tells the error
message you do not really tell about.

<URL:http://jibbering.com/faq/#FAQ4_43>
PointedEars
Dec 2 '05 #5

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

Similar topics

4
3509
by: Craig Bates | last post by:
Hi all I am designing a website for disabled football supporters and because of this, I obviously must consider accessibility to blind users whilst I am producing it - as they are one of the disability groups that I am targeting the page at. The page basically consists of two frames; one being a vertical list of links positioned on the...
11
4462
by: JCO | last post by:
I have a text box, on my form that I cant get the focus on. I'm using it as shown: <head> <body onload=document.getPassword.txtPasswordName.focus()> </head> Where getPassword is the form & txtPasswordName is the text box
20
12279
by: Arne | last post by:
During testing <div style="overflow:auto;"> in CSS I noticed the mousewheel would work in Mozilla only after I made a <a href="#">some text</a> link and clicked on that, within the div. It appears as if Mozilla needs to have the focus set on that div in order for the mousewheel to work. That's all that link does. The mousewheel works...
14
4522
by: Mark | last post by:
Hi, At the top of my php file I have got :- <body onblur="self.focus();"> so when I click off onto another window, my window comes back up in front which is perfect. The problem however, is that when I try to type into my form boxes, the key transfers are all being lost (i.e. keyboard is disabled)!
5
1987
by: Rob Lynch | last post by:
This one has me perplexed from vs.net web app add a new aspx pag add 3 textbox's and a command butto in the command buttons click event add response.write "button1 click from any textbox press the enter ke the Button1 Click event fire
6
1379
by: Mike | last post by:
I have a few textbox controls that have autopostback so that when they loose focus they update a label control that shows the count of characters in their respective text control. This works fine, except that after the postback, the page is shown reset -- scrolled to the top and with no control having focus. Can I maintain scroll/focus w/o...
2
1430
by: Mark | last post by:
I have a form with two sub forms. The form is set to data entry. The form is bound directly to a table I have two buttons at the bottom of the screen. One button is named reject and one is named accept. I would like the reject button to cancel the current entry being written to the table and the accept button to save the entry to the table....
1
3228
by: google | last post by:
I have a form with several subforms. Users enter the data, then on the parent there is a command button that runs code to generate a .pdf document from a report based on the data they are working with. If a user enters data in a subform, then directly clicks the command button on the parent form, the data in the subform is not included in...
0
1913
by: jvitti | last post by:
I recently upgraded from Access 2000 to Access 2007 and I am having trouble with moving the focus from 1 form to another. While doing data entry if a similar claim is found the claim view form will open listing the similar claims. The data entry clerk can view 1 of the claims and by doubling clicking on the claim number some info from the...
0
7583
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...
0
7888
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8106
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...
1
7642
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...
0
7950
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...
1
5484
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...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1200
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.