function checkMouseLeave (element, evt) {alert(evt);
if (element.contains && evt.toElement) {
return !element.contains(evt.toElement);
}
else if (evt.relatedTarget) {
return !containsDOM(element, evt.relatedTarget);
}
}
So far so good! But in my latest project I create the
dynamically by
var div = createElement('div');
Now I have to assign the event handler onmouseout. With a simple function I would chose:
div.onmouseout = function() { hide(this) };
There we have the old problem. If I would replace it with the function above:
div.onmouseout = function() { checkMouseLeave(this, event) };
the function won't find the 'event', since the var did not exist when I assigned the function dynamically to the div.
So I'm searching for 2 options I guess:
1. Simpy add the function() { hide() } which can(!) call the checkMouseLeave functionality and then hide the div
2. Find a way to put the whole line into the event onmouseout, something like div.onmouseout = "javascript:if(checkMouseLeave(this, event)) { hide(); }"
I know this one WORKS: div.setAttribute('onmouseout', 'javascript:if(checkMouseLeave(this, event)) { hide(); }');
But as far as I know this is not "allowed" or can cause problems with other browsers.
Any ideas?
--
MfG
Michael Borchers
Tridem GmbH
http://www.tridem.de
mailto: borchers at tridem.de
Tel.: 0491 / 96 06 71 63
ICQ: 322766923
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.evolt.org/pipermail/javascript/attachments/20071220/349429bd/attachment.html
From fatpratmatt at gmail.com Thu Dec 20 14:06:12 2007
From: fatpratmatt at gmail.com (Matt Evans)
Date: Thu, 20 Dec 2007 20:06:12 +0000
Subject: [Javascript] hide div in mouseout
In-Reply-To: <000801c84311$df126990$af24a8c0@SF2003.de>
References: <000801c84311$df126990$af24a8c0@SF2003.de>
Message-ID: <4e0c43d30712201206x7e524162pb65bc5aee21f3c33@mail.gmail.com>
Hi,
Try this:
div.onmouseout = function(event) {
if (checkMouseLeave(this, event)) {
hide();
}
};
I did a quick test and it seemed to work fine in FF2 and IE7 here
Thanks,
Matt
From list at tridemail.de Fri Dec 21 02:53:55 2007
From: list at tridemail.de (Michael Borchers)
Date: Fri, 21 Dec 2007 09:53:55 +0100
Subject: [Javascript] prototype onSuccess questen
Message-ID: <000601c843af$05997520$af24a8c0@SF2003.de>
Question about:
http://www.prototypejs.org/api/ajax/request
var url = '/proxy?url=' + encodeURIComponent('http://www.google.com/search?q=Prototype');
// notice the use of a proxy to circumvent the Same Origin Policy.
new Ajax.Request(url, {
method: 'get',
onSuccess: function(transport) {
var notice = $('notice');
if (transport.responseText.match(/href="http:\/\/prototypejs.org/))
notice.update('Yeah! You are in the Top 10!').setStyle({ background: '#dfd' });
else
notice.update('Damn! You are beyond #10...').setStyle({ background: '#fdd' });
}
});Can I also call a defined function like foo()?function foo(){alert(transport.responseText);}If so, how do I pass the "transport"?onSuccess: function() { foo(transport) } won't work:(And onSuccess: function(transport) { test() } does not seem to pass "transport":/Any ideas?!
--
MfG
Michael Borchers
Tridem GmbH
http://www.tridem.de
mailto: borchers at tridem.de
Tel.: 0491 / 96 06 71 63
ICQ: 322766923
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.evolt.org/pipermail/javascript/attachments/20071221/e9f56e60/attachment.htm
From nick at nickfitz.co.uk Fri Dec 21 04:35:12 2007
From: nick at nickfitz.co.uk (Nick Fitzsimons)
Date: Fri, 21 Dec 2007 10:35:12 +0000
Subject: [Javascript] prototype onSuccess questen
In-Reply-To: <000601c843af$05997520$af24a8c0@SF2003.de>
References: <000601c843af$05997520$af24a8c0@SF2003.de>
Message-ID: <9307196D-1E91-47E4-A660-06B3D4E3EE56@nickfitz.co.uk>
onSuccess: function(transport) {
foo(transport);
}
shoudl work.
Regards,
Nick.
--
Nick Fitzsimons
http://www.nickfitz.co.uk/
On 21 Dec 2007, at 08:53, Michael Borchers wrote:
> Question about:
> http://www.prototypejs.org/api/ajax/request
> var url = '/proxy?url=' + encodeURIComponent('http://www.google.com/
> search?q=Prototype'); // notice the use of a proxy to circumvent
> the Same Origin Policy. new Ajax.Request(url, { method: 'get',
> onSuccess: function(transport) { var notice = $('notice'); if
> (transport.responseText.match(/href="http:\/\/prototypejs.org/))
> notice.update('Yeah! You are in the Top 10!').setStyle
> ({ background: '#dfd' }); else notice.update('Damn! You are beyond
> #10...').setStyle({ background: '#fdd' }); } });Can I also call a
> defined function like foo()? function foo(){alert
> (transport.responseText);} If so, how do I pass the "transport"?
> onSuccess: function() { foo(transport) } won't work:( And
> onSuccess: function(transport) { test() } does not seem to pass
> "transport":/ Any ideas?!
>
>
> --
> MfG
> Michael Borchers
> Tridem GmbH
> http://www.tridem.de
> mailto: borchers at tridem.de
> Tel.: 0491 / 96 06 71 63
> ICQ: 322766923
> _______________________________________________
> Javascript mailing list
> Javascript at lists.evolt.org
> http://lists.evolt.org/mailman/listinfo/javascript
From list at tridemail.de Fri Dec 21 04:35:40 2007
From: list at tridemail.de (Michael Borchers)
Date: Fri, 21 Dec 2007 11:35:40 +0100
Subject: [Javascript] hide div in mouseout
References: <000801c84311$df126990$af24a8c0@SF2003.de>
<4e0c43d30712201206x7e524162pb65bc5aee21f3c33@mail.gmail.com>
Message-ID: <005301c843bd$3cfc0b50$af24a8c0@SF2003.de>
----- Original Message -----
From: "Matt Evans"
To: "JavaScript List"
Sent: Thursday, December 20, 2007 9:06 PM
Subject: Re: [Javascript] hide div in mouseout
> Hi,
>
> Try this:
>
> div.onmouseout = function(event) {
> if (checkMouseLeave(this, event)) {
> hide();
> }
> };
>
> I did a quick test and it seemed to work fine in FF2 and IE7 here
>
> Thanks,
> Matt
First of all thanks since the syntax is the correct one.
Unfortunately the "checkMouseLeave" function causes probs in IE6,
the toElement method won't work (toElement empty or undefined)!
function checkMouseLeave (element, evt) {
if (element.contains && evt.toElement) {
return !element.contains(evt.toElement);
}
else if (evt.relatedTarget) {
return !containsDOM(element, evt.relatedTarget);
}
}
There seems to be a workaround here:
http://www.mediaevent.de/javascript/event_properties.html
Does anyone have a different or fully compatible "checkMouseLeave" function?
I wonder if there is one in the prototype framework...
From list at tridemail.de Fri Dec 21 04:47:08 2007
From: list at tridemail.de (Michael Borchers)
Date: Fri, 21 Dec 2007 11:47:08 +0100
Subject: [Javascript] hide div in mouseout
References: <000801c84311$df126990$af24a8c0@SF2003.de>
<4e0c43d30712201206x7e524162pb65bc5aee21f3c33@mail.gmail.com>
Message-ID: <006701c843be$d5a162f0$af24a8c0@SF2003.de>
----- Original Message -----
From: "Matt Evans"
To: "JavaScript List"
Sent: Thursday, December 20, 2007 9:06 PM
Subject: Re: [Javascript] hide div in mouseout
> Hi,
>
> Try this:
>
> div.onmouseout = function(event) {
> if (checkMouseLeave(this, event)) {
> hide();
> }
> };
I just tested some variations and changed the name for 'event' into 'foo'
f.e.:
div.onmouseout = function(foo) { bar(foo) } ;
This will ALSO RETURN THE EVENT!! Can somebody explain why?
Is it by default that function(whatever) always makes 'whatever' deliver the
event "object"
or can there be other "return objects" too - if so: which ones?!
From list at tridemail.de Fri Dec 21 05:04:46 2007
From: list at tridemail.de (Michael Borchers)
Date: Fri, 21 Dec 2007 12:04:46 +0100
Subject: [Javascript] prototype onSuccess questen
References: <000601c843af$05997520$af24a8c0@SF2003.de>
<9307196D-1E91-47E4-A660-06B3D4E3EE56@nickfitz.co.uk>
Message-ID: <007101c843c1$4c979210$af24a8c0@SF2003.de>
----- Original Message -----
From: "Nick Fitzsimons"
To: "JavaScript List"
Sent: Friday, December 21, 2007 11:35 AM
Subject: Re: [Javascript] prototype onSuccess questen
> onSuccess: function(transport) {
> foo(transport);
> }
>
> shoudl work.
>
> Regards,
>
> Nick.
> --
> Nick Fitzsimons
> http://www.nickfitz.co.uk/
Works absolutely perfect! Could you please explain why this is necessary?
Does function(transport) make "transport" global in some way or what is the
reason?
Thanks!
From tedd at sperling.com Sat Dec 22 16:33:31 2007
From: tedd at sperling.com (tedd)
Date: Sat, 22 Dec 2007 17:33:31 -0500
Subject: [Javascript] A Temporary Alert?
Message-ID:
Hi gang:
I've looked, but can not find a temporary Alert.
What I mean is:
"Hi, this is a temporary Alert box and I will automatically close in
5 seconds."
An Alert that will notify the user of something, but will NOT require
the user to respond to go away. But instead, will close on its own
after a set time.
It sounds simple enough, but I couldn't find nor generate one. Can
this be done?
Thanks in advance for any references or code.
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
From dlovering at gazos.com Sun Dec 23 07:58:54 2007
From: dlovering at gazos.com (David Lovering)
Date: Sun, 23 Dec 2007 06:58:54 -0700
Subject: [Javascript] A Temporary Alert?
References:
Message-ID: <000301c8456b$f50c2450$0300a8c0@Elohim>
This is hardly the most elegant solution, but it works on most browser
platforms I've dealt with.
In the HTML body declaration of your dialog, create an 'onload' event
handler of the following sort:
onload = "setTimeout( 'window.this.close()', 5000)";
This is dirt simple, and no doubt will call down the wrath of the Javascript
gurus with much more refined (and less fragile) solutions.
While you can reference an alert as a window and play the same games, it is
often hard (and somewhat browser dependent) to do so; I prefer to create a
child window and use it instead of a generic alert. With a little
imagination, you can manipulate the window parameters so that the user is
completely unaware that he is not talking directly to an alert - but you
have the window id and name under your full control. It also is less
complicated to reference the portion of the code in order to insert
the onload handler.
-- Dave Lovering
----- Original Message -----
From: "tedd"
To: "JavaScript List"
Sent: Saturday, December 22, 2007 3:33 PM
Subject: [Javascript] A Temporary Alert?
> Hi gang:
>
> I've looked, but can not find a temporary Alert.
>
> What I mean is:
>
> "Hi, this is a temporary Alert box and I will automatically close in
> 5 seconds."
>
> An Alert that will notify the user of something, but will NOT require
> the user to respond to go away. But instead, will close on its own
> after a set time.
>
> It sounds simple enough, but I couldn't find nor generate one. Can
> this be done?
>
> Thanks in advance for any references or code.
>
> Cheers,
>
> tedd
>
> --
> -------
> http://sperling.com http://ancientstones.com http://earthstones.com
> _______________________________________________
> Javascript mailing list
> Javascript at lists.evolt.org
> http://lists.evolt.org/mailman/listinfo/javascript
>
From peter at brunone.com Sun Dec 23 20:48:11 2007
From: peter at brunone.com (Peter Brunone)
Date: Sun, 23 Dec 2007 19:48:11 -0700
Subject: [Javascript] A Temporary Alert?
Message-ID: <1107a649ba914fcf84f88a8cdd151655@maila15.webcontrolcenter.com>
Wouldn't it be better to use an element as a layer over the rest of the content, rather than a child window that could be blurred and stuck behind the main window?
Just a thought...
Peter
From: "David Lovering" dlovering at gazos.com
This is hardly the most elegant solution, but it works on most browser
platforms I've dealt with.
In the HTML body declaration of your dialog, create an 'onload' event
handler of the following sort:
onload = "setTimeout( 'window.this.close()', 5000)";
This is dirt simple, and no doubt will call down the wrath of the Javascript
gurus with much more refined (and less fragile) solutions.
While you can reference an alert as a window and play the same games, it is
often hard (and somewhat browser dependent) to do so; I prefer to create a
child window and use it instead of a generic alert. With a little
imagination, you can manipulate the window parameters so that the user is
completely unaware that he is not talking directly to an alert - but you
have the window id and name under your full control. It also is less
complicated to reference the portion of the code in order to insert
the onload handler.
-- Dave Lovering
----- Original Message -----
From: "tedd"
To: "JavaScript List"
Sent: Saturday, December 22, 2007 3:33 PM
Subject: [Javascript] A Temporary Alert?
> Hi gang:
>
> I've looked, but can not find a temporary Alert.
>
> What I mean is:
>
> "Hi, this is a temporary Alert box and I will automatically close in
> 5 seconds."
>
> An Alert that will notify the user of something, but will NOT require
> the user to respond to go away. But instead, will close on its own
> after a set time.
>
> It sounds simple enough, but I couldn't find nor generate one. Can
> this be done?
>
> Thanks in advance for any references or code.
>
> Cheers,
>
> tedd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.evolt.org/pipermail/javascript/attachments/20071223/7cf411b5/attachment.html
From tedd at sperling.com Sun Dec 23 20:52:35 2007
From: tedd at sperling.com (tedd)
Date: Sun, 23 Dec 2007 21:52:35 -0500
Subject: [Javascript] A Temporary Alert?
Message-ID:
At 6:58 AM -0700 12/23/07, David Lovering wrote:
>This is hardly the most elegant solution, but it works on most browser
>platforms I've dealt with.
>
>In the HTML body declaration of your dialog, create an 'onload' event
>handler of the following sort:
>
>onload = "setTimeout( 'window.this.close()', 5000)";
>
>This is dirt simple, and no doubt will call down the wrath of the Javascript
>gurus with much more refined (and less fragile) solutions.
>
>While you can reference an alert as a window and play the same games, it is
>often hard (and somewhat browser dependent) to do so; I prefer to create a
>child window and use it instead of a generic alert. With a little
>imagination, you can manipulate the window parameters so that the user is
>completely unaware that he is not talking directly to an alert - but you
>have the window id and name under your full control. It also is less
>complicated to reference the portion of the code in order to insert
>the onload handler.
>
>-- Dave Lovering
Thanks Dave -- I'll look into that.
It really doesn't have to be an Alert -- it could be a window.
You see, I have a database access that can take up to five seconds
after the user clicks "Submit" and during that time I would like to
tell the user to wait (instead of clicking things widely and throwing
a tantrum) -- which is what I do when I don't know what's happening.
I'm actually surprised that such a critter isn't a staple for
programming GUI stuff.
Cheers,
tedd
>
>
>
>
>----- Original Message -----
>From: "tedd"
>To: "JavaScript List"
>Sent: Saturday, December 22, 2007 3:33 PM
>Subject: [Javascript] A Temporary Alert?
>
>
>> Hi gang:
>>
>> I've looked, but can not find a temporary Alert.
>>
>> What I mean is:
>>
>> "Hi, this is a temporary Alert box and I will automatically close in
>> 5 seconds."
>>
>> An Alert that will notify the user of something, but will NOT require
>> the user to respond to go away. But instead, will close on its own
>> after a set time.
>>
>> It sounds simple enough, but I couldn't find nor generate one. Can
>> this be done?
>>
>> Thanks in advance for any references or code.
>>
>> Cheers,
>>
>> tedd
>>
>> --
>> -------
>> http://sperling.com http://ancientstones.com http://earthstones.com
>> _______________________________________________
>> Javascript mailing list
>> Javascript at lists.evolt.org
>> http://lists.evolt.org/mailman/listinfo/javascript
>>
>
>
>_______________________________________________
>Javascript mailing list
>Javascript at lists.evolt.org
>http://lists.evolt.org/mailman/listinfo/javascript
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
From mdougherty at pbp.com Sun Dec 23 21:41:35 2007
From: mdougherty at pbp.com (Mike Dougherty)
Date: Sun, 23 Dec 2007 22:41:35 -0500
Subject: [Javascript] A Temporary Alert?
In-Reply-To:
References:
Message-ID: <59bedf280712231941r11fb4ea2vda2a739d3e8ab24a@mail.gmail.com>
On Dec 23, 2007 9:52 PM, tedd wrote:
> You see, I have a database access that can take up to five seconds
> after the user clicks "Submit" and during that time I would like to
> tell the user to wait (instead of clicking things widely and throwing
> a tantrum) -- which is what I do when I don't know what's happening.
>
> I'm actually surprised that such a critter isn't a staple for
> programming GUI stuff.
HTML: Working...
CSS:
#WorkingNotice {display: none;} /* normal presentation rule */
#WorkingNotice.shown {display: block;} /* special case presentation rule */
Javascript:
/* try to get a reference to the object */
var wn = document.getElementById("WorkingNotice");
/* if the reference is valid, add the "shown" class to change its
presentation via CSS */
if( wn ) { wn.className = wn.className.replace(/\sshown/,"") + " shown"; }
// some long-running process here
/* if the reference is valid, remove the "shown" class so its presentation
is reset to normal */
if( wn ) { wn.className = wn.className.replace(/\sshown/,"") ; }
Of course you can add a background image to this div and size and position
it however you'd like. As Peter suggested, the idea is that you have a DOM
element in front of everything else on the screen which you can control.
(you might need to remove the "shown" className in a different method if
you're using some event-based trigger such as another element's onload) You
might also make(or find) a more elegant function to manage the className
property of your elements.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.evolt.org/pipermail/javascript/attachments/20071223/4aaf73c1/attachment.htm
From fatpratmatt at gmail.com Mon Dec 24 05:54:06 2007
From: fatpratmatt at gmail.com (Matt Evans)
Date: Mon, 24 Dec 2007 11:54:06 +0000
Subject: [Javascript] A Temporary Alert?
In-Reply-To: <59bedf280712231941r11fb4ea2vda2a739d3e8ab24a@mail.gmail.com>
References:
<59bedf280712231941r11fb4ea2vda2a739d3e8ab24a@mail.gmail.com>
Message-ID: <4e0c43d30712240354s1043a579u97ae249a528a84bf@mail.gmail.com>
It sounds like you could always settle for one of those AJAX-inspired
circle-of-circles images with a "Working..." or "Loading..." caption
next to it.
Try http://www.ajaxload.info/ to see what I mean.
Have it appear when the submit button is pressed, either replacing it,
underneath it or in the centre of the screen.
Hope that helps,
Matt
From tedd.sperling at gmail.com Sun Dec 23 20:22:31 2007
From: tedd.sperling at gmail.com (tedd)
Date: Sun, 23 Dec 2007 21:22:31 -0500
Subject: [Javascript] A Temporary Alert?
In-Reply-To: <000301c8456b$f50c2450$0300a8c0@Elohim>
References:
<000301c8456b$f50c2450$0300a8c0@Elohim>
Message-ID:
At 6:58 AM -0700 12/23/07, David Lovering wrote:
>This is hardly the most elegant solution, but it works on most browser
>platforms I've dealt with.
>
>In the HTML body declaration of your dialog, create an 'onload' event
>handler of the following sort:
>
>onload = "setTimeout( 'window.this.close()', 5000)";
>
>This is dirt simple, and no doubt will call down the wrath of the Javascript
>gurus with much more refined (and less fragile) solutions.
>
>While you can reference an alert as a window and play the same games, it is
>often hard (and somewhat browser dependent) to do so; I prefer to create a
>child window and use it instead of a generic alert. With a little
>imagination, you can manipulate the window parameters so that the user is
>completely unaware that he is not talking directly to an alert - but you
>have the window id and name under your full control. It also is less
>complicated to reference the portion of the code in order to insert
>the onload handler.
>
>-- Dave Lovering
Thanks Dave -- I'll look into that.
It really doesn't have to be an Alert -- it could be a window.
You see, I have a database access that can take up to five seconds
after the user clicks "Submit" and during that time I would like to
tell the user to wait (instead of clicking things widely and throwing
a tantrum) -- which is what I do when I don't know what's happening.
I'm actually surprised that such a critter isn't a staple for
programming GUI stuff.
Cheers,
tedd
>
>
>
>
>----- Original Message -----
>From: "tedd"
>To: "JavaScript List"
>Sent: Saturday, December 22, 2007 3:33 PM
>Subject: [Javascript] A Temporary Alert?
>
>
>> Hi gang:
>>
>> I've looked, but can not find a temporary Alert.
>>
>> What I mean is:
>>
>> "Hi, this is a temporary Alert box and I will automatically close in
>> 5 seconds."
>>
>> An Alert that will notify the user of something, but will NOT require
>> the user to respond to go away. But instead, will close on its own
>> after a set time.
>>
>> It sounds simple enough, but I couldn't find nor generate one. Can
>> this be done?
>>
>> Thanks in advance for any references or code.
>>
>> Cheers,
>>
>> tedd
>>
>> --
>> -------
>> http://sperling.com http://ancientstones.com http://earthstones.com
>> _______________________________________________
>> Javascript mailing list
>> Javascript at lists.evolt.org
>> http://lists.evolt.org/mailman/listinfo/javascript
>>
>
>
>_______________________________________________
>Javascript mailing list
>Javascript at lists.evolt.org
>http://lists.evolt.org/mailman/listinfo/javascript
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
From peter at brunone.com Mon Dec 24 10:07:13 2007
From: peter at brunone.com (Peter Brunone)
Date: Mon, 24 Dec 2007 09:07:13 -0700
Subject: [Javascript] A Temporary Alert?
Message-ID: <4520fc479c494657b2324d3f0cecf298@maila15.webcontrolcenter.com>
> You see, I have a database access that can take up to five seconds
> after the user clicks "Submit" and during that time I would like to
> tell the user to wait (instead of clicking things widely and throwing
> a tantrum) -- which is what I do when I don't know what's happening.
Oh, you mean something like this:
http://authors.aspalliance.com/peterbrunone/pleasewait.asp
It's a bit antiquated, but you get the general idea.
Peter
----------------------------------------
From: tedd tedd.sperling at gmail.com
At 6:58 AM -0700 12/23/07, David Lovering wrote:
>This is hardly the most elegant solution, but it works on most browser
>platforms I've dealt with.
>
>In the HTML body declaration of your dialog, create an 'onload' event
>handler of the following sort:
>
>onload = "setTimeout( 'window.this.close()', 5000)";
>
>This is dirt simple, and no doubt will call down the wrath of the Javascript
>gurus with much more refined (and less fragile) solutions.
>
>While you can reference an alert as a window and play the same games, it is
>often hard (and somewhat browser dependent) to do so; I prefer to create a
>child window and use it instead of a generic alert. With a little
>imagination, you can manipulate the window parameters so that the user is
>completely unaware that he is not talking directly to an alert - but you
>have the window id and name under your full control. It also is less
>complicated to reference the portion of the code in order to insert
>the onload handler.
>
>-- Dave Lovering
Thanks Dave -- I'll look into that.
It really doesn't have to be an Alert -- it could be a window.
You see, I have a database access that can take up to five seconds
after the user clicks "Submit" and during that time I would like to
tell the user to wait (instead of clicking things widely and throwing
a tantrum) -- which is what I do when I don't know what's happening.
I'm actually surprised that such a critter isn't a staple for
programming GUI stuff.
Cheers,
tedd
>----- Original Message -----
>From: "tedd"
>> Hi gang:
>>
>> I've looked, but can not find a temporary Alert.
>>
>> What I mean is:
>>
>> "Hi, this is a temporary Alert box and I will automatically close in
>> 5 seconds."
>>
>> An Alert that will notify the user of something, but will NOT require
>> the user to respond to go away. But instead, will close on its own
>> after a set time.
>>
>> It sounds simple enough, but I couldn't find nor generate one. Can
>> this be done?
>>
>> Thanks in advance for any references or code.
>>
>> Cheers,
>>
>> tedd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.evolt.org/pipermail/javascript/attachments/20071224/337adcf8/attachment.html
From CF at isbc.com Mon Dec 24 15:39:06 2007
From: CF at isbc.com (Nick Baker)
Date: Mon, 24 Dec 2007 15:39:06 -0600
Subject: [Javascript] A Temporary Alert?
Message-ID: <6.1.0.6.2.20071224153900.020e4b60@pop.central.cox.net>
Peter,
The link for downloading the zip doesn't appear to be working.
http://authors.aspalliance.com/peterbrunone/samples/pleasewait.zip
Nick
At 10:07 AM 12/24/2007, you wrote:
> > You see, I have a database access that can take up to five seconds
> > after the user clicks "Submit" and during that time I would like to
> > tell the user to wait (instead of clicking things widely and throwing
> > a tantrum) -- which is what I do when I don't know what's happening.
>
>
>Oh, you mean something like this:
>
>http://authors.aspalliance.com/peterbrunone/pleasewait.asp
>
>It's a bit antiquated, but you get the general idea.
>
>Peter
>
>
>----------
>From: tedd tedd.sperling at gmail.com
>
>At 6:58 AM -0700 12/23/07, David Lovering wrote:
> >This is hardly the most elegant solution, but it works on most browser
> >platforms I've dealt with.
> >
> >In the HTML body declaration of your dialog, create an 'onload' event
> >handler of the following sort:
> >
> >onload = "setTimeout( 'window.this.close()', 5000)";
> >
> >This is dirt simple, and no doubt will call down the wrath of the Javascript
> >gurus with much more refined (and less fragile) solutions.
> >
> >While you can reference an alert as a window and play the same games, it is
> >often hard (and somewhat browser dependent) to do so; I prefer to create a
> >child window and use it instead of a generic alert. With a little
> >imagination, you can manipulate the window parameters so that the user is
> >completely unaware that he is not talking directly to an alert - but you
> >have the window id and name under your full control. It also is less
> >complicated to reference the portion of the code in order to insert
> >the onload handler.
> >
> >-- Dave Lovering
>
>
>Thanks Dave -- I'll look into that.
>
>It really doesn't have to be an Alert -- it could be a window.
>
>You see, I have a database access that can take up to five seconds
>after the user clicks "Submit" and during that time I would like to
>tell the user to wait (instead of clicking things widely and throwing
>a tantrum) -- which is what I do when I don't know what's happening.
>
>I'm actually surprised that such a critter isn't a staple for
>programming GUI stuff.
>
>Cheers,
>
>tedd
>
> >----- Original Message -----
> >From: "tedd"
> >> Hi gang:
> >>
> >> I've looked, but can not find a temporary Alert.
> >>
> >> What I mean is:
> >>
> >> "Hi, this is a temporary Alert box and I will automatically close in
> >> 5 seconds."
> >>
> >> An Alert that will notify the user of something, but will NOT require
> >> the user to respond to go away. But instead, will close on its own
> >> after a set time.
> >>
> >> It sounds simple enough, but I couldn't find nor generate one. Can
> >> this be done?
> >>
> >> Thanks in advance for any references or code.
> >>
> >> Cheers,
> >>
> >> tedd
>_______________________________________________
>Javascript mailing list
>Javascript at lists.evolt.org
>http://lists.evolt.org/mailman/listinfo/javascript
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.evolt.org/pipermail/javascript/attachments/20071224/df056b97/attachment.htm
From peter at brunone.com Mon Dec 24 20:28:03 2007
From: peter at brunone.com (Peter Brunone)
Date: Mon, 24 Dec 2007 19:28:03 -0700
Subject: [Javascript] A Temporary Alert?
Message-ID:
Thanks for the word, Nick. Unfortunately, I haven't had any control over those pages for a long time (on the other hand, all the code you need is already displayed in the body of the article).
Cheers,
Peter
----------------------------------------
From: Nick Baker CF at isbc.com
Peter,
The link for downloading the zip doesn't appear to be working.
http://authors.aspalliance.com/peterbrunone/samples/pleasewait.zip
Nick
At 10:07 AM 12/24/2007, you wrote:
> You see, I have a database access that can take up to five seconds
> after the user clicks "Submit" and during that time I would like to
> tell the user to wait (instead of clicking things widely and throwing
> a tantrum) -- which is what I do when I don't know what's happening.
Oh, you mean something like this:
http://authors.aspalliance.com/peterbrunone/pleasewait.asp
It's a bit antiquated, but you get the general idea.
Peter
----------------------------------------
From: tedd tedd.sperling at gmail.com
At 6:58 AM -0700 12/23/07, David Lovering wrote:
>This is hardly the most elegant solution, but it works on most browser
>platforms I've dealt with.
>
>In the HTML body declaration of your dialog, create an 'onload' event
>handler of the following sort:
>
>onload = "setTimeout( 'window.this.close()', 5000)";
>
>This is dirt simple, and no doubt will call down the wrath of the Javascript
>gurus with much more refined (and less fragile) solutions.
>
>While you can reference an alert as a window and play the same games, it is
>often hard (and somewhat browser dependent) to do so; I prefer to create a
>child window and use it instead of a generic alert. With a little
>imagination, you can manipulate the window parameters so that the user is
>completely unaware that he is not talking directly to an alert - but you
>have the window id and name under your full control. It also is less
>complicated to reference the portion of the code in order to insert
>the onload handler.
>
>-- Dave Lovering
Thanks Dave -- I'll look into that.
It really doesn't have to be an Alert -- it could be a window.
You see, I have a database access that can take up to five seconds
after the user clicks "Submit" and during that time I would like to
tell the user to wait (instead of clicking things widely and throwing
a tantrum) -- which is what I do when I don't know what's happening.
I'm actually surprised that such a critter isn't a staple for
programming GUI stuff.
Cheers,
tedd
>----- Original Message -----
>From: "tedd"
>> Hi gang:
>>
>> I've looked, but can not find a temporary Alert.
>>
>> What I mean is:
>>
>> "Hi, this is a temporary Alert box and I will automatically close in
>> 5 seconds."
>>
>> An Alert that will notify the user of something, but will NOT require
>> the user to respond to go away. But instead, will close on its own
>> after a set time.
>>
>> It sounds simple enough, but I couldn't find nor generate one. Can
>> this be done?
>>
>> Thanks in advance for any references or code.
>>
>> Cheers,
>>
>> tedd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.evolt.org/pipermail/javascript/attachments/20071224/c19cc49e/attachment.html
From tedd at sperling.com Tue Dec 25 09:14:10 2007
From: tedd at sperling.com (tedd)
Date: Tue, 25 Dec 2007 10:14:10 -0500
Subject: [Javascript] A Temporary Alert?
In-Reply-To: <4e0c43d30712240354s1043a579u97ae249a528a84bf@mail.gmail.com>
References:
<59bedf280712231941r11fb4ea2vda2a739d3e8ab24a@mail.gmail.com>
<4e0c43d30712240354s1043a579u97ae249a528a84bf@mail.gmail.com>
Message-ID:
At 11:54 AM +0000 12/24/07, Matt Evans wrote:
>It sounds like you could always settle for one of those AJAX-inspired
>circle-of-circles images with a "Working..." or "Loading..." caption
>next to it.
>
>Try http://www.ajaxload.info/ to see what I mean.
>
>Have it appear when the submit button is pressed, either replacing it,
>underneath it or in the centre of the screen.
>
>Hope that helps,
>Matt
Matt:
That would work provided that I could make it go away after 5 seconds.
Funny, I can get it to wait for 5 seconds after I click a submit to
show itself, but I can't get it to show itself and then go away after
5 seconds.
Merry Christmas,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
From dlovering at gazos.com Tue Dec 25 21:49:13 2007
From: dlovering at gazos.com (David Lovering)
Date: Tue, 25 Dec 2007 20:49:13 -0700
Subject: [Javascript] A Temporary Alert?
References: <1107a649ba914fcf84f88a8cdd151655@maila15.webcontrolcenter.com>
Message-ID: <002301c84772$47b3f900$0300a8c0@Elohim>
I agree - you may recall I said the solution I proposed was 'dirty'.
Irrespective of what you use, some layer management would be a good idea -
all together too many apps park messages off the screen or behind some other
element, or rely on some absurd window geometry that doesn't apply.
-- Dave Lovering
----- Original Message -----
From: "Peter Brunone"
To:
Sent: Sunday, December 23, 2007 7:48 PM
Subject: Re: [Javascript] A Temporary Alert?
Wouldn't it be better to use an element as a layer over the rest of the
content, rather than a child window that could be blurred and stuck behind
the main window?
Just a thought...
Peter
From: "David Lovering" dlovering at gazos.com
This is hardly the most elegant solution, but it works on most browser
platforms I've dealt with.
In the HTML body declaration of your dialog, create an 'onload' event
handler of the following sort:
onload = "setTimeout( 'window.this.close()', 5000)";
This is dirt simple, and no doubt will call down the wrath of the Javascript
gurus with much more refined (and less fragile) solutions.
While you can reference an alert as a window and play the same games, it is
often hard (and somewhat browser dependent) to do so; I prefer to create a
child window and use it instead of a generic alert. With a little
imagination, you can manipulate the window parameters so that the user is
completely unaware that he is not talking directly to an alert - but you
have the window id and name under your full control. It also is less
complicated to reference the portion of the code in order to insert
the onload handler.
-- Dave Lovering
----- Original Message -----
From: "tedd"
To: "JavaScript List"
Sent: Saturday, December 22, 2007 3:33 PM
Subject: [Javascript] A Temporary Alert?
> Hi gang:
>
> I've looked, but can not find a temporary Alert.
>
> What I mean is:
>
> "Hi, this is a temporary Alert box and I will automatically close in
> 5 seconds."
>
> An Alert that will notify the user of something, but will NOT require
> the user to respond to go away. But instead, will close on its own
> after a set time.
>
> It sounds simple enough, but I couldn't find nor generate one. Can
> this be done?
>
> Thanks in advance for any references or code.
>
> Cheers,
>
> tedd
--------------------------------------------------------------------------------
> _______________________________________________
> Javascript mailing list
> Javascript at lists.evolt.org
> http://lists.evolt.org/mailman/listinfo/javascript
From katbomm at yahoo.com Sun Dec 30 11:41:35 2007
From: katbomm at yahoo.com (Kat Bommarito)
Date: Sun, 30 Dec 2007 09:41:35 -0800 (PST)
Subject: [Javascript] hide div in mouseout
Message-ID: <93724.62654.qm@web63105.mail.re1.yahoo.com>
remove me from this list please
----- Original Message ----
From: Matt Evans
To: JavaScript List
Sent: Thursday, December 20, 2007 12:06:12 PM
Subject: Re: [Javascript] hide div in mouseout
Hi,
Try this:
div.onmouseout = function(event) {
if (checkMouseLeave(this, event)) {
hide();
}
};
I did a quick test and it seemed to work fine in FF2 and IE7 here
Thanks,
Matt
_______________________________________________
Javascript mailing list
Javascript at lists.evolt.org
http://lists.evolt.org/mailman/listinfo/javascript
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.evolt.org/pipermail/javascript/attachments/20071230/569e3d5e/attachment.htm
From tedd at sperling.com Sun Dec 30 11:51:07 2007
From: tedd at sperling.com (tedd)
Date: Sun, 30 Dec 2007 12:51:07 -0500
Subject: [Javascript] hide div in mouseout
In-Reply-To: <93724.62654.qm@web63105.mail.re1.yahoo.com>
References: <93724.62654.qm@web63105.mail.re1.yahoo.com>
Message-ID:
At 9:41 AM -0800 12/30/07, Kat Bommarito wrote:
>remove me from this list please
Who are you talking to?
My understanding is that you subscribed yourself to this list and if
you want to unsubscribe, then simply click the link that appears at
the bottom of every post and take whatever actions necessary to
unsubscribe yourself.
Cheers,
tedd
>_______________________________________________
>Javascript mailing list
>Javascript at lists.evolt.org
>http://lists.evolt.org/mailman/listinfo/javascript
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com