Maybe this could be to any help; http://jsfiddle.net/speakman/8GX7J/
If you "calibrate" against the server, you could use the client clock
to make it pretty accurate.
/ D
2011/4/1 Hans Peter :
> Hi,
> im trying to build a accurate countdown clock. are there any best
> practices you could recomme
Hello,
I start to learn JS.
**
var f1 = function () {
this.v1 = 5;
}
f1.prototype.get_v1 = function () { return this.v1; };
var f2 = new f1();
f1.v1 // return nothing
f1.get_v1() // nothing
f2.v1 // return 5
f2.get_v1() // return 5
**
Why f
Hi all, short time lurker and first time poster.
I just started writing a new tools library, and one of the methods is
some syntactic sugar that allows you to manipulate the DOM and include
a javascript file in the head element.
[code]
function include(files) {
var head = document.getElem
Hello,
I start to learn JS.
**
var f1 = function () {
this.v1 = 5;
}
f1.prototype.get_v1 = function () { return this.v1; };
var f2 = new f1();
f1.v1 // return nothing
f1.get_v1() // nothing
f2.v1 // return 5
f2.get_v1() // return 5
**
Why f
J.R.:
> Instead of:
> if (window.ActiveXObject) {
>
> We should use:
> if (typeof window.ActiveXObject !== "undefined") {
I would not use both approaches. I would use:
if (typeof ActiveXObject != 'undefined') {
//...
}
Or as Diego proposed:
if ('ActiveXObject' in this) {
//...
}
When
On Wed, Apr 13, 2011 at 11:55 PM, J.R. wrote:
> On Tuesday, 12 April 2011 02:12:31 UTC-3, Angus Croll wrote:
>>
>> Douglas Crockford is a JavaScript hero and a great communicator. I learned
>> a lot from his writings and his excellent video series
>> (http://net.tutsplus.com/tutorials/javascript-a
2011/4/13 Scott Sauyet :
> Poetro wrote:
>> win = window.open('javascript:"' + encodeURIComponent(message) +
>> '"', yourwindow),
>> doc = window.document;
>
> presumably `doc = win.document`, right?
Ah yes, tnx for finding the typo.
--
Poetro
--
To view archived discussions from the o
I would first say that support for the "javascript:" protocol is
pretty strong in older browsers.
However, if feasible and for browsers were it is supported, I would
suggest to use a "data:" URI as in:
window.open('data:text/html,')
instead of the "javascript:" protocol. I haven't tested on I
Poetro wrote:
> win = window.open('javascript:"' + encodeURIComponent(message) +
> '"', yourwindow),
> doc = window.document;
presumably `doc = win.document`, right?
-- Scott
--
To view archived discussions from the original JSMentors Mailman list:
http://www.mail-archive.com/jsmento
2011/4/13 Sean Kinsey :
> If there is an existing window open with the same name as referenced in the
> `window.open(url, name)` statement, then this window will normally be
> targeted instead of opening a new one (and having it blocked).
> This has lead me do the following; identify the name used
On Tuesday, April 12, 2011 7:37:44 PM UTC+2, cancelbubble wrote:
>
> Here at work, we do a fair bit of surveys on various sites via Survey
> Monkey. The MO has always been to do a pop *under *window - focus the
> parent, not the child/new window. I've stressed how I think this is slimey
> (hi
11 matches
Mail list logo