From Jessica at greenlight.co.uk Wed Dec 1 10:27:56 2004 From: Jessica at greenlight.co.uk (Jessica) Date: Wed, 1 Dec 2004 16:27:56 -0000 Subject: [Javascript] js file soemtimes not executing Message-ID: <66D647943549414EBD667799075DB4ED067C82@glm-058n4659a87.Greenlight.local> Hi, Hope u can assist me in my problem that needs to be resolved asap. On button click I call the following : car test All Ninja.js has is just an alert statement. This is a really strange but sometimes on button click I get the alert statement and sometimes not. Can u see what the problem is, I even deleted the item from the cache. Thankyou in advance jessica -------------- next part -------------- An HTML attachment was scrubbed... URL: From peter at brunone.com Wed Dec 1 10:42:01 2004 From: peter at brunone.com (Peter Brunone) Date: Wed, 1 Dec 2004 10:42:01 -0600 Subject: [Javascript] js file soemtimes not executing In-Reply-To: <66D647943549414EBD667799075DB4ED067C82@glm-058n4659a87.Greenlight.local> Message-ID: <00ad01c4d7c4$af3e3cf0$0500a8c0@monkeyhouse> Hi Jessica, This seems like a really contorted way of doing things. Why not just assign the script source right away? If you need to do it this way, I'd suggest putting both calls in the same attribute, i.e. either the onclick event handler or the href property, like this: or Let us know if any of that works (apologies if you get an error; I'm in a hurry and I haven't tested these). Cheers, Peter Brunone ______________ EasyListBox.com -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of Jessica Hi, Hope u can assist me in my problem that needs to be resolved asap. On button click I call the following : car test All Ninja.js has is just an alert statement. This is a really strange but sometimes on button click I get the alert statement and sometimes not. Can u see what the problem is, I even deleted the item from the cache. Thankyou in advance jessica -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jessica at greenlight.co.uk Wed Dec 1 10:59:40 2004 From: Jessica at greenlight.co.uk (Jessica) Date: Wed, 1 Dec 2004 16:59:40 -0000 Subject: [SPAM] - RE: [Javascript] js file soemtimes not executing - Email found in subject Message-ID: <66D647943549414EBD667799075DB4ED067C85@glm-058n4659a87.Greenlight.local> Hi Peter, Thankyou I have tried your method and it sort of works but not very consistent. I clicked on the button a few times and did not get the alert statement. So Im not so sure. The only reason I am doing this is because I need to track a button click. The following tag is on the client side. All I did was ask him to add srcLd()........then in srcLd, my js file is executed and writes to the database if the button is clicked. test If the is on the page then it tracks on entry to the page and not on button click, that is the reason why I have done it like that. Do u think there is caching that need to be cleared or something? Thanks jess ________________________________ From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of Peter Brunone Sent: 01 December 2004 16:42 To: '[JavaScript List]' Subject: [SPAM] - RE: [Javascript] js file soemtimes not executing - Email found in subject Hi Jessica, This seems like a really contorted way of doing things. Why not just assign the script source right away? If you need to do it this way, I'd suggest putting both calls in the same attribute, i.e. either the onclick event handler or the href property, like this: or Let us know if any of that works (apologies if you get an error; I'm in a hurry and I haven't tested these). Cheers, Peter Brunone ______________ EasyListBox.com -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of Jessica Hi, Hope u can assist me in my problem that needs to be resolved asap. On button click I call the following : car test All Ninja.js has is just an alert statement. This is a really strange but sometimes on button click I get the alert statement and sometimes not. Can u see what the problem is, I even deleted the item from the cache. Thankyou in advance jessica -------------- next part -------------- An HTML attachment was scrubbed... URL: From pp.koch at gmail.com Wed Dec 1 13:56:17 2004 From: pp.koch at gmail.com (Peter-Paul Koch) Date: Wed, 1 Dec 2004 20:56:17 +0100 Subject: [Javascript] file upload In-Reply-To: References: <14997.38.115.154.129.1101752691.squirrel@mail.braverock.com> Message-ID: <21e4a12804120111565377f520@mail.gmail.com> > And how about opening via JS File Browser menu? Is that also impossible? > Because that Browse button is really ugly :( If it's just the looks of the button you want to modify, try http://www.quirksmode.org/dom/inputfile.html -- ------------------------------------------------------------------- ppk, freelance web developer NEW: Bug Report system: Report bugs yourself, or comment on previously reported ones. http://www.quirksmode.org/bugreports/ ------------------------------------------------------------------ From iztok.polanic at amis.net Wed Dec 1 13:59:31 2004 From: iztok.polanic at amis.net (Iztok Polanic) Date: Wed, 1 Dec 2004 20:59:31 +0100 Subject: [Javascript] file upload In-Reply-To: <21e4a12804120111565377f520@mail.gmail.com> Message-ID: Hi! Excellent! Bye, Iztok > -----Original Message----- > From: javascript-bounces at LaTech.edu > [mailto:javascript-bounces at LaTech.edu]On Behalf Of Peter-Paul Koch > Sent: 1. december 2004 20:56 > To: [JavaScript List] > Subject: Re: [Javascript] file upload > > > > And how about opening via JS File Browser menu? Is that also impossible? > > Because that Browse button is really ugly :( > > If it's just the looks of the button you want to modify, try > http://www.quirksmode.org/dom/inputfile.html > > -- > ------------------------------------------------------------------- > ppk, freelance web developer > > NEW: Bug Report system: > Report bugs yourself, or comment on previously > reported ones. > http://www.quirksmode.org/bugreports/ > ------------------------------------------------------------------ > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript From javascript at mattbarton.org Thu Dec 2 09:14:26 2004 From: javascript at mattbarton.org (Matt Barton) Date: Thu, 02 Dec 2004 15:14:26 +0000 Subject: [Javascript] file upload In-Reply-To: <21e4a12804120111565377f520@mail.gmail.com> References: <14997.38.115.154.129.1101752691.squirrel@mail.braverock.com> <21e4a12804120111565377f520@mail.gmail.com> Message-ID: <41AF3152.8060809@mattbarton.org> Just as an aside: that is a very cute solution :) M Peter-Paul Koch wrote: >>And how about opening via JS File Browser menu? Is that also impossible? >>Because that Browse button is really ugly :( > > > If it's just the looks of the button you want to modify, try > http://www.quirksmode.org/dom/inputfile.html > From sriram.v at net-kraft.com Fri Dec 3 08:02:23 2004 From: sriram.v at net-kraft.com (sriram.v) Date: Fri, 3 Dec 2004 19:32:23 +0530 Subject: [Javascript] Java script division error Message-ID: <000501c4d940$b6f35070$cd4b10ac@compnkpl04> Hi All, I am gettting 114.9999998?during ?alert(2.30/.02) , instead of 115. Any idea why and how to fix this ?..... ? With Regards, Sriram V. ? --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.801 / Virus Database: 544 - Release Date: 11/24/2004 -------------- next part -------------- An HTML attachment was scrubbed... URL: From kim.hoogenberg at virgil.nl Fri Dec 3 08:57:35 2004 From: kim.hoogenberg at virgil.nl (Kim Hoogenberg) Date: Fri, 03 Dec 2004 15:57:35 +0100 Subject: [Javascript] Java script division error In-Reply-To: <000501c4d940$b6f35070$cd4b10ac@compnkpl04> References: <000501c4d940$b6f35070$cd4b10ac@compnkpl04> Message-ID: <41B07EDF.6060308@virgil.nl> sriram.v wrote: > Hi All, > I am gettting 114.9999998 during alert(2.30/.02) , instead of 115. > Any idea why and how to fix this ?..... > > With Regards, > Sriram V. floating point numbers are very unreliable if you use them like this, because of memory issues and the way they are implemented. Try using ((2.3x100)/(.02x100)) or 230/2 instead.. From peter at brunone.com Sun Dec 5 02:09:35 2004 From: peter at brunone.com (Peter Brunone) Date: Sun, 5 Dec 2004 02:09:35 -0600 Subject: [Javascript] Detecting display settings Message-ID: <018201c4daa1$c2a639c0$0500a8c0@monkeyhouse> Hi gang, Is there any way -- only in IE, and without any ActiveX or Java funny business -- to detect what the system colors are on a Windows machine? I'd like to be able to match certain defined colors for various window attributes, and I know it's a long shot, but I figured I'd ask. Let me know if that doesn't make sense; between a day job, a night job, and a family which now includes a second child who never sleeps, I may not be explaining as clearly as I think I am. Cheers, Peter From hakan at backbase.com Sun Dec 5 06:58:31 2004 From: hakan at backbase.com (Hakan M (Backbase)) Date: Sun, 05 Dec 2004 13:58:31 +0100 Subject: [Javascript] Detecting display settings In-Reply-To: <018201c4daa1$c2a639c0$0500a8c0@monkeyhouse> References: <018201c4daa1$c2a639c0$0500a8c0@monkeyhouse> Message-ID: <41B305F7.6080909@backbase.com> I think what you're looking for is this: http://www.blooberry.com/indexdot/color/uiname.htm Regards, H Peter Brunone wrote: > Hi gang, > > Is there any way -- only in IE, and without any ActiveX or Java > funny business -- to detect what the system colors are on a Windows > machine? I'd like to be able to match certain defined colors for > various window attributes, and I know it's a long shot, but I figured > I'd ask. > Let me know if that doesn't make sense; between a day job, a > night job, and a family which now includes a second child who never > sleeps, I may not be explaining as clearly as I think I am. > > Cheers, > > Peter > > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > > -- Hakan Magnusson Senior Software Engineer E. hakan at backbase.com M. +31 (0)6 430 40 112 BACKBASE BV Stephensonstraat 19 1097 BA Amsterdam W. http://www.backbase.com/ T. +31 (0)20 750 7305 F. +31 (0)20 750 7301 # Winner of the Broos van Erp Prize (Best High Tech Starter 2004) # Winner of Golden SPIN Award (Innovation Prize 2003) From peter at brunone.com Mon Dec 6 01:20:01 2004 From: peter at brunone.com (Peter Brunone) Date: Mon, 6 Dec 2004 01:20:01 -0600 Subject: [Javascript] Detecting display settings In-Reply-To: <41B305F7.6080909@backbase.com> Message-ID: <002c01c4db64$002e8dc0$0500a8c0@monkeyhouse> Hakan, you absolutely rock my world... The code part, anyway. -----Original Message----- From: javascript-bounces at LaTech.edu On Behalf Of Hakan M (Backbase) I think what you're looking for is this: http://www.blooberry.com/indexdot/color/uiname.htm Regards, H Peter Brunone wrote: > Hi gang, > > Is there any way -- only in IE, and without any ActiveX or Java funny > business -- to detect what the system colors are on a Windows machine? > I'd like to be able to match certain defined colors for various window > attributes, and I know it's a long shot, but I figured I'd ask. > Let me know if that doesn't make sense; between a day job, a > night job, and a family which now includes a second child who never > sleeps, I may not be explaining as clearly as I think I am. > > Cheers, > > Peter From Jessica at greenlight.co.uk Mon Dec 6 03:12:30 2004 From: Jessica at greenlight.co.uk (Jessica) Date: Mon, 6 Dec 2004 09:12:30 -0000 Subject: [Javascript] window.close not working Message-ID: <66D647943549414EBD667799075DB4ED067C94@glm-058n4659a87.Greenlight.local> Hi, I have 2 windows, on button click of my 1rst window, I call the 2nd window, which basically tracks button click & executes A script to write to the database. In the 2nd window I am calling a js file, which writes data to the db. This works fine but I only want the window which calls the script 2 be opened for a few seconds. So after the script I have a window.close(). It does not write to the database with the window.close. So I put a setimeout() on my second window but it still does not write 2 the database. If I remove the window and manually close the window it writes. Window1 function srcLd() { window.open("ButtonClick.aspx","","width=1,height=1,top=700,scrollbars=0 ,menubar=0,toolbar=0,location=0,status=0"); } Window2 (This is all window2 has and I need it open for a few seconds, execute test.js which writes ordervalue to the db and then automatically close)
Please assist. jess -------------- next part -------------- An HTML attachment was scrubbed... URL: From kim.hoogenberg at virgil.nl Mon Dec 6 03:16:52 2004 From: kim.hoogenberg at virgil.nl (Kim Hoogenberg) Date: Mon, 06 Dec 2004 10:16:52 +0100 Subject: [Javascript] window.close not working In-Reply-To: <66D647943549414EBD667799075DB4ED067C94@glm-058n4659a87.Greenlight.local> References: <66D647943549414EBD667799075DB4ED067C94@glm-058n4659a87.Greenlight.local> Message-ID: <41B42384.40401@virgil.nl> Hello, setTimeout takes msec as second argument. Putting 5,000,000,000,000 msecs there will take you about appr. 58000 days to let the script be executed. First try using some other number like 5 seconds (5000 msecs). Hope this helps, Kim > > > Hi, > > > > I have 2 windows, on button click of my 1rst window, I call the 2^nd > window, which basically tracks button click & executes > > A script to write to the database. > > In the 2nd window I am calling a js file, which writes data to the db. > > This works fine but I only want the window which calls the script 2 be > opened for a few seconds. > > So after the script I have a window.close(). It does not write to the > database with the window.close. > > So I put a setimeout() on my second window but it still does not write > 2 the database. If I remove the window and manually close the window > it writes. > > > > *Window1* > > function srcLd() > > { > window.open("ButtonClick.aspx","","width=1,height=1,top=700,scrollbars=0,menubar=0,toolbar=0,location=0,status=0"); > > } > > > > *Window2 (This is all window2 has and I need it open for a few > seconds, execute test.js which writes ordervalue to the db and then > automatically close)* > >
> > > >
> > > > > > > > > > Please assist. > > jess > > > > > >------------------------------------------------------------------------ > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript > > From Jessica at greenlight.co.uk Mon Dec 6 03:23:26 2004 From: Jessica at greenlight.co.uk (Jessica) Date: Mon, 6 Dec 2004 09:23:26 -0000 Subject: [SPAM] - Re: [Javascript] window.close not working - Email found in subject Message-ID: <66D647943549414EBD667799075DB4ED067C95@glm-058n4659a87.Greenlight.local> Hi, I only want my window to close after I execute the following script. It does not seem to work, I did change setTimeout 2 5 secs but still does not execute my test.js. jess -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of Kim Hoogenberg Sent: 06 December 2004 09:17 To: [JavaScript List] Subject: [SPAM] - Re: [Javascript] window.close not working - Email found in subject Hello, setTimeout takes msec as second argument. Putting 5,000,000,000,000 msecs there will take you about appr. 58000 days to let the script be executed. First try using some other number like 5 seconds (5000 msecs). Hope this helps, Kim > > > Hi, > > > > I have 2 windows, on button click of my 1rst window, I call the 2^nd > window, which basically tracks button click & executes > > A script to write to the database. > > In the 2nd window I am calling a js file, which writes data to the db. > > This works fine but I only want the window which calls the script 2 be > opened for a few seconds. > > So after the script I have a window.close(). It does not write to the > database with the window.close. > > So I put a setimeout() on my second window but it still does not write > 2 the database. If I remove the window and manually close the window > it writes. > > > > *Window1* > > function srcLd() > > { > window.open("ButtonClick.aspx","","width=1,height=1,top=700,scrollbars=0 ,menubar=0,toolbar=0,location=0,status=0"); > > } > > > > *Window2 (This is all window2 has and I need it open for a few > seconds, execute test.js which writes ordervalue to the db and then > automatically close)* > >
> > > >
> > > > > > > > > > Please assist. > > jess > > > > > >----------------------------------------------------------------------- - > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript > > _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From kim.hoogenberg at virgil.nl Mon Dec 6 03:27:51 2004 From: kim.hoogenberg at virgil.nl (Kim Hoogenberg) Date: Mon, 06 Dec 2004 10:27:51 +0100 Subject: [SPAM] - Re: [Javascript] window.close not working - Email found in subject In-Reply-To: <66D647943549414EBD667799075DB4ED067C95@glm-058n4659a87.Greenlight.local> References: <66D647943549414EBD667799075DB4ED067C95@glm-058n4659a87.Greenlight.local> Message-ID: <41B42617.4020105@virgil.nl> Hi Jess, http://test.js seems like an invalid URL to me.. If you run it on your local machine you should use something like https://localhost/test.js or else https://server:port/test.js. In this case you should use the same server/port number as from where you pages are loaded. Have you checked that? Greetz, Kim >Hi, > >I only want my window to close after I execute the following script. > > >It does not seem to work, I did change setTimeout 2 5 secs but still >does not execute my test.js. > > > >jess > > >-----Original Message----- >From: javascript-bounces at LaTech.edu >[mailto:javascript-bounces at LaTech.edu] On Behalf Of Kim Hoogenberg >Sent: 06 December 2004 09:17 >To: [JavaScript List] >Subject: [SPAM] - Re: [Javascript] window.close not working - Email >found in subject > >Hello, > >setTimeout takes msec as second argument. Putting 5,000,000,000,000 >msecs there will take you about appr. 58000 days to let the script be >executed. First try using some other number like 5 seconds (5000 msecs). > >Hope this helps, > >Kim > > > >> >> >>Hi, >> >> >> >>I have 2 windows, on button click of my 1rst window, I call the 2^nd >> window, which basically tracks button click & executes >> >>A script to write to the database. >> >>In the 2nd window I am calling a js file, which writes data to the db. >> >>This works fine but I only want the window which calls the script 2 be >> >> > > > >>opened for a few seconds. >> >>So after the script I have a window.close(). It does not write to the >>database with the window.close. >> >>So I put a setimeout() on my second window but it still does not write >> >> > > > >>2 the database. If I remove the window and manually close the window >>it writes. >> >> >> >>*Window1* >> >>function srcLd() >> >>{ >> >> >> >window.open("ButtonClick.aspx","","width=1,height=1,top=700,scrollbars=0 >,menubar=0,toolbar=0,location=0,status=0"); > > >> } >> >> >> >>*Window2 (This is all window2 has and I need it open for a few >>seconds, execute test.js which writes ordervalue to the db and then >>automatically close)* >> >>
>> >> > >> >value="999" > > > >>
>> >> >> >> >> >> >> >> >> >>Please assist. >> >>jess >> >> >> From javascript at mattbarton.org Mon Dec 6 03:31:30 2004 From: javascript at mattbarton.org (Matt Barton) Date: Mon, 06 Dec 2004 09:31:30 +0000 Subject: [SPAM] - Re: [Javascript] window.close not working - Email foundin subject In-Reply-To: <66D647943549414EBD667799075DB4ED067C95@glm-058n4659a87.Greenlight.local> References: <66D647943549414EBD667799075DB4ED067C95@glm-058n4659a87.Greenlight.local> Message-ID: <41B426F2.4050902@mattbarton.org> You could try this: Change your test.js library so that all of the pertinant parts (the db write) are in a function. fWriteToDB() for instance. Then in your second window do something like this: Note: this is all untested, and I don't really agree with using javascript like this, but if this is how you really want to go then you could try it. Matt Jessica wrote: > Hi, > > I only want my window to close after I execute the following script. > > > It does not seem to work, I did change setTimeout 2 5 secs but still > does not execute my test.js. > > > > jess > > > -----Original Message----- > From: javascript-bounces at LaTech.edu > [mailto:javascript-bounces at LaTech.edu] On Behalf Of Kim Hoogenberg > Sent: 06 December 2004 09:17 > To: [JavaScript List] > Subject: [SPAM] - Re: [Javascript] window.close not working - Email > found in subject > > Hello, > > setTimeout takes msec as second argument. Putting 5,000,000,000,000 > msecs there will take you about appr. 58000 days to let the script be > executed. First try using some other number like 5 seconds (5000 msecs). > > Hope this helps, > > Kim > > >> >> >>Hi, >> >> >> >>I have 2 windows, on button click of my 1rst window, I call the 2^nd >> window, which basically tracks button click & executes >> >>A script to write to the database. >> >>In the 2nd window I am calling a js file, which writes data to the db. >> >>This works fine but I only want the window which calls the script 2 be > > >>opened for a few seconds. >> >>So after the script I have a window.close(). It does not write to the >>database with the window.close. >> >>So I put a setimeout() on my second window but it still does not write > > >>2 the database. If I remove the window and manually close the window >>it writes. >> >> >> >>*Window1* >> >>function srcLd() >> >>{ >> > > window.open("ButtonClick.aspx","","width=1,height=1,top=700,scrollbars=0 > ,menubar=0,toolbar=0,location=0,status=0"); > >> } >> >> >> >>*Window2 (This is all window2 has and I need it open for a few >>seconds, execute test.js which writes ordervalue to the db and then >>automatically close)* >> >>
>> >> > value="999" > > >>
>> >> >> >> >> >> >> >> >> >>Please assist. >> >>jess >> >> >> >> >> >>----------------------------------------------------------------------- > > - > >>_______________________________________________ >>Javascript mailing list >>Javascript at LaTech.edu >>https://lists.LaTech.edu/mailman/listinfo/javascript >> >> > > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > From Jessica at greenlight.co.uk Mon Dec 6 03:34:34 2004 From: Jessica at greenlight.co.uk (Jessica) Date: Mon, 6 Dec 2004 09:34:34 -0000 Subject: [SPAM] - Re: [SPAM] - Re: [Javascript] window.close not working - Email foundin subject - Email found in subject Message-ID: <66D647943549414EBD667799075DB4ED067C97@glm-058n4659a87.Greenlight.local> Hi, the js file is referenced correctly. Cos it does work when I remove the self.close & manualy close the window. But as soon as I put the self.close it does nto write. -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of Kim Hoogenberg Sent: 06 December 2004 09:28 To: [JavaScript List] Subject: [SPAM] - Re: [SPAM] - Re: [Javascript] window.close not working - Email foundin subject - Email found in subject Hi Jess, http://test.js seems like an invalid URL to me.. If you run it on your local machine you should use something like https://localhost/test.js or else https://server:port/test.js. In this case you should use the same server/port number as from where you pages are loaded. Have you checked that? Greetz, Kim >Hi, > >I only want my window to close after I execute the following script. > > >It does not seem to work, I did change setTimeout 2 5 secs but still >does not execute my test.js. > > > >jess > > >-----Original Message----- >From: javascript-bounces at LaTech.edu >[mailto:javascript-bounces at LaTech.edu] On Behalf Of Kim Hoogenberg >Sent: 06 December 2004 09:17 >To: [JavaScript List] >Subject: [SPAM] - Re: [Javascript] window.close not working - Email >found in subject > >Hello, > >setTimeout takes msec as second argument. Putting 5,000,000,000,000 >msecs there will take you about appr. 58000 days to let the script be >executed. First try using some other number like 5 seconds (5000 msecs). > >Hope this helps, > >Kim > > > >> >> >>Hi, >> >> >> >>I have 2 windows, on button click of my 1rst window, I call the 2^nd >> window, which basically tracks button click & executes >> >>A script to write to the database. >> >>In the 2nd window I am calling a js file, which writes data to the db. >> >>This works fine but I only want the window which calls the script 2 be >> >> > > > >>opened for a few seconds. >> >>So after the script I have a window.close(). It does not write to the >>database with the window.close. >> >>So I put a setimeout() on my second window but it still does not write >> >> > > > >>2 the database. If I remove the window and manually close the window >>it writes. >> >> >> >>*Window1* >> >>function srcLd() >> >>{ >> >> >> >window.open("ButtonClick.aspx","","width=1,height=1,top=700,scrollbars= 0 >,menubar=0,toolbar=0,location=0,status=0"); > > >> } >> >> >> >>*Window2 (This is all window2 has and I need it open for a few >>seconds, execute test.js which writes ordervalue to the db and then >>automatically close)* >> >>
>> >> > >> >value="999" > > > >>
>> >> >> >> >> >> >> >> >> >>Please assist. >> >>jess >> >> >> _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From peter at brunone.com Mon Dec 6 03:37:35 2004 From: peter at brunone.com (Peter Brunone) Date: Mon, 6 Dec 2004 03:37:35 -0600 Subject: [SPAM] - Re: [Javascript] window.close not working - Email foundin subject In-Reply-To: <66D647943549414EBD667799075DB4ED067C95@glm-058n4659a87.Greenlight.local> Message-ID: <003c01c4db77$37da6fb0$0500a8c0@monkeyhouse> How is the js file supposed to be executed? Usually when one uses the script src="file.js" syntax in HTML, it merely provides a reference to be used by script in the page (although I realize that this is not necessarily the case). Maybe in your remote javascript file, you could set a variable after the database update is complete, and modify your setTimeout function to check for the value so if the value was set, it would close the window, and if not, it would go another round it its holding pattern. -----Original Message----- From: javascript-bounces at LaTech.edu On Behalf Of Jessica Hi, I only want my window to close after I execute the following script. It does not seem to work, I did change setTimeout 2 5 secs but still does not execute my test.js. jess -----Original Message----- From: javascript-bounces at LaTech.edu On Behalf Of Kim Hoogenberg Hello, setTimeout takes msec as second argument. Putting 5,000,000,000,000 msecs there will take you about appr. 58000 days to let the script be executed. First try using some other number like 5 seconds (5000 msecs). Hope this helps, Kim > > > Hi, > > > > I have 2 windows, on button click of my 1rst window, I call the 2^nd > window, which basically tracks button click & executes > > A script to write to the database. > > In the 2nd window I am calling a js file, which writes data to the db. > > This works fine but I only want the window which calls the script 2 be > opened for a few seconds. > > So after the script I have a window.close(). It does not write to the > database with the window.close. > > So I put a setimeout() on my second window but it still does not write > 2 the database. If I remove the window and manually close the window > it writes. > > > > *Window1* > > function srcLd() > > { > window.open("ButtonClick.aspx","","width=1,height=1,top=700,scrollbars=0 ,menubar=0,toolbar=0,location=0,status=0"); > > } > > > > *Window2 (This is all window2 has and I need it open for a few > seconds, execute test.js which writes ordervalue to the db and then > automatically close)* > >
> > > >
> > > > > > > > Please assist. > > jess From CNafziger at sauder.com Mon Dec 6 10:27:27 2004 From: CNafziger at sauder.com (Chris Nafziger) Date: Mon, 6 Dec 2004 11:27:27 -0500 Subject: [Javascript] Nav bar positioning problem... Message-ID: <622A954DD517D411B20C00508BCF23B01A949FDE@mail.sauder.com> Open a window about half your screen height and go to http://www.sauderworship.com/products/index.html. There is a nav bar at the bottom, which you should see. Now if you scroll down, you will notice the bar moves up with content, rather than staying at the bottom of the screen. On a window resize, or on a nav bar rollover, something is firing to reset the position of the bar to the bottom of the window. How can this be easily fixed to keep the bar in its original position, near the bottom of the window (even if it is over content), when the user scrolls (when their window height is less than the length of the content)? What is being fired when the window is resized? It seems that the same thing could be fired once per second, to reset the bar's position... Perhaps that's a crappy solution. Anyone? (Yes, this site's design sucks... I didn't do it.) -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- This e-mail and any files transmitted with it may contain privileged, confidential, or proprietary information which may be protected from disclosure under law, and is intended solely for the use of the individual, group, or entity to whom this e-mail is addressed.? If you are not one of the named recipients, please notify the sender by e-mail and delete this message immediately from your computer.? Any other use, retention, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited.? Thank you for your assistance. From CNafziger at sauder.com Tue Dec 7 10:00:06 2004 From: CNafziger at sauder.com (Chris Nafziger) Date: Tue, 7 Dec 2004 11:00:06 -0500 Subject: [Javascript] Nav bar positioning problem... Message-ID: <622A954DD517D411B20C00508BCF23B01A94A157@mail.sauder.com> Nevermind... it seems to be an issue with CSS2 implementation in IE... works fine in FireFox... there are more issues than just this one in Netscape... and since this isn't a CSS list... -----Original Message----- From: Chris Nafziger [mailto:CNafziger at sauder.com] Sent: Monday, December 06, 2004 11:27 AM To: [JavaScript List] Subject: [Javascript] Nav bar positioning problem... Open a window about half your screen height and go to http://www.sauderworship.com/products/index.html. There is a nav bar at the bottom, which you should see. Now if you scroll down, you will notice the bar moves up with content, rather than staying at the bottom of the screen. On a window resize, or on a nav bar rollover, something is firing to reset the position of the bar to the bottom of the window. How can this be easily fixed to keep the bar in its original position, near the bottom of the window (even if it is over content), when the user scrolls (when their window height is less than the length of the content)? What is being fired when the window is resized? It seems that the same thing could be fired once per second, to reset the bar's position... Perhaps that's a crappy solution. Anyone? (Yes, this site's design sucks... I didn't do it.) -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- This e-mail and any files transmitted with it may contain privileged, confidential, or proprietary information which may be protected from disclosure under law, and is intended solely for the use of the individual, group, or entity to whom this e-mail is addressed.? If you are not one of the named recipients, please notify the sender by e-mail and delete this message immediately from your computer.? Any other use, retention, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited.? Thank you for your assistance. _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From LaurentM at london.virgin.net Thu Dec 9 09:49:27 2004 From: LaurentM at london.virgin.net (Laurent Muchacho) Date: Thu, 9 Dec 2004 15:49:27 -0000 Subject: [Javascript] Need to loop through all element in a div cross browser Message-ID: <1A847600F409D711B52C0001FAFFF3370506DDCF@vnetxu01.london.virgin.net> Hi All, Guy's I seriously need your help. What I'm trying to do is a loop through all element first level nested contained in a DIV. The Idea is to reproduce the document.all implemented by IE but cross browser. Please if you think it's impossible please reply and let me know. Found below an examples of my html
don't want to count the item nested in this element
don't want to count the item nested in this element
Thanks in advance. Laurent From hakan at backbase.com Thu Dec 9 10:35:05 2004 From: hakan at backbase.com (Hakan M (Backbase)) Date: Thu, 09 Dec 2004 17:35:05 +0100 Subject: [Javascript] Need to loop through all element in a div cross browser In-Reply-To: <1A847600F409D711B52C0001FAFFF3370506DDCF@vnetxu01.london.virgin.net> References: <1A847600F409D711B52C0001FAFFF3370506DDCF@vnetxu01.london.virgin.net> Message-ID: <41B87EB9.4030606@backbase.com> Something like this: var oDiv = document.getElementById('parentDiv'); if(oDiv.firstChild) { // check for children var oChild = oDiv.firstChild; while(oChild) { // run over them if(oChild.nodeType==1) { // element // oChild is a first level child of oDiv // Do what you want with it here } oChild = oChild.nextSibling; } } Didn't try it, but you get the point. Regards, H Laurent Muchacho wrote: > Hi All, > > Guy's I seriously need your help. > What I'm trying to do is a loop through all element first level nested > contained in a DIV. > The Idea is to reproduce the document.all implemented by IE but cross > browser. > Please if you think it's impossible please reply and let me know. > > Found below an examples of my html > >
> > > > > > >
> don't want to count the item nested in this element > >
>
> don't want to count the item nested in this element > >
>
> > Thanks in advance. > > Laurent > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > > -- Hakan Magnusson Senior Software Engineer E. hakan at backbase.com M. +31 (0)6 430 40 112 BACKBASE BV Stephensonstraat 19 1097 BA Amsterdam W. http://www.backbase.com/ T. +31 (0)20 750 7305 F. +31 (0)20 750 7301 # Winner of the Broos van Erp Prize (Best High Tech Starter 2004) # Winner of Golden SPIN Award (Innovation Prize 2003) From LaurentM at london.virgin.net Thu Dec 9 11:00:43 2004 From: LaurentM at london.virgin.net (Laurent Muchacho) Date: Thu, 9 Dec 2004 17:00:43 -0000 Subject: [Javascript] Need to loop through all element in a div cross browser Message-ID: <1A847600F409D711B52C0001FAFFF3370506DDD0@vnetxu01.london.virgin.net> Hi Thanks this this give an other approach to what I have to do Thanks a lot Hakan. Do you have any references link, url you could recommend on this. Thanks Laurent -----Original Message----- From: Hakan M (Backbase) [mailto:hakan at backbase.com] Sent: 09 December 2004 16:35 To: [JavaScript List] Subject: Re: [Javascript] Need to loop through all element in a div cross browser Something like this: var oDiv = document.getElementById('parentDiv'); if(oDiv.firstChild) { // check for children var oChild = oDiv.firstChild; while(oChild) { // run over them if(oChild.nodeType==1) { // element // oChild is a first level child of oDiv // Do what you want with it here } oChild = oChild.nextSibling; } } Didn't try it, but you get the point. Regards, H Laurent Muchacho wrote: > Hi All, > > Guy's I seriously need your help. > What I'm trying to do is a loop through all element first level nested > contained in a DIV. > The Idea is to reproduce the document.all implemented by IE but cross > browser. > Please if you think it's impossible please reply and let me know. > > Found below an examples of my html > >
> > > > > > >
> don't want to count the item nested in this element > >
>
> don't want to count the item nested in this element > >
>
> > Thanks in advance. > > Laurent > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > > -- Hakan Magnusson Senior Software Engineer E. hakan at backbase.com M. +31 (0)6 430 40 112 BACKBASE BV Stephensonstraat 19 1097 BA Amsterdam W. http://www.backbase.com/ T. +31 (0)20 750 7305 F. +31 (0)20 750 7301 # Winner of the Broos van Erp Prize (Best High Tech Starter 2004) # Winner of Golden SPIN Award (Innovation Prize 2003) _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From hakan at backbase.com Thu Dec 9 11:42:25 2004 From: hakan at backbase.com (Hakan M (Backbase)) Date: Thu, 09 Dec 2004 18:42:25 +0100 Subject: [Javascript] Need to loop through all element in a div cross browser In-Reply-To: <1A847600F409D711B52C0001FAFFF3370506DDD0@vnetxu01.london.virgin.net> References: <1A847600F409D711B52C0001FAFFF3370506DDD0@vnetxu01.london.virgin.net> Message-ID: <41B88E81.1000403@backbase.com> No problem. I suppose by "cross browser" you mainly mean IE and browsers that follow DOM standard. For Mozilla, you can check out the Gecko DOM reference at http://www.mozilla.org/docs/dom/domref/ I think you'll find most methods and properties you need in http://www.mozilla.org/docs/dom/domref/dom_el_ref.html Standard DOM operations should work the same way in Opera and Safari, but if you run into problems just ask away. H Laurent Muchacho wrote: > Hi > > Thanks this this give an other approach to what I have to do > Thanks a lot Hakan. > Do you have any references link, url you could recommend on this. > > Thanks Laurent > > -----Original Message----- > From: Hakan M (Backbase) [mailto:hakan at backbase.com] > Sent: 09 December 2004 16:35 > To: [JavaScript List] > Subject: Re: [Javascript] Need to loop through all element in a div > cross browser > > > Something like this: > > > var oDiv = document.getElementById('parentDiv'); > if(oDiv.firstChild) { // check for children > var oChild = oDiv.firstChild; > while(oChild) { // run over them > if(oChild.nodeType==1) { // element > // oChild is a first level child of oDiv > // Do what you want with it here > } > oChild = oChild.nextSibling; > } > } > > > Didn't try it, but you get the point. > > Regards, > H > > > Laurent Muchacho wrote: > >>Hi All, >> >>Guy's I seriously need your help. >>What I'm trying to do is a loop through all element first level nested >>contained in a DIV. >>The Idea is to reproduce the document.all implemented by IE but cross >>browser. >>Please if you think it's impossible please reply and let me know. >> >>Found below an examples of my html >> >>
>> >> >> >> >> >> >>
>> don't want to count the item nested in this element >> >>
>>
>> don't want to count the item nested in this element >> >>
>>
>> >>Thanks in advance. >> >>Laurent >>_______________________________________________ >>Javascript mailing list >>Javascript at LaTech.edu >>https://lists.LaTech.edu/mailman/listinfo/javascript >> >> > > -- Hakan Magnusson Senior Software Engineer E. hakan at backbase.com M. +31 (0)6 430 40 112 BACKBASE BV Stephensonstraat 19 1097 BA Amsterdam W. http://www.backbase.com/ T. +31 (0)20 750 7305 F. +31 (0)20 750 7301 # Winner of the Broos van Erp Prize (Best High Tech Starter 2004) # Winner of Golden SPIN Award (Innovation Prize 2003) From mpalmer at hezmatt.org Sun Dec 12 05:46:57 2004 From: mpalmer at hezmatt.org (Matthew Palmer) Date: Sun, 12 Dec 2004 22:46:57 +1100 Subject: [Javascript] How to make IE display changes to DOM tree? Message-ID: <20041212114656.GA2947@hezmatt.org> Trying to make a page dynamically add extra rows (form fields, actually) to a page. Works wonderfully in Mozilla, refuses to do the trick in IE. Minimalistic example: ----8<---

Foo

Here There
---->8---- Does the sensible thing in Mozilla Firefox (appends a new table row for each click), but IE doesn't show any change. Weirdest thing is, if you do a tree dump of the DOM from the root of the table, the new nodes *are* in there -- they just never get displayed. I'm not clueful enough to check if the newly created nodes are somehow "display: hidden" or something, but since no example out there in the real world shows code for unmasking these phantom elements, I don't think that's the problem. Can someone at least cut-n-paste the example above into a browser and tell me if it works for them? I'm using IE 6.0.2800.1106 on Windows 98 to test. I've tried jacking the security zone to the most trusted level, but I still can't get it to work. All help greatly appreciated, preferably before I tear *all* my hair out, - Matt -- [On LDAP] "Lightweight my ass. The fact that X.509 has the weight of an 18-wheel rig doesn't make a minivan something you shove in your backpack." -- Zed Pobre, ASR -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: From peter at brunone.com Sun Dec 12 22:33:47 2004 From: peter at brunone.com (Peter Brunone) Date: Sun, 12 Dec 2004 22:33:47 -0600 Subject: [Javascript] How to make IE display changes to DOM tree? In-Reply-To: <20041212114656.GA2947@hezmatt.org> Message-ID: <004101c4e0cc$f08d7890$0500a8c0@monkeyhouse> Hi Matt, I tried your script and it didn't work for me either. For what it's worth, when I want to add table rows in IE, I use the insertRow() and insertCell() methods of the table and tr, respectively. You can read up on them at the MSDN site: http://tinyurl.com/52nbl Cheers, Peter Brunone ___________________ www.EasyListBox.com -----Original Message----- From: javascript-bounces at LaTech.edu On Behalf Of Matthew Palmer Trying to make a page dynamically add extra rows (form fields, actually) to a page. Works wonderfully in Mozilla, refuses to do the trick in IE. Minimalistic example: ----8<---

Foo

Here There
---->8---- Does the sensible thing in Mozilla Firefox (appends a new table row for each click), but IE doesn't show any change. Weirdest thing is, if you do a tree dump of the DOM from the root of the table, the new nodes *are* in there -- they just never get displayed. I'm not clueful enough to check if the newly created nodes are somehow "display: hidden" or something, but since no example out there in the real world shows code for unmasking these phantom elements, I don't think that's the problem. Can someone at least cut-n-paste the example above into a browser and tell me if it works for them? I'm using IE 6.0.2800.1106 on Windows 98 to test. I've tried jacking the security zone to the most trusted level, but I still can't get it to work. All help greatly appreciated, preferably before I tear *all* my hair out, - Matt -- [On LDAP] "Lightweight my ass. The fact that X.509 has the weight of an 18-wheel rig doesn't make a minivan something you shove in your backpack." -- Zed Pobre, ASR From mpalmer at hezmatt.org Mon Dec 13 03:30:18 2004 From: mpalmer at hezmatt.org (Matthew Palmer) Date: Mon, 13 Dec 2004 20:30:18 +1100 Subject: [Javascript] Re: How to make IE display changes to DOM tree? In-Reply-To: <004101c4e0cc$f08d7890$0500a8c0@monkeyhouse> References: <20041212114656.GA2947@hezmatt.org> <004101c4e0cc$f08d7890$0500a8c0@monkeyhouse> Message-ID: <20041213093018.GA1070@hezmatt.org> On Sun, Dec 12, 2004 at 10:33:47PM -0600, Peter Brunone wrote: > I tried your script and it didn't work for me either. For what I found the problem: The IE DOM adds an extra level of object inside the TABLE -- TBODY. You need to appendChild to the TBODY, not the TABLE. So, for instance: row = document.createElement('TR'); tbl = document.getElementById("DynamicTable"); // Mozilla-compatible tbl.appendChild(row); // But for IE: tbl.childNodes.item(0).appendChild(row); > it's worth, when I want to add table rows in IE, I use the insertRow() > and insertCell() methods of the table and tr, respectively. You can Son of a *****! It's not even IE-specific -- it's in the W3C HTML DOM version 2. Aaaargh! Thanks for the pointer, Peter -- I've found the relevant spec now, so hopefully I should be able to write things a little simpler from now on... Does anyone have any recommendations for good, up-to-date books or sites for all this sort of thing? The W3C specs, whilst good, aren't exactly the most approachable sorts of things... - Matt -- "Riding through the tunnel at 200 is something you should approach in the same way you'd bonk your neighbours wife. A once in a while thing. Do it often and you'll get caught." -- Kel, aus.moto -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: From ScottHam at clientlogic.com Mon Dec 13 06:25:07 2004 From: ScottHam at clientlogic.com (Scott Hamm) Date: Mon, 13 Dec 2004 07:25:07 -0500 Subject: [Javascript] (no subject) Message-ID: <48A8BDD0DC72F3458A713242E3848AAD0AE5E89F@L001N14> From peter at brunone.com Mon Dec 13 08:11:12 2004 From: peter at brunone.com (Peter Brunone) Date: Mon, 13 Dec 2004 08:11:12 -0600 Subject: [Javascript] Re: How to make IE display changes to DOM tree? In-Reply-To: <20041213093018.GA1070@hezmatt.org> Message-ID: <007f01c4e11d$9a58d270$0500a8c0@monkeyhouse> > Does anyone have any recommendations for good, up-to-date > books or sites for all this sort of thing? I don't know, but if you find one, pass it on. I love the MSDN reference for IE, but so far I have found *nothing* comparable for the standards (or even just one other browser). -----Original Message----- From: javascript-bounces at LaTech.edu On Behalf Of Matthew Palmer On Sun, Dec 12, 2004 at 10:33:47PM -0600, Peter Brunone wrote: > I tried your script and it didn't work for me either. For what I found the problem: The IE DOM adds an extra level of object inside the TABLE -- TBODY. You need to appendChild to the TBODY, not the TABLE. So, for instance: row = document.createElement('TR'); tbl = document.getElementById("DynamicTable"); // Mozilla-compatible tbl.appendChild(row); // But for IE: tbl.childNodes.item(0).appendChild(row); > it's worth, when I want to add table rows in IE, I use the insertRow() > and insertCell() methods of the table and tr, respectively. You can Son of a *****! It's not even IE-specific -- it's in the W3C HTML DOM version 2. Aaaargh! Thanks for the pointer, Peter -- I've found the relevant spec now, so hopefully I should be able to write things a little simpler from now on... Does anyone have any recommendations for good, up-to-date books or sites for all this sort of thing? The W3C specs, whilst good, aren't exactly the most approachable sorts of things... - Matt From hakan at backbase.com Mon Dec 13 09:20:58 2004 From: hakan at backbase.com (Hakan M (Backbase)) Date: Mon, 13 Dec 2004 16:20:58 +0100 Subject: [Javascript] Re: How to make IE display changes to DOM tree? In-Reply-To: <007f01c4e11d$9a58d270$0500a8c0@monkeyhouse> References: <007f01c4e11d$9a58d270$0500a8c0@monkeyhouse> Message-ID: <41BDB35A.6060702@backbase.com> I use these for looking up stuff. http://www.w3schools.org/ http://www.mozilla.org/docs/dom/domref/ http://www.opera.com/docs/specs/js/dom/ Regards, H Peter Brunone wrote: >>Does anyone have any recommendations for good, up-to-date >>books or sites for all this sort of thing? > > > I don't know, but if you find one, pass it on. I love the MSDN > reference for IE, but so far I have found *nothing* comparable for the > standards (or even just one other browser). > > -----Original Message----- > From: javascript-bounces at LaTech.edu On Behalf Of Matthew Palmer > > On Sun, Dec 12, 2004 at 10:33:47PM -0600, Peter Brunone wrote: > >> I tried your script and it didn't work for me either. For what > > > I found the problem: The IE DOM adds an extra level of object inside the > TABLE -- TBODY. You need to appendChild to the TBODY, not the TABLE. > So, for instance: > > row = document.createElement('TR'); > tbl = document.getElementById("DynamicTable"); > > // Mozilla-compatible > tbl.appendChild(row); > > // But for IE: > tbl.childNodes.item(0).appendChild(row); > > >>it's worth, when I want to add table rows in IE, I use the insertRow() > > >>and insertCell() methods of the table and tr, respectively. You can > > > Son of a *****! It's not even IE-specific -- it's in the W3C HTML DOM > version 2. Aaaargh! > > Thanks for the pointer, Peter -- I've found the relevant spec now, so > hopefully I should be able to write things a little simpler from now > on... > > Does anyone have any recommendations for good, up-to-date books or sites > for all this sort of thing? The W3C specs, whilst good, aren't exactly > the most approachable sorts of things... > > - Matt > > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > > -- Hakan Magnusson Senior Software Engineer E. hakan at backbase.com M. +31 (0)6 430 40 112 BACKBASE BV Stephensonstraat 19 1097 BA Amsterdam W. http://www.backbase.com/ T. +31 (0)20 750 7305 F. +31 (0)20 750 7301 # Winner of the Broos van Erp Prize (Best High Tech Starter 2004) # Winner of Golden SPIN Award (Innovation Prize 2003) From peter at brunone.com Mon Dec 13 10:00:53 2004 From: peter at brunone.com (Peter Brunone) Date: Mon, 13 Dec 2004 10:00:53 -0600 Subject: [Javascript] Re: How to make IE display changes to DOM tree? In-Reply-To: <41BDB35A.6060702@backbase.com> Message-ID: <008d01c4e12c$ed022d50$0500a8c0@monkeyhouse> Thanks, Hakan. How accurate have you found the mozilla docs to be where Firefox is concerned? I'll be adding FF support to ELB in 2005, and I'd like to make sure my supposed resource doesn't have too many dead ends. Cheers, Peter -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of Hakan M (Backbase) I use these for looking up stuff. http://www.w3schools.org/ http://www.mozilla.org/docs/dom/domref/ http://www.opera.com/docs/specs/js/dom/ Regards, H Peter Brunone wrote: >>Does anyone have any recommendations for good, up-to-date >>books or sites for all this sort of thing? > > I don't know, but if you find one, pass it on. I love the MSDN > reference for IE, but so far I have found *nothing* comparable for the > standards (or even just one other browser). > > -----Original Message----- > From: javascript-bounces at LaTech.edu On Behalf Of Matthew Palmer > > On Sun, Dec 12, 2004 at 10:33:47PM -0600, Peter Brunone wrote: > >> I tried your script and it didn't work for me either. For what > > I found the problem: The IE DOM adds an extra level of object inside > the TABLE -- TBODY. You need to appendChild to the TBODY, not the > TABLE. So, for instance: > > row = document.createElement('TR'); > tbl = document.getElementById("DynamicTable"); > > // Mozilla-compatible > tbl.appendChild(row); > > // But for IE: > tbl.childNodes.item(0).appendChild(row); > > >>it's worth, when I want to add table rows in IE, I use the insertRow() > > >>and insertCell() methods of the table and tr, respectively. You can > > > Son of a *****! It's not even IE-specific -- it's in the W3C HTML DOM > version 2. Aaaargh! > > Thanks for the pointer, Peter -- I've found the relevant spec now, so > hopefully I should be able to write things a little simpler from now > on... > > Does anyone have any recommendations for good, up-to-date books or > sites for all this sort of thing? The W3C specs, whilst good, aren't > exactly the most approachable sorts of things... > > - Matt From hakan at backbase.com Mon Dec 13 11:21:50 2004 From: hakan at backbase.com (Hakan M (Backbase)) Date: Mon, 13 Dec 2004 18:21:50 +0100 Subject: [Javascript] Re: How to make IE display changes to DOM tree? In-Reply-To: <008d01c4e12c$ed022d50$0500a8c0@monkeyhouse> References: <008d01c4e12c$ed022d50$0500a8c0@monkeyhouse> Message-ID: <41BDCFAE.6000707@backbase.com> Well, in my experience, the DOM of Firefox and Mozilla are identical. Differences might occur if you're using a (really) old release of Firefox, but as of current versions they should be the same. If you're targeting Firefox 0.8 (IIRC) or later, you should be just fine. Regards, H Peter Brunone wrote: > Thanks, Hakan. > > How accurate have you found the mozilla docs to be where Firefox > is concerned? I'll be adding FF support to ELB in 2005, and I'd like to > make sure my supposed resource doesn't have too many dead ends. > > Cheers, > > Peter > > -----Original Message----- > From: javascript-bounces at LaTech.edu > [mailto:javascript-bounces at LaTech.edu] On Behalf Of Hakan M (Backbase) > > I use these for looking up stuff. > > http://www.w3schools.org/ http://www.mozilla.org/docs/dom/domref/ > http://www.opera.com/docs/specs/js/dom/ > > Regards, > H > > Peter Brunone wrote: > >>>Does anyone have any recommendations for good, up-to-date >>>books or sites for all this sort of thing? >> >> I don't know, but if you find one, pass it on. I love the MSDN >>reference for IE, but so far I have found *nothing* comparable for the > > >>standards (or even just one other browser). >> >>-----Original Message----- >>From: javascript-bounces at LaTech.edu On Behalf Of Matthew Palmer >> >>On Sun, Dec 12, 2004 at 10:33:47PM -0600, Peter Brunone wrote: >> >> >>> I tried your script and it didn't work for me either. For what >> >>I found the problem: The IE DOM adds an extra level of object inside >>the TABLE -- TBODY. You need to appendChild to the TBODY, not the >>TABLE. So, for instance: >> >>row = document.createElement('TR'); >>tbl = document.getElementById("DynamicTable"); >> >>// Mozilla-compatible >>tbl.appendChild(row); >> >>// But for IE: >>tbl.childNodes.item(0).appendChild(row); >> >> >> >>>it's worth, when I want to add table rows in IE, I use the insertRow() >> >> >>>and insertCell() methods of the table and tr, respectively. You can >> >> >>Son of a *****! It's not even IE-specific -- it's in the W3C HTML DOM > > >>version 2. Aaaargh! >> >>Thanks for the pointer, Peter -- I've found the relevant spec now, so >>hopefully I should be able to write things a little simpler from now >>on... >> >>Does anyone have any recommendations for good, up-to-date books or >>sites for all this sort of thing? The W3C specs, whilst good, aren't >>exactly the most approachable sorts of things... >> >>- Matt > > > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > > -- Hakan Magnusson Senior Software Engineer E. hakan at backbase.com M. +31 (0)6 430 40 112 BACKBASE BV Stephensonstraat 19 1097 BA Amsterdam W. http://www.backbase.com/ T. +31 (0)20 750 7305 F. +31 (0)20 750 7301 # Winner of the Broos van Erp Prize (Best High Tech Starter 2004) # Winner of Golden SPIN Award (Innovation Prize 2003) From ivan at textzi.net Fri Dec 17 17:14:38 2004 From: ivan at textzi.net (=?ISO-8859-1?Q?ivan_l=C3=B3pez=A0?=) Date: Fri, 17 Dec 2004 15:14:38 -0800 Subject: [Javascript] gradual scroll from another frame. Message-ID: <6CAEEEC9-5081-11D9-B59B-000A95AB1814@textzi.net> hi People, This is my first shot at javascript, so please bear with me : ) I have a frame set up that looks like this: | | | | | | | frame 1 | frame 2 | | | | | | | I'm trying to "gradually" scroll frame 1 by pressing on a radio button in frame 2. Copying&pasting, I wrote the following, which gives me the effect I want when there are no frames, ie it "gradually" scrolls a window: var x=0; function escrol() { if (x<1190) { window.scroll(0, x); x=x+10; setTimeout('escrol()', 100); } else { if (x=1190) { window.scroll(0, x); x=x+10; scrolldelay=setTimeout('escrol()', 100); } else { clearTimeout(scrolldelay); } } } .....
I tried to adapt what I found in this thread: https://lists.latech.edu/pipermail/javascript/2003-December/006781.html I changed my code a bit and put it in the of frame 2, but it doesn't seem to work: var x=0; var frameone = parent.top.frames["one"]; function escrol() { if (x<1190) { frameone.window.scroll(0, x); x=x+10; setTimeout('escrol()', 100); } else { if (x=1190) { frameone.window.scroll(0, x); x=x+10; scrolldelay=setTimeout('escrol()', 100); } else { clearTimeout(scrolldelay); } } } What am I doing wrong? Thanks a lot, ivan From iztok.polanic at amis.net Sun Dec 19 12:54:20 2004 From: iztok.polanic at amis.net (Iztok Polanic) Date: Sun, 19 Dec 2004 19:54:20 +0100 Subject: [Javascript] help needed badly In-Reply-To: <6CAEEEC9-5081-11D9-B59B-000A95AB1814@textzi.net> References: <6CAEEEC9-5081-11D9-B59B-000A95AB1814@textzi.net> Message-ID: <41C5CE5C.9030408@amis.net> Hi! What am I dong wrong? This script works in Firefox 1.0, but IE (6.0 SP2) crashes!!! var objSlike = opener.document.forms[0].slike; objSlike.options[0] = new Option('bla','bla'); Bye, Iztok From hakan at backbase.com Sun Dec 19 13:53:44 2004 From: hakan at backbase.com (Hakan M (Backbase)) Date: Sun, 19 Dec 2004 20:53:44 +0100 Subject: [Javascript] help needed badly In-Reply-To: <41C5CE5C.9030408@amis.net> References: <6CAEEEC9-5081-11D9-B59B-000A95AB1814@textzi.net> <41C5CE5C.9030408@amis.net> Message-ID: <41C5DC48.6090701@backbase.com> The Option constructor? I'm wondering how this can work in Firefox. What you want to do is create a new element of type 'option' and append it to your selectbox. var objSlike = opener.document.forms[0].elements['slike']; var oOption = document.createElement('option'); oOption.setAttribute('value', 'theValueGoesHere'); var oOptionContents = document.createTextNode('theTextContentGoesHere'); oOption.appendChild(oOptionContents); objSlike.appendChild(oOption); Hope this helps. Regards, H Iztok Polanic wrote: > Hi! > > What am I dong wrong? This script works in Firefox 1.0, but IE (6.0 SP2) > crashes!!! > > var objSlike = opener.document.forms[0].slike; > objSlike.options[0] = new Option('bla','bla'); > > Bye, > > Iztok > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > > -- Hakan Magnusson Senior Software Engineer E. hakan at backbase.com M. +31 (0)6 430 40 112 BACKBASE BV Stephensonstraat 19 1097 BA Amsterdam W. http://www.backbase.com/ T. +31 (0)20 750 7305 F. +31 (0)20 750 7301 # Winner of the Broos van Erp Prize (Best High Tech Starter 2004) # Winner of Golden SPIN Award (Innovation Prize 2003) From iztok.polanic at amis.net Sun Dec 19 14:05:52 2004 From: iztok.polanic at amis.net (Iztok Polanic) Date: Sun, 19 Dec 2004 21:05:52 +0100 Subject: [Javascript] help needed badly In-Reply-To: <41C5DC48.6090701@backbase.com> References: <6CAEEEC9-5081-11D9-B59B-000A95AB1814@textzi.net> <41C5CE5C.9030408@amis.net> <41C5DC48.6090701@backbase.com> Message-ID: <41C5DF20.8050003@amis.net> Hi! Exactly what you said. I want to add a