From petersen at ma.medias.ne.jp Sat Dec 1 01:53:01 2007 From: petersen at ma.medias.ne.jp (Scott Petersen) Date: Sat, 1 Dec 2007 16:53:01 +0900 Subject: [Javascript] styling text In-Reply-To: <2d733eddea0f4203a2b5ef7a78b51dc6@maila15.webcontrolcenter.com> References: <2d733eddea0f4203a2b5ef7a78b51dc6@maila15.webcontrolcenter.com> Message-ID: <84A03762-04B4-4BE2-9E67-FCC2EC3FBAF7@ma.medias.ne.jp> > Have you tried using innerHTML? As in > > span.innerHTML = span.innerHTML.replace("dirty", " class='blueWord'>dirty > It may not be elegant enough for some, but it seems to do the job. I could only get this to work in Safari 3. It didn't work in Firefox or Opera. I'm not sure why. I tried the following, which did work. It is even more inelegant. This only takes care of the first occurrence of the word. function init(){ var list=document.getElementById('theList'); var theItems=list.getElementsByTagName('li'); for (i=0;i From: Scott Petersen petersen at ma.medias.ne.jp > > I have a problem I can't seem to solve. I want to take this markup: > dirty ?? I have to clean my room. It is dirty. > and color the word "dirty" in the sentence blue, or set it off in > some other way. I thought to create a span element and style it > with CSS. However, I am not able to replace the plain text with the > span element. I could mark the word up to begin with, but for work > flow I thought I might try to let javascript do the work. Any > thoughts? Scott Petersen By the way, the Japanese is merely a gloss > of the English. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.evolt.org/pipermail/javascript/attachments/20071201/f20211b1/attachment.htm From trojani2000 at hotmail.com Sat Dec 1 09:06:07 2007 From: trojani2000 at hotmail.com (Troy III Ajnej) Date: Sat, 1 Dec 2007 15:06:07 +0000 Subject: [Javascript] styling text In-Reply-To: <84A03762-04B4-4BE2-9E67-FCC2EC3FBAF7@ma.medias.ne.jp> References: <2d733eddea0f4203a2b5ef7a78b51dc6@maila15.webcontrolcenter.com> <84A03762-04B4-4BE2-9E67-FCC2EC3FBAF7@ma.medias.ne.jp> Message-ID: "This only takes care of the first occurrence of the word." That's what you were aiming for, -isn't it?! This will do the same: function init(){ var theList=document.getElementById("theList") var listItem = theList.getElementsByTagName('li') for (i=0;i< listItem.length; i++){ var notion = listItem[i].getElementsByTagName('span') notion[2].innerHTML= notion[2].innerHTML.replace(notion[0].innerHTML, notion[0].innerHTML.bold().fontcolor('blue')) }} ..but will not clear the "word" if applyed for the seccond time. nice html structure bye the way!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Troy III progressive art enterprise~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From: petersen at ma.medias.ne.jpDate: Sat, 1 Dec 2007 16:53:01 +0900To: javascript at lists.evolt.orgSubject: Re: [Javascript] styling text Have you tried using innerHTML? As in span.innerHTML = span.innerHTML.replace("dirty", "dirty Hi gang: Here's two examples: [1] http://www.webbytedd.com/cc/scale/index.php [2] http://www.webbytedd.com/cc/scale/index1.php Both are identical except [2] has a DOCTYPE. Why does giving this file a DOCTYPE prohibit javascript from running in some browsers? For example, both Safari and FF for the Mac this script fails, but in Opera for the Mac it works -- why? And more importantly, how can I fix it? Thanks and Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com From liorean at gmail.com Sun Dec 2 22:11:25 2007 From: liorean at gmail.com (liorean) Date: Mon, 3 Dec 2007 05:11:25 +0100 Subject: [Javascript] DOCTYPE v JS question In-Reply-To: References: Message-ID: On 03/12/2007, tedd wrote: > Why does giving this file a DOCTYPE prohibit javascript from running > in some browsers? The DOCTYPE itself doesn't do anything, but the change in compatibility mode will change the DOM and some CSS. I suggest you open up the error console of firefox and read the errors from there. The actual error, I believe, is that you need to put a unit on all sizes in CSS in standards mode. Warning: assignment to undeclared variable whatcache Source File: http://www.webbytedd.com/cc/scale/a.js Line: 18 Warning: assignment to undeclared variable prefix Source File: http://www.webbytedd.com/cc/scale/a.js Line: 19 Warning: Error in parsing value for property 'width'. Declaration dropped. Source File: http://www.webbytedd.com/cc/scale/index1.php Line: 0 Warning: Error in parsing value for property 'height'. Declaration dropped. Source File: http://www.webbytedd.com/cc/scale/index1.php Line: 0 Warning: assignment to undeclared variable beginzoom Source File: http://www.webbytedd.com/cc/scale/a.js Line: 33 -- David "liorean" Andersson From riegel at clearimageonline.com Mon Dec 3 09:29:45 2007 From: riegel at clearimageonline.com (Terry Riegel) Date: Mon, 3 Dec 2007 10:29:45 -0500 Subject: [Javascript] DOCTYPE v JS question In-Reply-To: References: Message-ID: <1985227D-65D0-4E61-AB1A-07A984876361@clearimageonline.com> The working copy is running in compatibility mode which basically means the browser will "assume" it knew what you meant even though your code isn't "technically" right. It is better to get your code "right" and not let the browser make assumptions about your code. Terry On Dec 2, 2007, at 8:56 PM, tedd wrote: > Hi gang: > > Here's two examples: > > [1] http://www.webbytedd.com/cc/scale/index.php > > [2] http://www.webbytedd.com/cc/scale/index1.php > > Both are identical except [2] has a DOCTYPE. > > Why does giving this file a DOCTYPE prohibit javascript from running > in some browsers? > > For example, both Safari and FF for the Mac this script fails, but in > Opera for the Mac it works -- why? And more importantly, how can I > fix it? > > Thanks and 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 riegel at clearimageonline.com Tue Dec 4 12:51:48 2007 From: riegel at clearimageonline.com (Terry Riegel) Date: Tue, 4 Dec 2007 13:51:48 -0500 Subject: [Javascript] Anonymous functions In-Reply-To: References: <2d733eddea0f4203a2b5ef7a78b51dc6@maila15.webcontrolcenter.com> <84A03762-04B4-4BE2-9E67-FCC2EC3FBAF7@ma.medias.ne.jp> Message-ID: Hello everyone, I have this code snip... var listener = GEvent.addListener(map, "moveend", function() { document.getElementById("mapinfo").innerHTML="Zoom: "+map.getZoom() +" Bounds: "+map.getBounds(); GDownloadUrl(url, function(data, status) { markers=eval(data); map.clearOverlays(); for (var i in markers) { var where = new GLatLng(markers[i].lat, markers[i].lng); var opts = {title: markers[i].title}; var marker = new GMarker(where, opts); map.addOverlay(marker); } }); }); I would like to take the first function() {...} and make it a named function, but when I do it I get something like map undefined. How do I un-anonymous-ize a function? Thanks for any help. Terry Riegel -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.evolt.org/pipermail/javascript/attachments/20071204/e7c54508/attachment.htm From nick at nickfitz.co.uk Tue Dec 4 13:43:09 2007 From: nick at nickfitz.co.uk (Nick Fitzsimons) Date: Tue, 4 Dec 2007 19:43:09 +0000 Subject: [Javascript] Anonymous functions In-Reply-To: References: <2d733eddea0f4203a2b5ef7a78b51dc6@maila15.webcontrolcenter.com> <84A03762-04B4-4BE2-9E67-FCC2EC3FBAF7@ma.medias.ne.jp> Message-ID: On 4 Dec 2007, at 18:51, Terry Riegel wrote: > var listener = GEvent.addListener(map, "moveend", function() > { document.getElementById("mapinfo").innerHTML="Zoom: "+map.getZoom > ()+" Bounds: "+map.getBounds(); GDownloadUrl(url, function(data, > status) { markers=eval(data); map.clearOverlays(); for (var i in > markers) { var where = new GLatLng(markers[i].lat, markers[i].lng); > var opts = {title: markers[i].title}; var marker = new GMarker > (where, opts); map.addOverlay(marker); } }); }); > > > I would like to take the first function() {...} and make it a named > function, but when I do it I get something like map undefined. How > do I un-anonymous-ize a function? You should be able to use var listener = GEvent.addListener(map, "moveend", function myNamedFunction() { without any problem. Does that not work? Regards, Nick. -- Nick Fitzsimons From riegel at clearimageonline.com Tue Dec 4 15:46:10 2007 From: riegel at clearimageonline.com (Terry Riegel) Date: Tue, 4 Dec 2007 16:46:10 -0500 Subject: [Javascript] Anonymous functions In-Reply-To: References: <2d733eddea0f4203a2b5ef7a78b51dc6@maila15.webcontrolcenter.com> <84A03762-04B4-4BE2-9E67-FCC2EC3FBAF7@ma.medias.ne.jp> Message-ID: <9ABA948F-465B-4875-9BF1-5BDC8148F2C3@clearimageonline.com> Nick, Thanks, that did work without error, but how would I then call the function? Terry On Dec 4, 2007, at 2:43 PM, Nick Fitzsimons wrote: > On 4 Dec 2007, at 18:51, Terry Riegel wrote: > >> var listener = GEvent.addListener(map, "moveend", function() >> { document.getElementById("mapinfo").innerHTML="Zoom: "+map.getZoom >> ()+" Bounds: "+map.getBounds(); GDownloadUrl(url, function(data, >> status) { markers=eval(data); map.clearOverlays(); for (var i in >> markers) { var where = new GLatLng(markers[i].lat, markers[i].lng); >> var opts = {title: markers[i].title}; var marker = new GMarker >> (where, opts); map.addOverlay(marker); } }); }); >> >> >> I would like to take the first function() {...} and make it a named >> function, but when I do it I get something like map undefined. How >> do I un-anonymous-ize a function? > > You should be able to use > > var listener = GEvent.addListener(map, "moveend", function > myNamedFunction() { > > without any problem. Does that not work? > > Regards, > > Nick. > -- > Nick Fitzsimons > _______________________________________________ > Javascript mailing list > Javascript at lists.evolt.org > http://lists.evolt.org/mailman/listinfo/javascript > From natbat at gmail.com Tue Dec 4 18:21:45 2007 From: natbat at gmail.com (Natalie Downe) Date: Wed, 5 Dec 2007 00:21:45 +0000 Subject: [Javascript] Anonymous functions In-Reply-To: References: <2d733eddea0f4203a2b5ef7a78b51dc6@maila15.webcontrolcenter.com> <84A03762-04B4-4BE2-9E67-FCC2EC3FBAF7@ma.medias.ne.jp> Message-ID: Hello, > > I would like to take the first function() {...} and make it a named > > function, but when I do it I get something like map undefined. How > > do I un-anonymous-ize a function? Where is map being defined? if you do take it out of this add listener call make sure you put it after where 'map' is specified, this could be why you are getting 'map undefined errors. So your code would look something like // somewhere where map is defined // taking out your function into a named function function myNamedFunction () { document.getElementById("mapinfo").innerHTML="Zoom: "+map.getZoom()+" Bounds: "+map.getBounds(); GDownloadUrl(url, function(data, status) { markers=eval(data); map.clearOverlays(); for (var i in markers) { var where = new GLatLng(markers[i].lat, markers[i].lng); var opts = {title: markers[i].title}; var marker = new GMarker(where, opts); map.addOverlay(marker); } }); } // add the listner var listener = GEvent.addListener(map, "moveend", myNamedFunction); Kind regards Natalie -- Natalie Downe Senior Client-side Engineer - Clearleft From riegel at clearimageonline.com Wed Dec 5 05:31:19 2007 From: riegel at clearimageonline.com (Terry Riegel) Date: Wed, 5 Dec 2007 06:31:19 -0500 Subject: [Javascript] Anonymous functions In-Reply-To: References: <2d733eddea0f4203a2b5ef7a78b51dc6@maila15.webcontrolcenter.com> <84A03762-04B4-4BE2-9E67-FCC2EC3FBAF7@ma.medias.ne.jp> Message-ID: Hello, Thanks for the responses. I am still very confused. I have never been able to get my head around this type of thing. I must be missing something. How I would do something like the following, and in the process it may answer my first question. (also is there some recommended reading I could do on this subject?) suppose I have something like... //global context var a="Hello World"; ... //local context, not global var a="Goodbye World"; var listener = GEvent.addListener(marker, "click", function() { alert(a); }); a="Last Known"; When the event fires what will be in the alert. And how would I pass information from the local context to the alert? In case my contrived example doesn't make sense here is the actual code I am struggling with... I would like the alert to show the value of i in the local context it is instead showing the last value of i. for (var i in markers) { var where = new GLatLng(markers[i].lat, markers[i].lng); var opts = {title: markers[i].title}; var marker = new GMarker(where, opts); map.addOverlay(marker); var listener = GEvent.addListener(marker, "click", function() { alert(i); }); } Thanks for any help with this. Terry Riegel On Dec 4, 2007, at 7:21 PM, Natalie Downe wrote: > Hello, > >>> I would like to take the first function() {...} and make it a named >>> function, but when I do it I get something like map undefined. How >>> do I un-anonymous-ize a function? > > Where is map being defined? if you do take it out of this add listener > call make sure you put it after where 'map' is specified, this could > be why you are getting 'map undefined errors. So your code would look > something like > > > // somewhere where map is defined > > // taking out your function into a named function > function myNamedFunction () { > document.getElementById("mapinfo").innerHTML="Zoom: > "+map.getZoom()+" Bounds: "+map.getBounds(); > GDownloadUrl(url, function(data, status) { > markers=eval(data); > map.clearOverlays(); > for (var i in markers) { > var where = new GLatLng(markers[i].lat, markers[i].lng); > var opts = {title: markers[i].title}; > var marker = new GMarker(where, opts); > map.addOverlay(marker); > } > }); > } > > // add the listner > var listener = GEvent.addListener(map, "moveend", myNamedFunction); > > Kind regards > Natalie > > -- > Natalie Downe > Senior Client-side Engineer - Clearleft > > > _______________________________________________ > Javascript mailing list > Javascript at lists.evolt.org > http://lists.evolt.org/mailman/listinfo/javascript > From riegel at clearimageonline.com Wed Dec 5 05:40:16 2007 From: riegel at clearimageonline.com (Terry Riegel) Date: Wed, 5 Dec 2007 06:40:16 -0500 Subject: [Javascript] Anonymous functions In-Reply-To: References: <2d733eddea0f4203a2b5ef7a78b51dc6@maila15.webcontrolcenter.com> <84A03762-04B4-4BE2-9E67-FCC2EC3FBAF7@ma.medias.ne.jp> Message-ID: Hello again, I just found this article and am reading it. It looks like it is exactly what I am needing to understand. I am posting here for anyone that might read this post and be looking for an answer. http://www.howtocreate.co.uk/referencedvariables.html Thanks, Terry On Dec 5, 2007, at 6:31 AM, Terry Riegel wrote: > Hello, > > Thanks for the responses. I am still very confused. I have never been > able to get my head around this type of thing. I must be missing > something. How I would do something like the following, and in the > process it may answer my first question. (also is there some > recommended reading I could do on this subject?) > > suppose I have something like... > //global context > var a="Hello World"; > ... > > //local context, not global > var a="Goodbye World"; > var listener = GEvent.addListener(marker, "click", function() > { alert(a); }); > a="Last Known"; > > When the event fires what will be in the alert. And how would I pass > information from the local context to the alert? > > > In case my contrived example doesn't make sense here is the actual > code I am struggling with... I would like the alert to show the value > of i in the local context it is instead showing the last value of i. > > for (var i in markers) { > var where = new GLatLng(markers[i].lat, markers[i].lng); > var opts = {title: markers[i].title}; > var marker = new GMarker(where, opts); > map.addOverlay(marker); > var listener = GEvent.addListener(marker, "click", function() > { alert(i); }); > } > > > > Thanks for any help with this. > > Terry Riegel > > > > > On Dec 4, 2007, at 7:21 PM, Natalie Downe wrote: > >> Hello, >> >>>> I would like to take the first function() {...} and make it a named >>>> function, but when I do it I get something like map undefined. How >>>> do I un-anonymous-ize a function? >> >> Where is map being defined? if you do take it out of this add >> listener >> call make sure you put it after where 'map' is specified, this could >> be why you are getting 'map undefined errors. So your code would look >> something like >> >> >> // somewhere where map is defined >> >> // taking out your function into a named function >> function myNamedFunction () { >> document.getElementById("mapinfo").innerHTML="Zoom: >> "+map.getZoom()+" Bounds: "+map.getBounds(); >> GDownloadUrl(url, function(data, status) { >> markers=eval(data); >> map.clearOverlays(); >> for (var i in markers) { >> var where = new GLatLng(markers[i].lat, markers[i].lng); >> var opts = {title: markers[i].title}; >> var marker = new GMarker(where, opts); >> map.addOverlay(marker); >> } >> }); >> } >> >> // add the listner >> var listener = GEvent.addListener(map, "moveend", myNamedFunction); >> >> Kind regards >> Natalie >> >> -- >> Natalie Downe >> Senior Client-side Engineer - Clearleft >> >> >> _______________________________________________ >> 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 > From natbat at gmail.com Tue Dec 4 18:12:53 2007 From: natbat at gmail.com (Natalie Downe) Date: Wed, 5 Dec 2007 00:12:53 +0000 Subject: [Javascript] Anonymous functions In-Reply-To: References: <2d733eddea0f4203a2b5ef7a78b51dc6@maila15.webcontrolcenter.com> <84A03762-04B4-4BE2-9E67-FCC2EC3FBAF7@ma.medias.ne.jp> Message-ID: Hello, > > I would like to take the first function() {...} and make it a named > > function, but when I do it I get something like map undefined. How > > do I un-anonymous-ize a function? Where is map being defined? if you do take it out of this add listener call make sure you put it after where 'map' is specified, this could be why you are getting 'map undifined errors. So your code would look something like // somewhere where map is defined // taking out your function into a named function function myNamedFunction () { document.getElementById("mapinfo").innerHTML="Zoom: "+map.getZoom()+" Bounds: "+map.getBounds(); GDownloadUrl(url, function(data, status) { markers=eval(data); map.clearOverlays(); for (var i in markers) { var where = new GLatLng(markers[i].lat, markers[i].lng); var opts = {title: markers[i].title}; var marker = new GMarker(where, opts); map.addOverlay(marker); } }); } // add the listner var listener = GEvent.addListener(map, "moveend", myNamedFunction); Kind regards Natalie -- Natalie Downe Senior Client-side Engineer - Clearleft From del at delweg.com Sat Dec 8 09:48:58 2007 From: del at delweg.com (Del Wegener) Date: Sat, 8 Dec 2007 09:48:58 -0600 Subject: [Javascript] HTML e-mail of form data Message-ID: <001b01c839b1$d8b2a4c0$6401a8c0@delweg> Good Morning; I have numerous forms (design programs) for various clients such as the one shown here http://www.edi-cp.com/at_estimator.html At least one of the clients has now asked that I add a button which permits the webpage user to ask for a quote. The others will follow. The action should be as follows: The user clicks the button Some information is gathered from the form A new HTML form is created and e-mailed to the sales department This form contains blanks which the sales person can fill in (online) When the blanks are filled in, the HTML form is the completed quote The completed quote is e-mailed by the sales person to the webpage user. Probably with the "Reply" button. Can this be done with JavaScript? Are there any examples available? Is it necessary to use something like PERL? Thanks for any sources of help and information. Del From david at dorward.me.uk Sat Dec 8 10:38:39 2007 From: david at dorward.me.uk (David Dorward) Date: Sat, 8 Dec 2007 16:38:39 +0000 Subject: [Javascript] HTML e-mail of form data In-Reply-To: <001b01c839b1$d8b2a4c0$6401a8c0@delweg> References: <001b01c839b1$d8b2a4c0$6401a8c0@delweg> Message-ID: On 8 Dec 2007, at 15:48, Del Wegener wrote: > At least one of the clients has now asked that I add a button which > permits > the webpage user to ask for a quote. > The action should be as follows: > The user clicks the button > Some information is gathered from the form > A new HTML form is created and e-mailed to the sales department > This form contains blanks which the sales person can fill in > (online) Not a good idea. Client support for HTML formatted email is notoriously variable. Better to send a link (that opens in a regular web browser) that contains the information needed to populate the form (this could embed all the data in the link, or provide a reference to a database row containing that data. Be careful about keeping any confidential data secret. > When the blanks are filled in, the HTML form is the > completed quote > The completed quote is e-mailed by the sales person to the webpage > user. > Probably with the "Reply" button. More likely by submitting the form to the server, and letting a process there take care of e-mailing it. > Can this be done with JavaScript? > Is it necessary to use something like PERL? Its "Perl", not "PERL". You need something that runs on the server. It is probably possible for this to be JavaScript (using Rhino), although I'm not aware of a great deal of support for that (both in the way of helpful libraries and hosting packages that support it out of the box). Perl would be my preference, alternatives include Python, Ruby, JSP, PHP, ASP and ASP.NET. -- David Dorward http://dorward.me.uk/ http://blog.dorward.me.uk/ From glenn_lanier at netzero.net Tue Dec 18 14:59:14 2007 From: glenn_lanier at netzero.net (Glenn E. Lanier, II) Date: Tue, 18 Dec 2007 14:59:14 -0600 Subject: [Javascript] "Not Implemented" Error in IE -- Firefox is fine Message-ID: <004301c841b8$d9427be0$8bc773a0$@net> Can anyone shed any light on an error I'm getting in IE 7, but not Firefox? The page is http://www.alsde.edu/superintendentletter/superintendentletter.aspx?sys=001. e6774ade - and when it loads, IE gives an error on line 20/character 16 which says "Not implemented". Firefox does not give any errors and works as expected. Any idea what is "not implemented"? If I'm counting correctly, the error is with var theForm = document.forms['aspnetForm']; but aspnetForm exists, and I'm pretty sure the document.forms[] is allowed. Thanks, Glenn -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.evolt.org/pipermail/javascript/attachments/20071218/2869b293/attachment.html From schneegans at internetique.com Tue Dec 18 16:04:16 2007 From: schneegans at internetique.com (Claude Schneegans) Date: Tue, 18 Dec 2007 17:04:16 -0500 Subject: [Javascript] "Not Implemented" Error in IE -- Firefox is fine In-Reply-To: <004301c841b8$d9427be0$8bc773a0$@net> References: <004301c841b8$d9427be0$8bc773a0$@net> Message-ID: <476843E0.3010308@internetique.com> I get no error under IE 6. Must be some "new feature" of IE7? Any way, personnaly I find the document.forms['aspnetForm'] notation only useful when the form name is in a variable. with constants, document.forms.aspnetForm looks cleaner, and document.aspnetForm should work as well From soscpd at gmail.com Tue Dec 18 16:04:58 2007 From: soscpd at gmail.com (Rafael Menezes) Date: Tue, 18 Dec 2007 20:04:58 -0200 Subject: [Javascript] "Not Implemented" Error in IE -- Firefox is fine In-Reply-To: <004301c841b8$d9427be0$8bc773a0$@net> References: <004301c841b8$d9427be0$8bc773a0$@net> Message-ID: <3e3bae910712181404q23a4e8a5l57942d788e328004@mail.gmail.com> I can't reproduce the error in IE 6 SP2. On 18/12/2007, Glenn E. Lanier, II wrote: > > > > Can anyone shed any light on an error I'm getting in IE 7, but not > Firefox? The page is > http://www.alsde.edu/superintendentletter/superintendentletter.aspx?sys=001.e6774ade? and when it loads, IE gives an error on line 20/character 16 which says > "Not implemented". Firefox does not give any errors and works as expected. > > > > Any idea what is "not implemented"? If I'm counting correctly, the error > is with > > > > var theForm = document.forms['aspnetForm']; > > > > but aspnetForm exists, and I'm pretty sure the document.forms[] is > allowed. > > > > Thanks, > > Glenn > > > > > > _______________________________________________ > Javascript mailing list > Javascript at lists.evolt.org > http://lists.evolt.org/mailman/listinfo/javascript > -- Regards Rafael Menezes -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.evolt.org/pipermail/javascript/attachments/20071218/b7a8adb6/attachment.html From dlovering at gazos.com Wed Dec 19 00:40:33 2007 From: dlovering at gazos.com (David Lovering) Date: Tue, 18 Dec 2007 23:40:33 -0700 Subject: [Javascript] "Not Implemented" Error in IE -- Firefox is fine References: <004301c841b8$d9427be0$8bc773a0$@net> <3e3bae910712181404q23a4e8a5l57942d788e328004@mail.gmail.com> Message-ID: <001301c8420a$0e7c4330$0300a8c0@Elohim> Uh, my recollection is that DOM uses an integer in the bracket as an index, although it wouldn't surprise me in the least to see all sorts of wierd exceptions out there. -- Dave Lovering ----- Original Message ----- From: "Rafael Menezes" To: "JavaScript List" Sent: Tuesday, December 18, 2007 3:04 PM Subject: Re: [Javascript] "Not Implemented" Error in IE -- Firefox is fine I can't reproduce the error in IE 6 SP2. On 18/12/2007, Glenn E. Lanier, II wrote: > > > > Can anyone shed any light on an error I'm getting in IE 7, but not > Firefox? The page is > http://www.alsde.edu/superintendentletter/superintendentletter.aspx?sys=001.e6774ade? > and when it loads, IE gives an error on line 20/character 16 which says > "Not implemented". Firefox does not give any errors and works as expected. > > > > Any idea what is "not implemented"? If I'm counting correctly, the error > is with > > > > var theForm = document.forms['aspnetForm']; > > > > but aspnetForm exists, and I'm pretty sure the document.forms[] is > allowed. > > > > Thanks, > > Glenn > > > > > > _______________________________________________ > Javascript mailing list > Javascript at lists.evolt.org > http://lists.evolt.org/mailman/listinfo/javascript > -- Regards Rafael Menezes -------------------------------------------------------------------------------- > _______________________________________________ > Javascript mailing list > Javascript at lists.evolt.org > http://lists.evolt.org/mailman/listinfo/javascript From glenn_lanier at netzero.net Wed Dec 19 07:23:30 2007 From: glenn_lanier at netzero.net (Glenn E. Lanier, II) Date: Wed, 19 Dec 2007 07:23:30 -0600 Subject: [Javascript] "Not Implemented" Error in IE -- Firefox is fine In-Reply-To: <004301c841b8$d9427be0$8bc773a0$@net> References: <004301c841b8$d9427be0$8bc773a0$@net> Message-ID: <00c501c84242$5955f760$0c01e620$@net> Turns out I was wrong about the location of the error - it is in the addLoadEvent function function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { oldonload(); func(); } } } I'm actually on Christmas vacation, and this is a production application, so the code was removed fairly quickly. Sorry about that. I will create a sample page after the first of the year to determine exactly what wasn't implemented. Thanks for the quick look. --G From: javascript-bounces at lists.evolt.org [mailto:javascript-bounces at lists.evolt.org] On Behalf Of Glenn E. Lanier, II Sent: Tuesday, December 18, 2007 2:59 PM To: javascript at lists.evolt.org Subject: [Javascript] "Not Implemented" Error in IE -- Firefox is fine Can anyone shed any light on an error I'm getting in IE 7, but not Firefox? The page is http://www.alsde.edu/superintendentletter/superintendentletter.aspx?sys=001. e6774ade - and when it loads, IE gives an error on line 20/character 16 which says "Not implemented". Firefox does not give any errors and works as expected. Any idea what is "not implemented"? If I'm counting correctly, the error is with var theForm = document.forms['aspnetForm']; but aspnetForm exists, and I'm pretty sure the document.forms[] is allowed. Thanks, Glenn -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.evolt.org/pipermail/javascript/attachments/20071219/beba1920/attachment.htm From list at tridemail.de Thu Dec 20 08:08:59 2007 From: list at tridemail.de (Michael Borchers) Date: Thu, 20 Dec 2007 15:08:59 +0100 Subject: [Javascript] hide div in mouseout Message-ID: <000801c84311$df126990$af24a8c0@SF2003.de> I guess it's a common problem! I have a
element which is created by a link. When leaving the
(onmouseout) it will disappear. The problem is that even when leaving the link, that created the
, the
disappears before even "touching" it. That's why I use this function that I found:
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