Incidentally, you might want to change this:
d{2}
to this:
d{1,2}
That would allow both single and double digits to be entered - which as a user, I'd find a far nicer experience (why force someone to enter "02" when they can enter "2"?)
Dan
Coedit Limited - Delivering standards...
I've been using Alt + Space, N since Windows 3.1, so was hoping for a single keypress to save a few milliseconds. Ah well, it looks like it's back to the old faithful!
I wonder why MS in their infinite wisdom decided that an option to disable window snapping should also disable the minimising...
I know that I should be able to minimise windows in Windows 7 by pressing the Windows Key + Down Arrow key, and this works fine until I disable Aero snap.
This seems a bit ridiculous to me, as the Aero snap checkbox says that it will "Prevent windows from being automatically arranged when moved...
If you liked that website, you might also like the 1930 book "Straight and Crooked Thinking" by Robert H Thouless (revised in 1953)...
Coedit Limited - Delivering standards compliant, accessible web solutions
@ Code Couch: http://www.codecouch.com/dan/
@ Twitter...
Does this happen in all browsers, or do some focus the correct element?
Can you show the relevant JS code and HTML for the form, or even post a URL to an online version (or a cut-down test) that shows the problem? It sounds like it could be down to timing, but that's just a guess.
Personally...
Yes, I would. When I ran your code through a web server, it at least attempted to use the geolocation feature in Chrome.
The code then went on to thrown an error on this line, however:
for (var i=0; i<results[j].address_components.length; i++) {
As you are attempting to use "j" outside of the...
Are you running it through a web server (using http:// or https://)?
I've found that when using file based access (file://), Chrome does not allow this to function.
Dan
Coedit Limited - Delivering standards compliant, accessible web solutions
@ Code Couch: http://www.codecouch.com/dan/
@...
"Dust", "last", and "boned" are 3 good examples of one word that has two opposing meanings.
I'm looking for two words that are similar in spelling and that have opposite(ish) meanings, not one word...
Good answers, though :-)
I was having a conversation this morning about how good a job our brain does at presenting us with the right words for the context of a sentence - even if those words are slightly mis-spelled.
The word that started it all off was the intentional mis-spelling of the word 'imperial' as 'imerpial'...
In fairness to the Windows community, iTunes for Windows is just as crap as iTunes for OSX. The pathetically small scrollable list you have to select apps from is just as small regardless of which OS you use.
The grass is never greener :-)
Dan
For those wanting a link to the FAQ, it is faq216-7570.
Dan
Coedit Limited - Delivering standards compliant, accessible web solutions
@ Code Couch: http://www.codecouch.com/dan/
@ Twitter: http://twitter.com/SleepyDrunkDan
Can anyone tell me whether selected & disabled <option> elements should be included when serialising a form?
I thought the answer would come easily from checking out the behaviour of some JavaScript frameworks, yet they differ in their behaviour.
Prototype 1.7.0.0 does serialise them, but...
Is this perhaps because you have commented out the call to "populateBox" in the change function?
Dan
Coedit Limited - Delivering standards compliant, accessible web solutions
@ Code Couch: http://www.codecouch.com/dan/
@ Twitter: http://twitter.com/SleepyDrunkDan
After re-reading the original post, I see where the confusion comes from.
I read this:
//clear any values from these fields (this isn't working)
if (null !== EquipLoc){
EquipLoc.value="";
}
and thought that the "this isn't working" comment applied to the test, not to the setting of the...
Well... my recommendation would be to create a cut-down test page with no other markup, JS, or CSS other than that to demonstrate 2x sliders with a few tabs each. Make sure all the markup and CSS validate as well.
If both sliders work, then you know the slider works in your scenario and it's...
I know. But it can never be null if the element exists.
I think we must be talking about two different things. I'm talking about the test not being able to fail unless the element doesn't exist. You're talking about the value not being able to be set unless the element exists.
Dan
I think you've misunderstood me. I was pointing out that the test [that we are told is broken] can only pass if "EquipLoc" is null, and the only way that can happen [in the code we've been shown] is if the getElementById call fails. This can only happen if #EquipLoc is not present, which is why...
As feherke has pointed out, you're trying to use a method that gets an element based on its ID attribute (the clue is in the name), yet your element has no ID attribute.
You could give it an ID, or you could use this syntax to refer to it by its name...
You say this code isn't working:
//clear any values from these fields (this isn't working)
if (null !== EquipLoc){
EquipLoc.value="";
}
What is the value of EquipLoc if it isn't null? Given the only place I can see that it is set is here:
var EquipLoc =...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.