From dstoltz at shh.org Fri Jan 2 13:12:40 2004 From: dstoltz at shh.org (Dave Stoltz) Date: Fri, 2 Jan 2004 14:12:40 -0500 Subject: [Javascript] ARGH! Help with Dates! Message-ID: <20040102191233.832CD30A7B3@LaTech.edu> I am trying desperately to get the date in Javascript in EXACTLY this format: 1/4/2004 5:45 PM This seems painfully difficult....I have the following 2 functions working, except the month comes back as 0 all the time. If the dropdown box called "Priority" is "Normal", I want to add 2 days to the current date/time, and if Priority is "Emergency" I want to add 1 day to the current date/time. Here are my functions, why is the month coming back as 0 !!!!??? Thanks for any help! -------------- next part -------------- An HTML attachment was scrubbed... URL: From dstoltz at shh.org Fri Jan 2 13:47:51 2004 From: dstoltz at shh.org (Dave Stoltz) Date: Fri, 02 Jan 2004 19:47:51 -0000 Subject: [Javascript] ARGH! Help with Dates! In-Reply-To: <002301c3d170$e155ba20$2c041cac@PROCERGS.REDERS> Message-ID: <20040102194749.ED73530A50B@LaTech.edu> Thanks - then actually I just need to add 1 do the month, then my code works... THANK YOU! _____ From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of allard schripsema Sent: Friday, January 02, 2004 3:42 PM To: [JavaScript List] Subject: Re: [Javascript] ARGH! Help with Dates! Hi, this line makes the trouble: cDate = new Date(myDate.getTime() + days*24*60*60*1000); try this: function addDays(myDate,days) { days=days*24*60*60*1000 cDate = new Date(myDate.getTime() + days); dy = cDate.getDate(); mn = cDate.getMonth(); y = cDate.getYear(); h = cDate.getHours(); m = cDate.getMinutes(); s = cDate.getSeconds(); nDate = mn + "/" + dy + "/" + y + " " + h + ":" + m + ":" + s; return nDate; } must be a js-bug, i can?t see why it didn?t work with your code Be aware that January is month 0 ! ----- Original Message ----- From: Dave Stoltz To: '[JavaScript List]' Sent: Friday, January 02, 2004 4:12 PM Subject: [Javascript] ARGH! Help with Dates! I am trying desperately to get the date in Javascript in EXACTLY this format: 1/4/2004 5:45 PM This seems painfully difficult....I have the following 2 functions working, except the month comes back as 0 all the time. If the dropdown box called "Priority" is "Normal", I want to add 2 days to the current date/time, and if Priority is "Emergency" I want to add 1 day to the current date/time. Here are my functions, why is the month coming back as 0 !!!!??? Thanks for any help! _____ _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript -------------- next part -------------- An HTML attachment was scrubbed... URL: From hassan at webtuitive.com Fri Jan 2 13:59:43 2004 From: hassan at webtuitive.com (Hassan Schroeder) Date: Fri, 02 Jan 2004 11:59:43 -0800 Subject: [Javascript] ARGH! Help with Dates! In-Reply-To: <20040102194749.ED73530A50B@LaTech.edu> References: <20040102194749.ED73530A50B@LaTech.edu> Message-ID: <3FF5CDAF.6010906@webtuitive.com> Dave Stoltz wrote: > Thanks - then actually I just need to add 1 do the month, then my code > works... Uh, well, not quite -- if you really want > EXACTLY this format: 1/4/2004 5:45 PM you'll need to change this > y = cDate.getYear(); to y = cDate.getFullYear(); Otherwise you'll get 1/4/104 in Netscape/Mozilla :-) FWIW! -- Hassan Schroeder ----------------------------- hassan at webtuitive.com Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. From dstoltz at shh.org Fri Jan 2 14:29:16 2004 From: dstoltz at shh.org (Dave Stoltz) Date: Fri, 2 Jan 2004 15:29:16 -0500 Subject: [Javascript] ARGH! Help with Dates! In-Reply-To: <3FF5CDAF.6010906@webtuitive.com> Message-ID: <20040102202910.CF00C308DA0@LaTech.edu> Wow - thanks for that tip! -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of Hassan Schroeder Sent: Friday, January 02, 2004 3:00 PM To: [JavaScript List] Subject: Re: [Javascript] ARGH! Help with Dates! Dave Stoltz wrote: > Thanks - then actually I just need to add 1 do the month, then my code > works... Uh, well, not quite -- if you really want > EXACTLY this format: 1/4/2004 5:45 PM you'll need to change this > y = cDate.getYear(); to y = cDate.getFullYear(); Otherwise you'll get 1/4/104 in Netscape/Mozilla :-) FWIW! -- Hassan Schroeder ----------------------------- hassan at webtuitive.com Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From allard-schripsema at procergs.rs.gov.br Fri Jan 2 14:42:03 2004 From: allard-schripsema at procergs.rs.gov.br (allard schripsema) Date: Fri, 2 Jan 2004 17:42:03 -0300 Subject: [Javascript] ARGH! Help with Dates! References: <20040102191233.832CD30A7B3@LaTech.edu> Message-ID: <002301c3d170$e155ba20$2c041cac@PROCERGS.REDERS> Hi, this line makes the trouble: cDate = new Date(myDate.getTime() + days*24*60*60*1000); try this: function addDays(myDate,days) { days=days*24*60*60*1000 cDate = new Date(myDate.getTime() + days); dy = cDate.getDate(); mn = cDate.getMonth(); y = cDate.getYear(); h = cDate.getHours(); m = cDate.getMinutes(); s = cDate.getSeconds(); nDate = mn + "/" + dy + "/" + y + " " + h + ":" + m + ":" + s; return nDate; } must be a js-bug, i can?t see why it didn?t work with your code Be aware that January is month 0 ! ----- Original Message ----- From: Dave Stoltz To: '[JavaScript List]' Sent: Friday, January 02, 2004 4:12 PM Subject: [Javascript] ARGH! Help with Dates! I am trying desperately to get the date in Javascript in EXACTLY this format: 1/4/2004 5:45 PM This seems painfully difficult....I have the following 2 functions working, except the month comes back as 0 all the time. If the dropdown box called "Priority" is "Normal", I want to add 2 days to the current date/time, and if Priority is "Emergency" I want to add 1 day to the current date/time. Here are my functions, why is the month coming back as 0 !!!!??? Thanks for any help! ------------------------------------------------------------------------------ _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript -------------- next part -------------- An HTML attachment was scrubbed... URL: From jsWalter at torres.ws Fri Jan 2 20:23:25 2004 From: jsWalter at torres.ws (jsWalter) Date: Fri, 2 Jan 2004 20:23:25 -0600 Subject: [Javascript] ARGH! Help with Dates! In-Reply-To: <20040102191233.832CD30A7B3@LaTech.edu> Message-ID: web.torres.ws./dev/javascript I have a pretty complete DATE Class Object there. Take it, play with it. See if it helps. Walter -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu]On Behalf Of Dave Stoltz Sent: Friday, January 02, 2004 1:13 PM To: '[JavaScript List]' Subject: [Javascript] ARGH! Help with Dates! I am trying desperately to get the date in Javascript in EXACTLY this format: 1/4/2004 5:45 PM This seems painfully difficult....I have the following 2 functions working, except the month comes back as 0 all the time. If the dropdown box called "Priority" is "Normal", I want to add 2 days to the current date/time, and if Priority is "Emergency" I want to add 1 day to the current date/time. Here are my functions, why is the month coming back as 0 !!!!??? Thanks for any help! -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan at mathjunkies.com Tue Jan 6 11:00:07 2004 From: dan at mathjunkies.com (Dan Anderson) Date: Tue, 06 Jan 2004 12:00:07 -0500 Subject: [Javascript] turning on scrollbars Message-ID: <1073408406.4052.8.camel@syr-24-58-10-27.twcny.rr.com> Is there a way in javascript to turn on and off a scrollbar in a document after its been loaded? Thanks in advance, Dan From hassan at webtuitive.com Tue Jan 6 11:51:59 2004 From: hassan at webtuitive.com (Hassan Schroeder) Date: Tue, 06 Jan 2004 09:51:59 -0800 Subject: [Javascript] turning on scrollbars In-Reply-To: <1073408406.4052.8.camel@syr-24-58-10-27.twcny.rr.com> References: <1073408406.4052.8.camel@syr-24-58-10-27.twcny.rr.com> Message-ID: <3FFAF5BF.5060105@webtuitive.com> Dan Anderson wrote: > Is there a way in javascript to turn on and off a scrollbar in a > document after its been loaded? Uh, not sure *why* you'd want to do this, since the scrollbar only appears if the page content won't fit within the viewport, but ... This works in Moz/Firebird 0.7, IE 5.5, Opera 7.22 (Win): You can also set the heights for Moz statically, as: FWIW! -- Hassan Schroeder ----------------------------- hassan at webtuitive.com Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. From peter at brunone.com Tue Jan 6 12:17:27 2004 From: peter at brunone.com (Peter Brunone) Date: Tue, 6 Jan 2004 11:17:27 -0700 Subject: [Javascript] turning on scrollbars Message-ID: <20040106181747.40E1A30A99A@LaTech.edu> FYI, sometimes the scrollbar (or, rather, the "socket" where the bar would be) shows in a script-opened window even if the content fits. Then, when the content extends below, the bar pops in and scrolling begins. Just my two cents for the "been there" account... Peter Original Message: >From: Hassan Schroeder >Dan Anderson wrote: > >> Is there a way in javascript to turn on and off a scrollbar in a >> document after its been loaded? > >Uh, not sure *why* you'd want to do this, since the scrollbar only >appears if the page content won't fit within the viewport, but ... > >This works in Moz/Firebird 0.7, IE 5.5, Opera 7.22 (Win): > > > >You can also set the heights for Moz statically, as: > > > >FWIW! >-- >Hassan Schroeder ----------------------------- hassan at webtuitive.com >Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com From dan at mathjunkies.com Tue Jan 6 12:58:53 2004 From: dan at mathjunkies.com (Dan Anderson) Date: Tue, 06 Jan 2004 13:58:53 -0500 Subject: [Javascript] turning on scrollbars In-Reply-To: <3FFAF5BF.5060105@webtuitive.com> References: <1073408406.4052.8.camel@syr-24-58-10-27.twcny.rr.com> <3FFAF5BF.5060105@webtuitive.com> Message-ID: <1073415532.4043.11.camel@syr-24-58-10-27.twcny.rr.com> On Tue, 2004-01-06 at 12:51, Hassan Schroeder wrote: > Dan Anderson wrote: > > > Is there a way in javascript to turn on and off a scrollbar in a > > document after its been loaded? > > Uh, not sure *why* you'd want to do this, since the scrollbar only > appears if the page content won't fit within the viewport, but ... I have a page that, for whatever reason, renders without scroll bars. It's pretty annoying because it's about 1200px long. Thanks for your help, Dan From christ at saeweb.com Tue Jan 6 13:06:07 2004 From: christ at saeweb.com (Chris Tifer) Date: Tue, 6 Jan 2004 14:06:07 -0500 Subject: [Javascript] turning on scrollbars References: <1073408406.4052.8.camel@syr-24-58-10-27.twcny.rr.com><3FFAF5BF.5060105@webtuitive.com> <1073415532.4043.11.camel@syr-24-58-10-27.twcny.rr.com> Message-ID: <002701c3d488$239194d0$df0110ac@saweb.lcl> Is this a pop-up? Is there an attribute in the body that prohibiting scrollbars? ----- Original Message ----- From: "Dan Anderson" To: "[JavaScript List]" Sent: Tuesday, January 06, 2004 1:58 PM Subject: Re: [Javascript] turning on scrollbars > On Tue, 2004-01-06 at 12:51, Hassan Schroeder wrote: > > Dan Anderson wrote: > > > > > Is there a way in javascript to turn on and off a scrollbar in a > > > document after its been loaded? > > > > Uh, not sure *why* you'd want to do this, since the scrollbar only > > appears if the page content won't fit within the viewport, but ... > > I have a page that, for whatever reason, renders without scroll bars. > It's pretty annoying because it's about 1200px long. > > Thanks for your help, > > Dan > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript From hassan at webtuitive.com Tue Jan 6 13:07:18 2004 From: hassan at webtuitive.com (Hassan Schroeder) Date: Tue, 06 Jan 2004 11:07:18 -0800 Subject: [Javascript] turning on scrollbars In-Reply-To: <1073415532.4043.11.camel@syr-24-58-10-27.twcny.rr.com> References: <1073408406.4052.8.camel@syr-24-58-10-27.twcny.rr.com> <3FFAF5BF.5060105@webtuitive.com> <1073415532.4043.11.camel@syr-24-58-10-27.twcny.rr.com> Message-ID: <3FFB0766.9080203@webtuitive.com> Dan Anderson wrote: > I have a page that, for whatever reason, renders without scroll bars. > It's pretty annoying because it's about 1200px long. Ah, well that's a whole other kettle of fish :-) URL? or repeatable test case? -- Hassan Schroeder ----------------------------- hassan at webtuitive.com Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. From javascriptlist at dandemutande.org Tue Jan 6 13:21:49 2004 From: javascriptlist at dandemutande.org (Paul Novitski) Date: Tue, 06 Jan 2004 11:21:49 -0800 Subject: [Javascript] turning on scrollbars In-Reply-To: <1073415532.4043.11.camel@syr-24-58-10-27.twcny.rr.com> References: <1073408406.4052.8.camel@syr-24-58-10-27.twcny.rr.com> <3FFAF5BF.5060105@webtuitive.com> <1073415532.4043.11.camel@syr-24-58-10-27.twcny.rr.com> Message-ID: <6.0.1.1.2.20040106110632.01c40410@spamarrest.com> And then, in appropriate circumstances, you could create a new browser window with no scrollbars: window.open('child.html', 'child', 'scrollbars=no'); Paul From trojani2000 at hotmail.com Tue Jan 6 19:56:54 2004 From: trojani2000 at hotmail.com (BEKIM BACAJ) Date: Wed, 07 Jan 2004 02:56:54 +0100 Subject: [Javascript] turning on scrollbars Message-ID: Is it posible that somewhere in the css you have a disabled scrollbars.if your document css and js are separately stored in some folder for quick solution Try: document.body.scroll='auto'/'yes' "yes" will force the scrollbars to show even if not needed,(they will apear grayed in this case). But the problem might bee a lot more stranger, if this does not solve the problem. Send some feedback, the problem might be caused by absolutely positioning on wrong elements etc you have defined some element of the page as absolutely positioned; body tag not closed properly; may happen that you've defined the body of the doc as absolutely positioned and has dimensions height greater than doc body, your text is inside some table with one parameter not correctly defined etc. >From: Dan Anderson >Reply-To: "[JavaScript List]" >To: "[JavaScript List]" >Subject: Re: [Javascript] turning on scrollbars >Date: Tue, 06 Jan 2004 13:58:53 -0500 > >On Tue, 2004-01-06 at 12:51, Hassan Schroeder wrote: > > Dan Anderson wrote: > > > > > Is there a way in javascript to turn on and off a scrollbar in a > > > document after its been loaded? > > > > Uh, not sure *why* you'd want to do this, since the scrollbar only > > appears if the page content won't fit within the viewport, but ... > >I have a page that, for whatever reason, renders without scroll bars. >It's pretty annoying because it's about 1200px long. > >Thanks for your help, > >Dan > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus From Igor at playmidia.com.br Wed Jan 7 11:19:47 2004 From: Igor at playmidia.com.br (Igor Schivinatto Pires) Date: Wed, 7 Jan 2004 14:19:47 -0300 Subject: [Javascript] How to Create Button to active print in preview mode ?? References: Message-ID: <00ca01c3d542$737c4e30$010a0a0a@playmidia.local> Hello, i need a code to view in preview mode when i click. tanks. Igor From dev at qroute.net Fri Jan 9 19:58:59 2004 From: dev at qroute.net (DEV) Date: Fri, 9 Jan 2004 17:58:59 -0800 Subject: [Javascript] checked values of the radio and checkbox items References: <6.0.1.1.2.20031227150910.01d4d3f0@spamarrest.com> <00c201c3cd25$216a3b40$e4dafea9@b4n9p2> Message-ID: <000d01c3d71d$5053abb0$0efd7b41@mustafa> On Form submit time, how do you report the checked values of the radio and checkbox items ? As you know this is a one liner when it comes to a select box. var Country=window.document.forms[0].Country.options[window.document.forms[0].Co untry.selectedIndex].value From dev at qroute.net Mon Jan 12 14:11:36 2004 From: dev at qroute.net (DEV) Date: Mon, 12 Jan 2004 12:11:36 -0800 Subject: [Javascript] Creating form object properties on the fly References: <6.0.1.1.2.20031227150910.01d4d3f0@spamarrest.com><00c201c3cd25$216a3b40$e4dafea9@b4n9p2> <000d01c3d71d$5053abb0$0efd7b41@mustafa> Message-ID: <011b01c3d948$47f18870$0efd7b41@mustafa> I understand that form objects can be tagged by creating properties that can be created on the fly such as onSubmit="this.FirstName.optional=true;this.Age.min=13;this.Age.max=75 and so on. I have notived thart when setting these properties such as this.Age.min=13 everything is fine as long as the value is not a string. For example I cannot say something like this.Zip.regexp="ZIP" That creates an error. Is there a way to trick so that I can assign strings to them as well. I am writing a script that goers through all the form objects onSubmit time to apply on the fly validation. I cannot pass thru this limitation. From christ at saeweb.com Mon Jan 12 14:20:06 2004 From: christ at saeweb.com (Chris Tifer) Date: Mon, 12 Jan 2004 15:20:06 -0500 Subject: [Javascript] Creating form object properties on the fly References: <6.0.1.1.2.20031227150910.01d4d3f0@spamarrest.com><00c201c3cd25$216a3b40$e4dafea9@b4n9p2><000d01c3d71d$5053abb0$0efd7b41@mustafa> <011b01c3d948$47f18870$0efd7b41@mustafa> Message-ID: <04b601c3d949$781de150$df0110ac@saweb.lcl> Well, I'm a little confused by your question, but one thing stands out to me. If your onSubmit is like this: onSubmit="this.FirstName="test"", then that would obviously error out since you can't have the "" nested inside of another "". What if you tried something like: onSubmit="this.FirstName='test'" Also, wouldn't this require creating your own objects as it will tell you that property doesn't exist? Chris Tifer http://emailajoke.com ----- Original Message ----- From: "DEV" To: "[JavaScript List]" Sent: Monday, January 12, 2004 3:11 PM Subject: [Javascript] Creating form object properties on the fly > I understand that form objects can be tagged by creating properties that can > be created on the fly such as > > onSubmit="this.FirstName.optional=true;this.Age.min=13;this.Age.max=75 and > so on. > > I have notived thart when setting these properties such as this.Age.min=13 > everything is fine as long as the value is not a string. > > For example I cannot say something like > this.Zip.regexp="ZIP" > > That creates an error. > > Is there a way to trick so that I can assign strings to them as well. > > I am writing a script that goers through all the form objects onSubmit time > to apply on the fly validation. I cannot pass thru this limitation. > > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript From dev at qroute.net Mon Jan 12 14:56:26 2004 From: dev at qroute.net (DEV) Date: Mon, 12 Jan 2004 12:56:26 -0800 Subject: [Javascript] Creating form object properties on the fly References: <6.0.1.1.2.20031227150910.01d4d3f0@spamarrest.com><00c201c3cd25$216a3b40$e4dafea9@b4n9p2><000d01c3d71d$5053abb0$0efd7b41@mustafa><011b01c3d948$47f18870$0efd7b41@mustafa> <04b601c3d949$781de150$df0110ac@saweb.lcl> Message-ID: <01cd01c3d94e$8b5adc50$0efd7b41@mustafa> As far as the quotes, you are right. But I just overlooked it when I was typing it fast. Main question is still remains the same. >> > Also, wouldn't this require creating your own objects as it will tell you > that property doesn't exist? No. Juat try it and see it for your self. You will not get any error. And that is a HELL of a feature that I did not know that until yesterday. ----- Original Message ----- From: "Chris Tifer" To: "[JavaScript List]" Sent: Monday, January 12, 2004 12:20 PM Subject: Re: [Javascript] Creating form object properties on the fly > Well, I'm a little confused by your question, but one thing stands out to > me. > > If your onSubmit is like this: > > onSubmit="this.FirstName="test"", then that would obviously error out since > you can't have the "" nested inside of another "". > > What if you tried something like: > > onSubmit="this.FirstName='test'" > > Also, wouldn't this require creating your own objects as it will tell you > that property doesn't exist? > > Chris Tifer > http://emailajoke.com > > ----- Original Message ----- > From: "DEV" > To: "[JavaScript List]" > Sent: Monday, January 12, 2004 3:11 PM > Subject: [Javascript] Creating form object properties on the fly > > > > I understand that form objects can be tagged by creating properties that > can > > be created on the fly such as > > > > onSubmit="this.FirstName.optional=true;this.Age.min=13;this.Age.max=75 and > > so on. > > > > I have notived thart when setting these properties such as this.Age.min=13 > > everything is fine as long as the value is not a string. > > > > For example I cannot say something like > > this.Zip.regexp="ZIP" > > > > That creates an error. > > > > Is there a way to trick so that I can assign strings to them as well. > > > > I am writing a script that goers through all the form objects onSubmit > time > > to apply on the fly validation. I cannot pass thru this limitation. > > > > > > _______________________________________________ > > 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 dev at qroute.net Mon Jan 12 15:35:00 2004 From: dev at qroute.net (DEV) Date: Mon, 12 Jan 2004 13:35:00 -0800 Subject: [Javascript] regexp usage References: <6.0.1.1.2.20031227150910.01d4d3f0@spamarrest.com><00c201c3cd25$216a3b40$e4dafea9@b4n9p2><000d01c3d71d$5053abb0$0efd7b41@mustafa><011b01c3d948$47f18870$0efd7b41@mustafa><04b601c3d949$781de150$df0110ac@saweb.lcl> <01cd01c3d94e$8b5adc50$0efd7b41@mustafa> Message-ID: <01e801c3d953$ee8878a0$0efd7b41@mustafa> I have found this regexp to validate email; ^[\w-]+(?:\.[\w-]+)*@(?:[\w-]+\.)+[a-zA-Z]{2,7}$ How can I use this in a true|false returning function say named isEmail. I'd like it to be run like this. if ( !isEmail(window.document.Email.value) ) { alert('Your email does not seem right') return false; } function isEmail(input) { // ^[\w-]+(?:\.[\w-]+)*@(?:[\w-]+\.)+[a-zA-Z]{2,7}$ } From costea.dan at ssi-schaefer.ro Mon Jan 12 23:50:57 2004 From: costea.dan at ssi-schaefer.ro (Dan Costea) Date: Tue, 13 Jan 2004 07:50:57 +0200 Subject: [Javascript] regexp usage References: <6.0.1.1.2.20031227150910.01d4d3f0@spamarrest.com><00c201c3cd25$216a3b40$e4dafea9@b4n9p2><000d01c3d71d$5053abb0$0efd7b41@mustafa><011b01c3d948$47f18870$0efd7b41@mustafa><04b601c3d949$781de150$df0110ac@saweb.lcl><01cd01c3d94e$8b5adc50$0efd7b41@mustafa> <01e801c3d953$ee8878a0$0efd7b41@mustafa> Message-ID: <001101c3d999$3731cc60$addea8c0@pcdco> Hi, Your function should be like this: function isEmail (p_sEmail) { var regEmail = /^[\w-]+(?:\.[\w-]+)*@(?:[\w-]+\.)+[a-zA-Z]{2,7}$/; return regEmail.test (p_sEmail); } ----- Original Message ----- From: "DEV" To: "[JavaScript List]" Sent: Monday, January 12, 2004 11:35 PM Subject: [Javascript] regexp usage > I have found this regexp to validate email; > > ^[\w-]+(?:\.[\w-]+)*@(?:[\w-]+\.)+[a-zA-Z]{2,7}$ > > How can I use this in a true|false returning function say named isEmail. > > I'd like it to be run like this. > > if ( !isEmail(window.document.Email.value) ) > { > alert('Your email does not seem right') > return false; > } > > > function isEmail(input) > { > // ^[\w-]+(?:\.[\w-]+)*@(?:[\w-]+\.)+[a-zA-Z]{2,7}$ > } > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript From Luciano.Silva at tco.net.br Tue Jan 13 11:46:39 2004 From: Luciano.Silva at tco.net.br (Luciano Fernandes da Silva) Date: Tue, 13 Jan 2004 15:46:39 -0200 Subject: [Javascript] RES: Javascript Digest, Vol 11, Issue 4 Message-ID: <31AECFF68367E24BBA0157AD92D3C4CA1D884C@dfcelarqscs01.tco.net.br> Before all, sorry my very very bad english! Unfortunately, I don?t get together any propertie that acess directly a checked element item. So, it's needed iterate through array, until find the checked element and return your value. Some like this: /** * parameter: the array of the radio or checkbox * return: the value of the checked item * example of use: var Country = foo(window.document.forms[0].Country); */ function foo(theObjArr) { for(var i = 0; i < theObjArr.length; i++) { if(theArrObj[i].checked) { return theArrObj[i].value; } } return ""; } /* end */ I wait help you. See you later! -----Mensagem original----- De: javascript-request at LaTech.edu [mailto:javascript-request at LaTech.edu] Enviada em: s?bado, 10 de janeiro de 2004 16:00 Para: javascript at LaTech.edu Assunto: Javascript Digest, Vol 11, Issue 4 Send Javascript mailing list submissions to javascript at LaTech.edu To subscribe or unsubscribe via the World Wide Web, visit https://lists.LaTech.edu/mailman/listinfo/javascript or, via email, send a message with subject or body 'help' to javascript-request at LaTech.edu You can reach the person managing the list at javascript-owner at LaTech.edu When replying, please edit your Subject line so it is more specific than "Re: Contents of Javascript digest..." Today's Topics: 1. checked values of the radio and checkbox items (DEV) ---------------------------------------------------------------------- Message: 1 Date: Fri, 9 Jan 2004 17:58:59 -0800 From: "DEV" Subject: [Javascript] checked values of the radio and checkbox items To: "[JavaScript List]" Message-ID: <000d01c3d71d$5053abb0$0efd7b41 at mustafa> Content-Type: text/plain; charset="iso-8859-1" On Form submit time, how do you report the checked values of the radio and checkbox items ? As you know this is a one liner when it comes to a select box. var Country=window.document.forms[0].Country.options[window.document.forms[0].Co untry.selectedIndex].value ------------------------------ _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript End of Javascript Digest, Vol 11, Issue 4 ***************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From hakan at backbase.com Wed Jan 14 08:08:20 2004 From: hakan at backbase.com (Hakan M.) Date: Wed, 14 Jan 2004 15:08:20 +0100 Subject: [Javascript] Dynamically adding script tags, IE. Message-ID: <40054D54.1080704@backbase.com> Cheers. I'm having a problem with dynamic loading of scripts. We have to do it a bit ugly, using document.body.innerHTML to add strings containing ''. There is a working solution (running over a list of sources and assigning the source to an existing script tag) but we can't use that. The problem is that IE doesn't execute/parse the tag (or rather, the file in the src attribute) when we write it to the body using innerHTML. HOWEVER, if we add '' to the strings we pass to innerHTML, the alert gets fired AND the other scripts suddenly gets loaded and parsed. It seems like throwing an (inline) alert makes IE understand that it's supposed to parse the sources of the script tags, without this alert (I've tried writing to the statusbar, creating something, running a function - only alert does the trick) nothing happens. Naturally, we've been experimenting with the DEFER attribute, but it makes no difference. Also, if that would be the case, I can't see how an alert (and NO OTHER CODE WHATSOEVER) should "fix" it. Anybody with hardcore insight in why IE behave this way? Thanks, Hakan From liorean at f2o.org Wed Jan 14 10:52:25 2004 From: liorean at f2o.org (liorean) Date: Wed, 14 Jan 2004 17:52:25 +0100 Subject: [Javascript] Dynamically adding script tags, IE. In-Reply-To: <40054D54.1080704@backbase.com> References: <40054D54.1080704@backbase.com> Message-ID: <400573C9.3090605@f2o.org> Hakan M. wrote: > Cheers. > I'm having a problem with dynamic loading of scripts. We have to do it a > bit ugly, using document.body.innerHTML to add strings containing > ''. There is a > working solution (running over a list of sources and assigning the > source to an existing script tag) but we can't use that. There's another solution. Have a look at , which is the method I use in my bookmarklets to load external JavaScripts. In iem you'll ahve to write the source of the script tag to an element. In iew you can create one dynamically using the DOM. > Anybody with hardcore insight in why IE behave this way? No, not into this, I'm afraid. Dynamic reparsing is something all browsers have been earlier or are currently bad at. Even Mozilla. -- liorean ViewStyles, ViewScripts, ToggleStyles and GraphicsInfo bookmarklets and Theme Switcher, Cookies Handler scripts: From richf at ukonline.co.uk Wed Jan 14 14:38:12 2004 From: richf at ukonline.co.uk (richf at ukonline.co.uk) Date: Wed, 14 Jan 2004 20:38:12 +0000 Subject: [Javascript] Validating a radio button Message-ID: <1074112692.4005a8b4ba8f1@webmail.ukonline.net> Hi all, I use this script to error check some drop down boxes which works fine e.g. modefrom. But how can I use the same syntax for the radio buttons I have e.g. carshare ? None of the following bits for the radio button carshare work ! Thanks in advance for any help. Richard ---------------------------------------------- This mail sent through http://www.ukonline.net From christ at saeweb.com Wed Jan 14 15:58:58 2004 From: christ at saeweb.com (Chris Tifer) Date: Wed, 14 Jan 2004 16:58:58 -0500 Subject: [Javascript] Validating a radio button References: <1074112692.4005a8b4ba8f1@webmail.ukonline.net> Message-ID: <01f101c3dae9$9ca39ff0$df0110ac@saweb.lcl> Remember, radio buttons are collections (or arrays) of elements so you need to loop through each possible choice to see if it's checked. Chris Tifer http://emailajoke.com ----- Original Message ----- From: To: Sent: Wednesday, January 14, 2004 3:38 PM Subject: [Javascript] Validating a radio button Hi all, I use this script to error check some drop down boxes which works fine e.g. modefrom. But how can I use the same syntax for the radio buttons I have e.g. carshare ? None of the following bits for the radio button carshare work ! Thanks in advance for any help. Richard ---------------------------------------------- This mail sent through http://www.ukonline.net _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From hakan at backbase.com Thu Jan 15 03:29:03 2004 From: hakan at backbase.com (Hakan M.) Date: Thu, 15 Jan 2004 10:29:03 +0100 Subject: [Javascript] Validating a radio button In-Reply-To: <01f101c3dae9$9ca39ff0$df0110ac@saweb.lcl> References: <1074112692.4005a8b4ba8f1@webmail.ukonline.net> <01f101c3dae9$9ca39ff0$df0110ac@saweb.lcl> Message-ID: <40065D5F.5090600@backbase.com> This should work. for(i=0; i Remember, radio buttons are collections (or arrays) of elements so you need > to loop through each possible choice to see if it's checked. > > Chris Tifer > http://emailajoke.com > > ----- Original Message ----- > From: > To: > Sent: Wednesday, January 14, 2004 3:38 PM > Subject: [Javascript] Validating a radio button > > > Hi all, > > I use this script to error check some drop down boxes which works fine e.g. > modefrom. But how can I use the same syntax for the radio buttons I have > e.g. > carshare ? None of the following bits for the radio button carshare work ! > > Thanks in advance for any help. > > Richard > > > > ---------------------------------------------- > This mail sent through http://www.ukonline.net > _______________________________________________ > 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 sebastian.lahajnar at pris-inz.si Fri Jan 16 03:14:06 2004 From: sebastian.lahajnar at pris-inz.si (sebastian) Date: Fri, 16 Jan 2004 10:14:06 +0100 Subject: [Javascript] locking contents Message-ID: Hi. I have to prevent that users who browse my HTML pages can do: - select and copy the contents - print the contents - save the html page - edit source Bassically they can only view the contents. Is anything od this possible? The content of a page is a set of exam questions that should't be copied, printed ecc. I know that there's always printscreen... Thanks. Sebastian From javascript at mattbarton.org Fri Jan 16 03:43:43 2004 From: javascript at mattbarton.org (Matt Barton) Date: Fri, 16 Jan 2004 09:43:43 -0000 Subject: [Javascript] locking contents Message-ID: <20040116094339.mattski@plus.net> Hi, I'm not sure that there's anyway you can do this. You could take all kind of measures to try it, such as forcing the page to open in a new browser window with no menu or toolbar and using the onContextMenu event to disable the right click View Source option. You could also use the onSelectStart (and associated events) to disable the selection of text to avoid copy & paste. But even with all of that any visitors using a Windows OS (and doubtless others) will be able to hit the 'Print Screen' keyboard button and paste the resulting image into a image editor and print it from there - you can have no control over that with a scripting language in a browser. Matt >Hi. > >I have to prevent that users who browse my HTML pages can do: >- select and copy the contents >- print the contents >- save the html page >- edit source > >Bassically they can only view the contents. >Is anything od this possible? >The content of a page is a set of exam questions that should't be copied, >printed ecc. I know that there's always printscreen... > >Thanks. > >Sebastian > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript > >-- >This email has been verified as Virus free >Virus Protection and more available at http://www.plus.net > From mdougherty at pbp.com Fri Jan 16 08:03:26 2004 From: mdougherty at pbp.com (Mike Dougherty) Date: Fri, 16 Jan 2004 09:03:26 -0500 Subject: [Javascript] locking contents In-Reply-To: Message-ID: I would suggest that if you really need that kind of security/control over this content, just don't post it on the internet. On Fri, 16 Jan 2004 10:14:06 +0100 "sebastian" wrote: >Hi. > >I have to prevent that users who browse my HTML pages can do: >- select and copy the contents >- print the contents >- save the html page >- edit source > >Bassically they can only view the contents. >Is anything od this possible? >The content of a page is a set of exam questions that should't be copied, >printed ecc. I know that there's always printscreen... > >Thanks. > >Sebastian > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript From christ at saeweb.com Fri Jan 16 08:08:25 2004 From: christ at saeweb.com (Chris Tifer) Date: Fri, 16 Jan 2004 09:08:25 -0500 Subject: [Javascript] locking contents References: <20040116094339.mattski@plus.net> Message-ID: <015801c3dc3a$358ec9f0$df0110ac@saweb.lcl> And on top of that, all a user will have to do is disable their JS. The web is not a good medium for distributing stuff that needs to be used for private eyes only. What is it you're trying to do Sebastian. Perhaps we can come up with some alternative (although I don't see how) Chris Tifer ----- Original Message ----- From: "Matt Barton" To: Sent: Friday, January 16, 2004 4:43 AM Subject: RE: [Javascript] locking contents > Hi, > > I'm not sure that there's anyway you can do this. You could take all kind > of measures to try it, such as forcing the page to open in a new browser > window with no menu or toolbar and using the onContextMenu event to > disable the right click View Source option. You could also use the > onSelectStart (and associated events) to disable the selection of text to > avoid copy & paste. > > But even with all of that any visitors using a Windows OS (and doubtless > others) will be able to hit the 'Print Screen' keyboard button and paste > the resulting image into a image editor and print it from there - you can > have no control over that with a scripting language in a browser. > > Matt > > >Hi. > > > >I have to prevent that users who browse my HTML pages can do: > >- select and copy the contents > >- print the contents > >- save the html page > >- edit source > > > >Bassically they can only view the contents. > >Is anything od this possible? > >The content of a page is a set of exam questions that should't be copied, > >printed ecc. I know that there's always printscreen... > > > >Thanks. > > > >Sebastian > > > >_______________________________________________ > >Javascript mailing list > >Javascript at LaTech.edu > >https://lists.LaTech.edu/mailman/listinfo/javascript > > > >-- > >This email has been verified as Virus free > >Virus Protection and more available at http://www.plus.net > > > > > ---------------------------------------------------------------------------- ---- > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > From sebastian.lahajnar at pris-inz.si Fri Jan 16 08:17:51 2004 From: sebastian.lahajnar at pris-inz.si (sebastian) Date: Fri, 16 Jan 2004 15:17:51 +0100 Subject: [Javascript] locking contents In-Reply-To: Message-ID: haha. Good suggestion I will forward it to my boss. -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu]On Behalf Of Mike Dougherty Sent: Friday, January 16, 2004 3:03 PM To: [JavaScript List] Subject: Re: [Javascript] locking contents I would suggest that if you really need that kind of security/control over this content, just don't post it on the internet. On Fri, 16 Jan 2004 10:14:06 +0100 "sebastian" wrote: >Hi. > >I have to prevent that users who browse my HTML pages can do: >- select and copy the contents >- print the contents >- save the html page >- edit source > >Bassically they can only view the contents. >Is anything od this possible? >The content of a page is a set of exam questions that should't be copied, >printed ecc. I know that there's always printscreen... > >Thanks. > >Sebastian > >_______________________________________________ >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 spindrift at oceanfree.net Fri Jan 16 09:22:38 2004 From: spindrift at oceanfree.net (Tim Makins) Date: Fri, 16 Jan 2004 15:22:38 -0000 Subject: [Javascript] locking contents References: Message-ID: <001201c3dc44$9b484f00$e4dafea9@b4n9p2> Have you looked into using pdf files ? I think they can be locked in different ways. Tim in Ireland. ----- Original Message ----- From: "sebastian" To: "[JavaScript List]" Sent: Friday, January 16, 2004 2:17 PM Subject: RE: [Javascript] locking contents > >I have to prevent that users who browse my HTML pages can do: > >- select and copy the contents > >- print the contents > >- save the html page > >- edit source > > > >Bassically they can only view the contents. > >Is anything od this possible? > >The content of a page is a set of exam questions that should't be copied, > >printed ecc. I know that there's always printscreen... > > > >Thanks. > > > >Sebastian From trojani2000 at hotmail.com Fri Jan 16 10:48:29 2004 From: trojani2000 at hotmail.com (BEKIM BACAJ) Date: Fri, 16 Jan 2004 17:48:29 +0100 Subject: [Javascript] locking contents Message-ID: Has anybody ever used web-page dialog for this matter? I think it will do good protection to the material you wish to be wiewed only. And sorry, where can I find the copies I've done with print screen cmnd while working on windows env? >From: "Tim Makins" >Reply-To: "[JavaScript List]" >To: "[JavaScript List]" >Subject: Re: [Javascript] locking contents >Date: Fri, 16 Jan 2004 15:22:38 -0000 > >Have you looked into using pdf files ? I think they can be locked in >different ways. > >Tim in Ireland. > >----- Original Message ----- >From: "sebastian" >To: "[JavaScript List]" >Sent: Friday, January 16, 2004 2:17 PM >Subject: RE: [Javascript] locking contents > > > >I have to prevent that users who browse my HTML pages can do: > > >- select and copy the contents > > >- print the contents > > >- save the html page > > >- edit source > > > > > >Bassically they can only view the contents. > > >Is anything od this possible? > > >The content of a page is a set of exam questions that should't be >copied, > > >printed ecc. I know that there's always printscreen... > > > > > >Thanks. > > > > > >Sebastian > > > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail From javascriptlist at dandemutande.org Fri Jan 16 11:29:06 2004 From: javascriptlist at dandemutande.org (Paul Novitski) Date: Fri, 16 Jan 2004 09:29:06 -0800 Subject: [Javascript] locking contents In-Reply-To: References: Message-ID: <6.0.1.1.2.20040116091128.033d0090@spamarrest.com> Bekim Bacaj: After pressing the Print Screen key, the screen image is held in the clipboard. Open a new file in Paint or Photoshop or Word or another program capable of holding graphic content and paste. I'm not sure your dialog box idea would help. The text for the dialog must come from somewhere, and I think I'd find it in either the source for the page I'm on or in a linked Javascript file that I can download simply by entering its URL into my browser's address bar. Sebastian: Presenting material on a computer screen that you don't want anyone to be able to copy is almost a metaphysical conundrum. If you display text or an image or play a voice so that a human can perceive it, it can be necessarily be copied - if by nothing else than by an external recorder such as human memory, camera, pencil and paper, or audio recorder. Perhaps what you need is another approach to your security issue, such as a randomly-selected list of questions from a much larger pool, so that if copying does occur it doesn't break the system. Paul At 08:48 AM 1/16/2004, BEKIM BACAJ wrote: >Has anybody ever used web-page dialog for this matter? >I think it will do good protection to the material you wish >to be wiewed only. And sorry, where can I find the copies I've done with >print screen cmnd while working on windows env? > >>From: "Tim Makins" >>Reply-To: "[JavaScript List]" >>To: "[JavaScript List]" >>Subject: Re: [Javascript] locking contents >>Date: Fri, 16 Jan 2004 15:22:38 -0000 >> >>Have you looked into using pdf files ? I think they can be locked in >>different ways. >> >>Tim in Ireland. >> >>----- Original Message ----- >>From: "sebastian" >>To: "[JavaScript List]" >>Sent: Friday, January 16, 2004 2:17 PM >>Subject: RE: [Javascript] locking contents >> >> > >I have to prevent that users who browse my HTML pages can do: >> > >- select and copy the contents >> > >- print the contents >> > >- save the html page >> > >- edit source >> > > >> > >Bassically they can only view the contents. >> > >Is anything od this possible? >> > >The content of a page is a set of exam questions that should't be copied, >> > >printed ecc. I know that there's always printscreen... >> > > >> > >Thanks. >> > > >> > >Sebastian >> >> >> >>_______________________________________________ >>Javascript mailing list >>Javascript at LaTech.edu >>https://lists.LaTech.edu/mailman/listinfo/javascript > >_________________________________________________________________ >STOP MORE SPAM with the new MSN 8 and get 2 months FREE* >http://join.msn.com/?page=features/junkmail > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript From christ at saeweb.com Fri Jan 16 11:31:08 2004 From: christ at saeweb.com (Chris Tifer) Date: Fri, 16 Jan 2004 12:31:08 -0500 Subject: [Javascript] locking contents References: Message-ID: <005001c3dc56$87334c10$df0110ac@saweb.lcl> What do you mean by "web-page dialog"? Print screen doesn't output an image. It copies the contents into the clipboard. Then you just open your favorite editor and paste and voila, you've got a screenie. Chris Tifer ----- Original Message ----- From: "BEKIM BACAJ" To: Sent: Friday, January 16, 2004 11:48 AM Subject: Re: [Javascript] locking contents > > Has anybody ever used web-page dialog for this matter? > I think it will do good protection to the material you wish > to be wiewed only. And sorry, where can I find the copies I've done with > print screen cmnd while working on windows env? > > >From: "Tim Makins" > >Reply-To: "[JavaScript List]" > >To: "[JavaScript List]" > >Subject: Re: [Javascript] locking contents > >Date: Fri, 16 Jan 2004 15:22:38 -0000 > > > >Have you looked into using pdf files ? I think they can be locked in > >different ways. > > > >Tim in Ireland. > > > >----- Original Message ----- > >From: "sebastian" > >To: "[JavaScript List]" > >Sent: Friday, January 16, 2004 2:17 PM > >Subject: RE: [Javascript] locking contents > > > > > >I have to prevent that users who browse my HTML pages can do: > > > >- select and copy the contents > > > >- print the contents > > > >- save the html page > > > >- edit source > > > > > > > >Bassically they can only view the contents. > > > >Is anything od this possible? > > > >The content of a page is a set of exam questions that should't be > >copied, > > > >printed ecc. I know that there's always printscreen... > > > > > > > >Thanks. > > > > > > > >Sebastian > > > > > > > >_______________________________________________ > >Javascript mailing list > >Javascript at LaTech.edu > >https://lists.LaTech.edu/mailman/listinfo/javascript > > _________________________________________________________________ > STOP MORE SPAM with the new MSN 8 and get 2 months FREE* > http://join.msn.com/?page=features/junkmail > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript From davecline at onebox.com Fri Jan 16 11:38:20 2004 From: davecline at onebox.com (davecline at onebox.com) Date: Fri, 16 Jan 2004 12:38:20 -0500 Subject: [Javascript] locking contents Message-ID: Implement your exam interface in Flash or a Java or ActiveX plugin. You cannot, in anyway, block all access to your HTML. -- Dave Cline davecline at onebox.com www.bangeye.com/ -----Original Message----- From: Chris Tifer Sent: Fri, 16 Jan 2004 09:08:25 -0500 To: "[JavaScript List]" Subject: Re: [Javascript] locking contents And on top of that, all a user will have to do is disable their JS. The web is not a good medium for distributing stuff that needs to be used for private eyes only. What is it you're trying to do Sebastian. Perhaps we can come up with some alternative (although I don't see how) Chris Tifer ----- Original Message ----- From: "Matt Barton" To: Sent: Friday, January 16, 2004 4:43 AM Subject: RE: [Javascript] locking contents > Hi, > > I'm not sure that there's anyway you can do this. You could take all kind > of measures to try it, such as forcing the page to open in a new browser > window with no menu or toolbar and using the onContextMenu event to > disable the right click View Source option. You could also use the > onSelectStart (and associated events) to disable the selection of text to > avoid copy & paste. > > But even with all of that any visitors using a Windows OS (and doubtless > others) will be able to hit the 'Print Screen' keyboard button and paste > the resulting image into a image editor and print it from there - you can > have no control over that with a scripting language in a browser. > > Matt > > >Hi. > > > >I have to prevent that users who browse my HTML pages can do: > >- select and copy the contents > >- print the contents > >- save the html page > >- edit source > > > >Bassically they can only view the contents. > >Is anything od this possible? > >The content of a page is a set of exam questions that should't be copied, > >printed ecc. I know that there's always printscreen... > > > >Thanks. > > > >Sebastian > > > >_______________________________________________ > >Javascript mailing list > >Javascript at LaTech.edu > >https://lists.LaTech.edu/mailman/listinfo/javascript > > > >-- > >This email has been verified as Virus free > >Virus Protection and more available at http://www.plus.net > > > > > ---------------------------------------------------------------------------- ---- > _______________________________________________ > 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 petersim at igrin.co.nz Fri Jan 16 11:41:15 2004 From: petersim at igrin.co.nz (Peter Sim) Date: Sat, 17 Jan 2004 06:41:15 +1300 Subject: [Javascript] locking contents In-Reply-To: Message-ID: <000e01c3dc57$f44a4780$ccf631ca@peter> Sebastian I think the best you could do is to post the material as pdf files, created with security settings disabling copying (& pasting) and printing. Regards, Peter Sim Whangarei, New Zealand http://www.igrin.co.nz/petersim/ -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of sebastian Sent: Saturday, 17 January 2004 3:18 a.m. To: [JavaScript List] Subject: RE: [Javascript] locking contents haha. Good suggestion I will forward it to my boss. -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu]On Behalf Of Mike Dougherty Sent: Friday, January 16, 2004 3:03 PM To: [JavaScript List] Subject: Re: [Javascript] locking contents I would suggest that if you really need that kind of security/control over this content, just don't post it on the internet. On Fri, 16 Jan 2004 10:14:06 +0100 "sebastian" wrote: >Hi. > >I have to prevent that users who browse my HTML pages can do: >- select and copy the contents >- print the contents >- save the html page >- edit source > >Bassically they can only view the contents. >Is anything od this possible? >The content of a page is a set of exam questions that should't be copied, >printed ecc. I know that there's always printscreen... > >Thanks. > >Sebastian > >_______________________________________________ >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 bader at tcbader.com Fri Jan 16 11:53:46 2004 From: bader at tcbader.com (Terry Bader) Date: Fri, 16 Jan 2004 10:53:46 -0700 Subject: [Javascript] locking contents Message-ID: <20040116175407.686AC30A4BA@LaTech.edu> sure you can in a controlled enviroment with kiosked built stations, clean room, full body cavity searches and electroprobes attached to everyones nipples in case they try to write anything down... Original Message: Return-Path: Fri Jan 16 10:38:37 2004 >Received: from selene.latech.edu [138.47.18.25] by mail7.webcontrolcenter.com with SMTP; > Fri, 16 Jan 2004 10:38:37 -0700 >Received: from localhost (localhost [127.0.0.1]) > by LaTech.edu (Postfix) with ESMTP > id CE09530A489; Fri, 16 Jan 2004 11:38:33 -0600 (CST) >Received: from LaTech.edu ([127.0.0.1]) > by localhost (selene.latech.edu [127.0.0.1]) (amavisd-new, port 10024) > with LMTP id 02069-01-14; Fri, 16 Jan 2004 11:38:29 -0600 (CST) >Received: from selene.LaTech.edu (localhost [127.0.0.1]) > by LaTech.edu (Postfix) with ESMTP > id E746530A24E; Fri, 16 Jan 2004 11:38:27 -0600 (CST) >X-Original-To: javascript at localhost.LaTech.edu >Delivered-To: javascript at localhost.LaTech.edu >Received: from localhost (localhost [127.0.0.1]) > by LaTech.edu (Postfix) with ESMTP id 4D81030979A > for ; > Fri, 16 Jan 2004 11:38:26 -0600 (CST) >Received: from LaTech.edu ([127.0.0.1]) > by localhost (selene.latech.edu [127.0.0.1]) (amavisd-new, port 10024) > with LMTP id 96642-01-64 for ; > Fri, 16 Jan 2004 11:38:24 -0600 (CST) >Received: from vljcms13.ucmretail.internal.callsciences.com > (outgoing.callsciences.com [67.17.166.10]) > by LaTech.edu (Postfix) with ESMTP id 950C13091F6 > for ; Fri, 16 Jan 2004 11:38:23 -0600 (CST) >Received: from CallSciences (unverified [172.21.6.77]) by ucmmail.com > (Rockliffe SMTPRA 5.3.6) with SMTP id > for > ; Fri, 16 Jan 2004 12:38:24 -0500 >Message-ID: >From: davecline at onebox.com >To: javascript at LaTech.edu >Subject: RE: Re: [Javascript] locking contents >Date: Fri, 16 Jan 2004 12:38:20 -0500 >Content-Type: text/plain; charset="iso-8859-1" >X-Virus-Scanned: by amavisd-new at latech.edu >X-BeenThere: javascript at LaTech.edu >X-Mailman-Version: 2.1.2 >Precedence: list >Reply-To: "[JavaScript List]" >List-Id: [JavaScript List] >List-Help: >List-Post: >List-Subscribe: , > >List-Archive: >List-Unsubscribe: , > >Sender: javascript-bounces at LaTech.edu >Errors-To: javascript-bounces at LaTech.edu >X-Virus-Scanned: by amavisd-new at latech.edu >x-smartermail-spam: VERIFY SENDER > > > >Implement your exam interface in Flash or a Java or ActiveX plugin. > >You cannot, in anyway, block all access to your HTML. > >-- >Dave Cline >davecline at onebox.com >www.bangeye.com/ > > > > > >-----Original Message----- >From: Chris Tifer >Sent: Fri, 16 Jan 2004 09:08:25 -0500 >To: "[JavaScript List]" >Subject: Re: [Javascript] locking contents > >And on top of that, all a user will have to do is disable their JS. > >The web is not a good medium for distributing stuff that needs to be used >for private eyes only. > >What is it you're trying to do Sebastian. Perhaps we can come up with some >alternative (although I don't see how) > >Chris Tifer > >----- Original Message ----- >From: "Matt Barton" >To: >Sent: Friday, January 16, 2004 4:43 AM >Subject: RE: [Javascript] locking contents > > >> Hi, >> >> I'm not sure that there's anyway you can do this. You could take all kind >> of measures to try it, such as forcing the page to open in a new browser >> window with no menu or toolbar and using the onContextMenu event to >> disable the right click View Source option. You could also use the >> onSelectStart (and associated events) to disable the selection of text to >> avoid copy & paste. >> >> But even with all of that any visitors using a Windows OS (and doubtless >> others) will be able to hit the 'Print Screen' keyboard button and paste >> the resulting image into a image editor and print it from there - you can > >> have no control over that with a scripting language in a browser. >> >> Matt >> >> >Hi. >> > >> >I have to prevent that users who browse my HTML pages can do: >> >- select and copy the contents >> >- print the contents >> >- save the html page >> >- edit source >> > >> >Bassically they can only view the contents. >> >Is anything od this possible? >> >The content of a page is a set of exam questions that should't be copied, >> >printed ecc. I know that there's always printscreen... >> > >> >Thanks. >> > >> >Sebastian >> > >> >_______________________________________________ >> >Javascript mailing list >> >Javascript at LaTech.edu >> >https://lists.LaTech.edu/mailman/listinfo/javascript >> > >> >-- >> >This email has been verified as Virus free >> >Virus Protection and more available at http://www.plus.net >> > >> >> >> > > >---------------------------------------------------------------------------- >---- > > >> _______________________________________________ >> 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 allard-schripsema at procergs.rs.gov.br Fri Jan 16 12:56:57 2004 From: allard-schripsema at procergs.rs.gov.br (allard schripsema) Date: Fri, 16 Jan 2004 15:56:57 -0300 Subject: [Javascript] locking contents References: Message-ID: <002a01c3dc62$83d69610$2c041cac@PROCERGS.REDERS> Lets try to solve this in another way (nothing to do with javascript though :-) All computer related solutions would fall in the same screencopy or filecopy problem. You need to change the process of showing the questions, let them copy!. What?s the objective o showing the questions? Probably guiding the students study for the test, focussing their energy on what matters. Proposed action: Showing the exact questions. Problem : Copying, discussed in this thread (test would be too easy) Conclusion: We need an alternative process to focus the students energy Suggestion: Some of my teachers would give us a copy of a list of like 70 questions to take home and prepare answers. from these 70 questions, 10 would be the actual testquestions. If you?d studied all of the questions, you?d get an (almost) 100% score. The teachers goal (making you know the contents of that part of the course) was reached, 70 questions is a lot of content to memorize! ----- Original Message ----- From: To: Sent: Friday, January 16, 2004 2:38 PM Subject: RE: Re: [Javascript] locking contents > > Implement your exam interface in Flash or a Java or ActiveX plugin. > > You cannot, in anyway, block all access to your HTML. > > -- > Dave Cline > davecline at onebox.com > www.bangeye.com/ > > > > > > -----Original Message----- > From: Chris Tifer > Sent: Fri, 16 Jan 2004 09:08:25 -0500 > To: "[JavaScript List]" > Subject: Re: [Javascript] locking contents > > And on top of that, all a user will have to do is disable their JS. > > The web is not a good medium for distributing stuff that needs to be used > for private eyes only. > > What is it you're trying to do Sebastian. Perhaps we can come up with some > alternative (although I don't see how) > > Chris Tifer > > ----- Original Message ----- > From: "Matt Barton" > To: > Sent: Friday, January 16, 2004 4:43 AM > Subject: RE: [Javascript] locking contents > > > > Hi, > > > > I'm not sure that there's anyway you can do this. You could take all kind > > of measures to try it, such as forcing the page to open in a new browser > > window with no menu or toolbar and using the onContextMenu event to > > disable the right click View Source option. You could also use the > > onSelectStart (and associated events) to disable the selection of text to > > avoid copy & paste. > > > > But even with all of that any visitors using a Windows OS (and doubtless > > others) will be able to hit the 'Print Screen' keyboard button and paste > > the resulting image into a image editor and print it from there - you can > > > have no control over that with a scripting language in a browser. > > > > Matt > > > > >Hi. > > > > > >I have to prevent that users who browse my HTML pages can do: > > >- select and copy the contents > > >- print the contents > > >- save the html page > > >- edit source > > > > > >Bassically they can only view the contents. > > >Is anything od this possible? > > >The content of a page is a set of exam questions that should't be copied, > > >printed ecc. I know that there's always printscreen... > > > > > >Thanks. > > > > > >Sebastian > > > > > >_______________________________________________ > > >Javascript mailing list > > >Javascript at LaTech.edu > > >https://lists.LaTech.edu/mailman/listinfo/javascript > > > > > >-- > > >This email has been verified as Virus free > > >Virus Protection and more available at http://www.plus.net > > > > > > > > > > > > -------------------------------------------------------------------------- -- > ---- > > > > _______________________________________________ > > 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 charlie_chan at cox-internet.com Fri Jan 16 14:49:47 2004 From: charlie_chan at cox-internet.com (charlie_chan) Date: Fri, 16 Jan 2004 14:49:47 -0600 Subject: [Javascript] MICROSOFT AND SECURITY ARE NOT COMPATIABLE Message-ID: <001a01c3dc72$470b4810$201cb4d0@norman> Internet Explorer 6 packs and Windows 2000 Service Pack 4 contain damaging code. The code will eliminate the browser's ability to access the internet. Microsoft knows that the code is in the Internet Explorer packs and has not removed it. They just do not care. They have come to rely on Spybot Search and Destroy and Ad-aware 6 to solve the problem (WRONG). If you install Windows 2000 SP4, either before or after cleaning the downloaded packs with Spybot and Ad-aware, you will loose access to the internet. It appears that someone has altered the SP 4 code to create an expanded version of the original problem. This had to have happened very recently because I had installed SP 4 on another system about 7 day before this and the browser works. Microsoft people should be banned from using the word, security. They can not security their own updates downloads. Without the ability to install atleast SP 3 on this system, I can not install Norton System Works properly. Therefore Outlook Express can not be used. This may apply to other programs being installed also. I have been receiving a lot of phony Microsoft security email lately and there my be a connection between the increase in this harmful email and the new browser interference problem. charlie_chan at cox-internet.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From peter at brunone.com Fri Jan 16 15:08:05 2004 From: peter at brunone.com (Peter Brunone) Date: Fri, 16 Jan 2004 15:08:05 -0600 Subject: [Javascript] spammo In-Reply-To: <001a01c3dc72$470b4810$201cb4d0@norman> Message-ID: <008501c3dc74$d5e09c50$0502a8c0@monkeyhouse> We should congratulate David on his filtering techniques; this is the first piece of you-know-what that's gotten through in quite a while. -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of charlie_chan Sent: Friday, January 16, 2004 2:50 PM To: javascript at LaTech.edu Subject: [Javascript] MICROSOFT AND SECURITY ARE NOT COMPATIABLE Internet Explorer 6 packs and Windows 2000 Service Pack 4 contain damaging code. The code will eliminate the browser's ability to access the internet. Microsoft knows that the code is in the Internet Explorer packs and has not removed it. They just do not care. They have come to rely on Spybot Search and Destroy and Ad-aware 6 to solve the problem (WRONG). If you install Windows 2000 SP4, either before or after cleaning the downloaded packs with Spybot and Ad-aware, you will loose access to the internet. It appears that someone has altered the SP 4 code to create an expanded version of the original problem. This had to have happened very recently because I had installed SP 4 on another system about 7 day before this and the browser works. Microsoft people should be banned from using the word, security. They can not security their own updates downloads. Without the ability to install atleast SP 3 on this system, I can not install Norton System Works properly. Therefore Outlook Express can not be used. This may apply to other programs being installed also. I have been receiving a lot of phony Microsoft security email lately and there my be a connection between the increase in this harmful email and the new browser interference problem. charlie_chan at cox-internet.com From peter at brunone.com Fri Jan 16 15:50:19 2004 From: peter at brunone.com (Peter Brunone) Date: Fri, 16 Jan 2004 15:50:19 -0600 Subject: [Javascript] offsetTop inside a TD (IE 5 and 6) Message-ID: <008b01c3dc7a$bc62fab0$0502a8c0@monkeyhouse> This isn't strictly Javascript related, so smack me if you think I'm too far off-topic. Also, it's limited to up-level Internet Explorer, since that's my current development platform. I've been summing the offsetTop and offsetHeight of say, Object1, to position the style.top of Object2 directly below it. This works just fine until Object1 is in a table cell. When the TD is valign="top", I have no problems. However, when the valign is middle or bottom, Object1's distance from the top of the TD is added to the final style.top value of Object2. Here are two mockups of the situation. *********************************************************** Example A: ---------Top of cell (valign middle)----------- Object1 in middle of cell Object2 starts right below the bottom (about 1/2 cell-height below where it should). ---------------- Bottom of cell --------------- Example B: ---------Top of cell (valign bottom)----------- Object1 at bottom of cell ---------------- Bottom of cell --------------- Object2 starts down here (almost a full cell-height below Object1) ************************************************************** Any thoughts on what this strange valign-related value is? Regards, Peter Brunone From javascriptlist at dandemutande.org Fri Jan 16 15:55:01 2004 From: javascriptlist at dandemutande.org (Paul Novitski) Date: Fri, 16 Jan 2004 13:55:01 -0800 Subject: [Javascript] offsetTop inside a TD (IE 5 and 6) In-Reply-To: <008b01c3dc7a$bc62fab0$0502a8c0@monkeyhouse> References: <008b01c3dc7a$bc62fab0$0502a8c0@monkeyhouse> Message-ID: <6.0.1.1.2.20040116135208.01cd0750@spamarrest.com> My first guess is that you're computing these locations before the page is fully rendered when the browser doesn't yet know the exact table dimensions. If I'm right, try calling your repositioning function with onLoad(). Paul At 01:50 PM 1/16/2004, you wrote: > This isn't strictly Javascript related, so smack me if you think >I'm too far off-topic. Also, it's limited to up-level Internet >Explorer, since that's my current development platform. > > I've been summing the offsetTop and offsetHeight of say, >Object1, to position the style.top of Object2 directly below it. This >works just fine until Object1 is in a table cell. > > When the TD is valign="top", I have no problems. However, when >the valign is middle or bottom, Object1's distance from the top of the >TD is added to the final style.top value of Object2. > >Here are two mockups of the situation. > >*********************************************************** >Example A: > >---------Top of cell (valign middle)----------- > > > > Object1 in middle of cell > > > Object2 starts right below the bottom (about 1/2 cell-height >below where it should). >---------------- Bottom of cell --------------- > > >Example B: > >---------Top of cell (valign bottom)----------- > > > > > > Object1 at bottom of cell >---------------- Bottom of cell --------------- > > > > > Object2 starts down here (almost a full cell-height below >Object1) > >************************************************************** > >Any thoughts on what this strange valign-related value is? > >Regards, > >Peter Brunone > > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript From peter at brunone.com Fri Jan 16 17:20:45 2004 From: peter at brunone.com (Peter Brunone) Date: Fri, 16 Jan 2004 17:20:45 -0600 Subject: [Javascript] offsetTop inside a TD (IE 5 and 6) In-Reply-To: <6.0.1.1.2.20040116135208.01cd0750@spamarrest.com> Message-ID: <00a201c3dc87$5e8dc1b0$0502a8c0@monkeyhouse> Hi Paul, Good idea, but this happens every time I call the positioning function (upon clicking Object1). Additionally, the problems are quite consistent based on the height of the cell. I'm starting to hack around it, by checking Object1's parentElement and then seeing if it has one of the two offending valign values... The tricky part is calculating the correction factor. Of course, if there's just a standard value that takes all that into consideration, that would be great too. -Peter -----Original Message----- From: javascript-bounces at LaTech.edu On Behalf Of Paul Novitski My first guess is that you're computing these locations before the page is fully rendered when the browser doesn't yet know the exact table dimensions. If I'm right, try calling your repositioning function with onLoad(). Paul At 01:50 PM 1/16/2004, you wrote: > This isn't strictly Javascript related, so smack me if you >think I'm too far off-topic. Also, it's limited to up-level Internet >Explorer, since that's my current development platform. > > I've been summing the offsetTop and offsetHeight of say, >Object1, to position the style.top of Object2 directly below it. This >works just fine until Object1 is in a table cell. > > When the TD is valign="top", I have no problems. However, >when the valign is middle or bottom, Object1's distance from the top of >the TD is added to the final style.top value of Object2. > >Here are two mockups of the situation. > >*********************************************************** >Example A: > >---------Top of cell (valign middle)----------- > > > > Object1 in middle of cell > > > Object2 starts right below the bottom (about 1/2 cell-height >below where it should). >---------------- Bottom of cell --------------- > > >Example B: > >---------Top of cell (valign bottom)----------- > > > > > > Object1 at bottom of cell >---------------- Bottom of cell --------------- > > > > > Object2 starts down here (almost a full cell-height below >Object1) > >************************************************************** > >Any thoughts on what this strange valign-related value is? > >Regards, > >Peter Brunone From java.script at seacrets.com Fri Jan 16 17:22:45 2004 From: java.script at seacrets.com (Cutter (JavaScript List)) Date: Fri, 16 Jan 2004 18:22:45 -0500 Subject: [Javascript] locking contents In-Reply-To: References: Message-ID: <40087245.4090300@seacrets.com> Sebastian, Look into a program called HTML Guardian. Just read about it in the latest issue of Practical Web Pages WebBuilder. I can't say that it will take care of all of your requirements (and I don't think any mix of things will), but it should cover many. Cutter sebastian wrote: >Hi. > >I have to prevent that users who browse my HTML pages can do: >- select and copy the contents >- print the contents >- save the html page >- edit source > >Bassically they can only view the contents. >Is anything od this possible? >The content of a page is a set of exam questions that should't be copied, >printed ecc. I know that there's always printscreen... > >Thanks. > >Sebastian > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript > > From merchant at LATECH.EDU Fri Jan 16 17:52:29 2004 From: merchant at LATECH.EDU (David Merchant) Date: Fri, 16 Jan 2004 17:52:29 -0600 Subject: [Javascript] MICROSOFT AND SECURITY ARE NOT COMPATIABLE In-Reply-To: <001a01c3dc72$470b4810$201cb4d0@norman> Message-ID: <5.1.0.14.2.20040116175002.02aeb608@mail.latech.edu> While I can appreciate the frustration this list member has expressed in his email, I just want to gently remind folk that the JavaScript list is not the proper list or venue to vent or discuss this kind of topic/issue. Thanks, TTFN, David Merchant (JavaScript list admin) Director of Integrated Technology CATALyST Louisiana Tech University Carson Taylor Hall, Rm. 130 Adams Street (PO Box 3179) Ruston, LA 71272 Tel: (318) 257-4772 Fax: (318) 257-3852 catalyst.latech.edu -------------- next part -------------- An HTML attachment was scrubbed... URL: From javascriptlist at dandemutande.org Fri Jan 16 18:00:05 2004 From: javascriptlist at dandemutande.org (Paul Novitski) Date: Fri, 16 Jan 2004 16:00:05 -0800 Subject: [Javascript] offsetTop inside a TD (IE 5 and 6) In-Reply-To: <00a201c3dc87$5e8dc1b0$0502a8c0@monkeyhouse> References: <6.0.1.1.2.20040116135208.01cd0750@spamarrest.com> <00a201c3dc87$5e8dc1b0$0502a8c0@monkeyhouse> Message-ID: <6.0.1.1.2.20040116154121.01f8e008@spamarrest.com> Peter, I think I'm doing exactly what you want to do here: http://www.canadianwolves.net/ I'm placing the menu item highlight (a thick bar) exactly below each menu item jpg; the row of menu items sits inside a table nested inside a table cell. Basically what this code snippet does is accumulate the .offsetTop and .offsetLeft values for all the nested containers in which a menu item sits: ======================================= var objImage = document.getElementById(MenuItemName); var objChild = objImage; var TotalTop = 0; var TotalLeft = 0; // do this as long as the current object is in a container while (objChild){ TotalTop = TotalTop + objChild.offsetTop; TotalLeft = TotalLeft + objChild.offsetLeft; objChild = objChild.offsetParent; } // add the height of the menu item jpeg TotalTop = TotalTop + objImage.offsetHeight; // and that's where the highlight goes objHilit.style.pixelTop = TotalTop; ======================================= (I also had to add a kludge for the Mac, adding in the body top margin.) Paul At 03:20 PM 1/16/2004, you wrote: >Hi Paul, > > Good idea, but this happens every time I call the positioning >function (upon clicking Object1). Additionally, the problems are quite >consistent based on the height of the cell. > > I'm starting to hack around it, by checking Object1's >parentElement and then seeing if it has one of the two offending valign >values... The tricky part is calculating the correction factor. Of >course, if there's just a standard value that takes all that into >consideration, that would be great too. > >-Peter > >-----Original Message----- >From: javascript-bounces at LaTech.edu On Behalf Of Paul Novitski > >My first guess is that you're computing these locations before the page >is >fully rendered when the browser doesn't yet know the exact table >dimensions. If I'm right, try calling your repositioning function with >onLoad(). > >Paul > >At 01:50 PM 1/16/2004, you wrote: > > > This isn't strictly Javascript related, so smack me if you > >think I'm too far off-topic. Also, it's limited to up-level Internet > >Explorer, since that's my current development platform. > > > > I've been summing the offsetTop and offsetHeight of say, > >Object1, to position the style.top of Object2 directly below it. This > >works just fine until Object1 is in a table cell. > > > > When the TD is valign="top", I have no problems. However, > >when the valign is middle or bottom, Object1's distance from the top of > > >the TD is added to the final style.top value of Object2. > > > >Here are two mockups of the situation. > > > >*********************************************************** > >Example A: > > > >---------Top of cell (valign middle)----------- > > > > > > > > Object1 in middle of cell > > > > > > Object2 starts right below the bottom (about 1/2 cell-height > >below where it should). > >---------------- Bottom of cell --------------- > > > > > >Example B: > > > >---------Top of cell (valign bottom)----------- > > > > > > > > > > > > Object1 at bottom of cell > >---------------- Bottom of cell --------------- > > > > > > > > > > Object2 starts down here (almost a full cell-height below > >Object1) > > > >************************************************************** > > > >Any thoughts on what this strange valign-related value is? > > > >Regards, > > > >Peter Brunone > > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript From alan.easton at unn.ac.uk Fri Jan 16 18:59:03 2004 From: alan.easton at unn.ac.uk (Alan Easton) Date: Sat, 17 Jan 2004 00:59:03 -0000 Subject: [Javascript] Microsoft DHTML Checkbox Message-ID: <61B1A61B4F4AD711B3450008C791F6FA018F789E@clearwater.unn.ac.uk> Hello People, Just a quick question, in the hope someone might be able to help or point me in the right direction. Now how many of you have seen Microsoft's DHTML Checkboxes in operation on such sites as there Windows Update or Office Clipart sites (http://office.microsoft.com/home/default.aspx?CTT=6&Origin=ES790020041033). ..just search for something then use the checkboxes to add them to your basket. It looks very cool and I was wondering if anyone knew how it was done. It looks difficult, but any ideas or something similar would be great as a guide. Many Thanks, Alan... From trojani2000 at hotmail.com Fri Jan 16 20:13:30 2004 From: trojani2000 at hotmail.com (BEKIM BACAJ) Date: Sat, 17 Jan 2004 03:13:30 +0100 Subject: [Javascript] locking contents-OK Message-ID: >What do you mean by "web-page dialog"? As about "web-page dialog" we will come to it later if needed. >Print screen doesn't output an image. It copies the contents into the >clipboard. Then you just open your favorite editor and paste and voila, >you've got a screenie. Well that's great! Because you can allways empty te pockets of your students before they leave the class! That is, you can always use the 'onblur' and the 'unload' event to empty the clipboard! Preventing the chache is even easier. So, we should consider thismatter as solved. Ofcourse only if this data are accesible only hrough some local net in the schooll. Because one can always grab the pencil and write all the contents down t home. >Chris Tifer > >----- Original Message ----- >From: "BEKIM BACAJ" >To: >Sent: Friday, January 16, 2004 11:48 AM >Subject: Re: [Javascript] locking contents > > > > > > Has anybody ever used web-page dialog for this matter? > > I think it will do good protection to the material you wish > > to be wiewed only. And sorry, where can I find the copies I've done with > > print screen cmnd while working on windows env? > > > > >From: "Tim Makins" > > >Reply-To: "[JavaScript List]" > > >To: "[JavaScript List]" > > >Subject: Re: [Javascript] locking contents > > >Date: Fri, 16 Jan 2004 15:22:38 -0000 > > > > > >Have you looked into using pdf files ? I think they can be locked in > > >different ways. > > > > > >Tim in Ireland. > > > > > >----- Original Message ----- > > >From: "sebastian" > > >To: "[JavaScript List]" > > >Sent: Friday, January 16, 2004 2:17 PM > > >Subject: RE: [Javascript] locking contents > > > > > > > >I have to prevent that users who browse my HTML pages can do: > > > > >- select and copy the contents > > > > >- print the contents > > > > >- save the html page > > > > >- edit source > > > > > > > > > >Bassically they can only view the contents. > > > > >Is anything od this possible? > > > > >The content of a page is a set of exam questions that should't be > > >copied, > > > > >printed ecc. I know that there's always printscreen... > > > > > > > > > >Thanks. > > > > > > > > > >Sebastian > > > > > > > > > > > >_______________________________________________ > > >Javascript mailing list > > >Javascript at LaTech.edu > > >https://lists.LaTech.edu/mailman/listinfo/javascript > > > > _________________________________________________________________ > > STOP MORE SPAM with the new MSN 8 and get 2 months FREE* > > http://join.msn.com/?page=features/junkmail > > > > _______________________________________________ > > 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 _________________________________________________________________ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail From peter at brunone.com Sat Jan 17 01:07:49 2004 From: peter at brunone.com (Peter Brunone) Date: Sat, 17 Jan 2004 01:07:49 -0600 Subject: [Javascript] locking contents-OK In-Reply-To: Message-ID: <00c201c3dcc8$9e2e7300$0502a8c0@monkeyhouse> What if they disable Javascript? -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of BEKIM BACAJ >What do you mean by "web-page dialog"? As about "web-page dialog" we will come to it later if needed. >Print screen doesn't output an image. It copies the contents into the >clipboard. Then you just open your favorite editor and paste and voila, >you've got a screenie. Well that's great! Because you can allways empty te pockets of your students before they leave the class! That is, you can always use the 'onblur' and the 'unload' event to empty the clipboard! Preventing the chache is even easier. So, we should consider thismatter as solved. Ofcourse only if this data are accesible only hrough some local net in the schooll. Because one can always grab the pencil and write all the contents down t home. >Chris Tifer > >----- Original Message ----- >From: "BEKIM BACAJ" > > > > Has anybody ever used web-page dialog for this matter? > > I think it will do good protection to the material you wish to be > > wiewed only. And sorry, where can I find the copies I've done with > > print screen cmnd while working on windows env? > > > > >From: "Tim Makins" > > >Reply-To: "[JavaScript List]" > > >To: "[JavaScript List]" > > >Subject: Re: [Javascript] locking contents > > >Date: Fri, 16 Jan 2004 15:22:38 -0000 > > > > > >Have you looked into using pdf files ? I think they can be locked > > >in different ways. > > > > > >Tim in Ireland. > > > > > >----- Original Message ----- > > >From: "sebastian" > > > > > > > >I have to prevent that users who browse my HTML pages can do: > > > > >- select and copy the contents > > > > >- print the contents > > > > >- save the html page > > > > >- edit source > > > > > > > > > >Bassically they can only view the contents. > > > > >Is anything od this possible? > > > > >The content of a page is a set of exam questions that should't > > > > >be > > >copied, > > > > >printed ecc. I know that there's always printscreen... > > > > > > > > > >Thanks. > > > > > > > > > >Sebastian From sebastian.lahajnar at pris-inz.si Sat Jan 17 01:30:35 2004 From: sebastian.lahajnar at pris-inz.si (sebastian) Date: Sat, 17 Jan 2004 08:30:35 +0100 Subject: [Javascript] locking contents In-Reply-To: <20040116094339.mattski@plus.net> Message-ID: Thanks for all answers you have written on my question. I think I'll try with things like onSelectStart, onContextMenu , new window like Matt suggested. Better something than nothing. The idea of locking the contents of an HTML page doesn't came from IT people (me or my boss) but from certain smart ph.d who want's to make students life harder. My program (written in ASP) randomly generates set of questions from a question databases, displays them as en exam, accepts students answers and finnaly callculates the score. Of course the time is limited and also the period (certain hours of certain days). Sebastian -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu]On Behalf Of Matt Barton Sent: Friday, January 16, 2004 10:44 AM To: javascript at LaTech.edu Subject: RE: [Javascript] locking contents Hi, I'm not sure that there's anyway you can do this. You could take all kind of measures to try it, such as forcing the page to open in a new browser window with no menu or toolbar and using the onContextMenu event to disable the right click View Source option. You could also use the onSelectStart (and associated events) to disable the selection of text to avoid copy & paste. But even with all of that any visitors using a Windows OS (and doubtless others) will be able to hit the 'Print Screen' keyboard button and paste the resulting image into a image editor and print it from there - you can have no control over that with a scripting language in a browser. Matt >Hi. > >I have to prevent that users who browse my HTML pages can do: >- select and copy the contents >- print the contents >- save the html page >- edit source > >Bassically they can only view the contents. >Is anything od this possible? >The content of a page is a set of exam questions that should't be copied, >printed ecc. I know that there's always printscreen... > >Thanks. > >Sebastian > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript > >-- >This email has been verified as Virus free >Virus Protection and more available at http://www.plus.net > From trojani2000 at hotmail.com Sat Jan 17 08:31:44 2004 From: trojani2000 at hotmail.com (BEKIM BACAJ) Date: Sat, 17 Jan 2004 15:31:44 +0100 Subject: [Javascript] locking contents-OK Message-ID: >From: "Peter Brunone" > What if they disable Javascript? they'll be disabling the ability to view the content! This way, again they will be forced to enable it, preview the con- tent and leave empy-pocket again. >[mailto:javascript-bounces at LaTech.edu] On Behalf Of BEKIM BACAJ > > >What do you mean by "web-page dialog"? >As about "web-page dialog" we will come to it later if needed. > > >Print screen doesn't output an image. It copies the contents into the > >clipboard. Then you just open your favorite editor and paste and voila, > > >you've got a screenie. > >Well that's great! > >Because you can allways empty te pockets of your students before they >leave >the class! >That is, you can always use the 'onblur' and the 'unload' event to empty >the >clipboard! >Preventing the chache is even easier. >So, we should consider thismatter as solved. >Ofcourse only if this data are accesible only hrough some local net in >the >schooll. >Because one can always grab the pencil and write all the contents down t > >home. > >Chris Tifer > > > >----- Original Message ----- > >From: "BEKIM BACAJ" > > > > > > Has anybody ever used web-page dialog for this matter? > > > I think it will do good protection to the material you wish to be > > > wiewed only. And sorry, where can I find the copies I've done with > > > print screen cmnd while working on windows env? > > > > > > >From: "Tim Makins" > > > >Reply-To: "[JavaScript List]" > > > >To: "[JavaScript List]" > > > >Subject: Re: [Javascript] locking contents > > > >Date: Fri, 16 Jan 2004 15:22:38 -0000 > > > > > > > >Have you looked into using pdf files ? I think they can be locked > > > >in different ways. > > > > > > > >Tim in Ireland. > > > > > > > >----- Original Message ----- > > > >From: "sebastian" > > > > > > > > > >I have to prevent that users who browse my HTML pages can do: > > > > > >- select and copy the contents > > > > > >- print the contents > > > > > >- save the html page > > > > > >- edit source > > > > > > > > > > > >Bassically they can only view the contents. > > > > > >Is anything od this possible? > > > > > >The content of a page is a set of exam questions that should't > > > > > >be > > > >copied, > > > > > >printed ecc. I know that there's always printscreen... > > > > > > > > > > > >Thanks. > > > > > > > > > > > >Sebastian > > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail From hassan at webtuitive.com Sat Jan 17 09:09:46 2004 From: hassan at webtuitive.com (Hassan Schroeder) Date: Sat, 17 Jan 2004 07:09:46 -0800 Subject: [Javascript] locking contents-OK In-Reply-To: References: Message-ID: <4009503A.7020807@webtuitive.com> BEKIM BACAJ wrote: > That is, you can always use the 'onblur' and the 'unload' event to empty > the clipboard! Uh, "Print Screen" isn't the only way to do a screen capture, and not all of them use the clipboard... :-) -- Hassan Schroeder ----------------------------- hassan at webtuitive.com Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. From peter at brunone.com Sat Jan 17 10:25:08 2004 From: peter at brunone.com (Peter Brunone) Date: Sat, 17 Jan 2004 10:25:08 -0600 Subject: [Javascript] locking contents-OK In-Reply-To: Message-ID: <00cd01c3dd16$7911e220$0502a8c0@monkeyhouse> Then can't they just view the page source and get the info that way? -----Original Message----- From: javascript-bounces at LaTech.edu On Behalf Of BEKIM BACAJ >From: "Peter Brunone" > What if they disable Javascript? they'll be disabling the ability to view the content! This way, again they will be forced to enable it, preview the con- tent and leave empy-pocket again. >[mailto:javascript-bounces at LaTech.edu] On Behalf Of BEKIM BACAJ > > >What do you mean by "web-page dialog"? >As about "web-page dialog" we will come to it later if needed. > > >Print screen doesn't output an image. It copies the contents into the > >clipboard. Then you just open your favorite editor and paste and > >voila, > > >you've got a screenie. > >Well that's great! > >Because you can allways empty te pockets of your students before they >leave the class! >That is, you can always use the 'onblur' and the 'unload' event to empty >the >clipboard! >Preventing the chache is even easier. >So, we should consider thismatter as solved. >Ofcourse only if this data are accesible only hrough some local net in >the >schooll. >Because one can always grab the pencil and write all the contents down t > >home. > >Chris Tifer > > > >----- Original Message ----- > >From: "BEKIM BACAJ" > > > > > > Has anybody ever used web-page dialog for this matter? > > > I think it will do good protection to the material you wish to be > > > wiewed only. And sorry, where can I find the copies I've done with > > > print screen cmnd while working on windows env? > > > > > > >From: "Tim Makins" > > > >Reply-To: "[JavaScript List]" > > > >To: "[JavaScript List]" > > > >Subject: Re: [Javascript] locking contents > > > >Date: Fri, 16 Jan 2004 15:22:38 -0000 > > > > > > > >Have you looked into using pdf files ? I think they can be locked > > > >in different ways. > > > > > > > >Tim in Ireland. > > > > > > > >----- Original Message ----- > > > >From: "sebastian" > > > > > > > > > >I have to prevent that users who browse my HTML pages can do: > > > > > >- select and copy the contents > > > > > >- print the contents > > > > > >- save the html page > > > > > >- edit source > > > > > > > > > > > >Bassically they can only view the contents. > > > > > >Is anything od this possible? > > > > > >The content of a page is a set of exam questions that > > > > > >should't be > > > >copied, > > > > > >printed ecc. I know that there's always printscreen... > > > > > > > > > > > >Thanks. > > > > > > > > > > > >Sebastian > > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From trojani2000 at hotmail.com Sat Jan 17 12:05:32 2004 From: trojani2000 at hotmail.com (BEKIM BACAJ) Date: Sat, 17 Jan 2004 19:05:32 +0100 Subject: [Javascript] locking contents-OK Message-ID: Peter Brunone wrote > Then can't they just view the page source and get the info that >way? Yes! Are we missing some point here?! Sebastian wrote this on his question: > > > > >----- Original Message ----- >I have to prevent that users who browse my HTML pages can do: >- select and copy the contents >- print the contents >- save the html page >- edit source > > > >Bassically they can only view the contents. >Is anything od this possible? >The content of a page is a set of exam questions that >should't be >copied, >printed ecc. I know that there's always printscreen... And he also wrote: >My program (written in ASP) randomly generates set of questions from a >question databases, displays them as en exam, accepts students answers and >finnaly callculates the score. >Of course the time is limited and also the period >(certain hours of certain days). The main purpose for this content is (firstly) to be *viewable* and viewable only. _________________________________________________________________ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail From trojani2000 at hotmail.com Sat Jan 17 12:20:14 2004 From: trojani2000 at hotmail.com (BEKIM BACAJ) Date: Sat, 17 Jan 2004 19:20:14 +0100 Subject: [Javascript] locking contents-OK Message-ID: Hassan Schroeder wrote: > >BEKIM BACAJ wrote: > >>That is, you can always use the 'onblur' and the 'unload' event to empty >>the clipboard! > >Uh, "Print Screen" isn't the only way to do a screen capture, and >not all of them use the clipboard... :-) Name the second please and let us see if we can disarm it. _________________________________________________________________ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail From trojani2000 at hotmail.com Sat Jan 17 12:27:28 2004 From: trojani2000 at hotmail.com (BEKIM BACAJ) Date: Sat, 17 Jan 2004 19:27:28 +0100 Subject: [Javascript] locking contents-OK Message-ID: Tell us how. Please? >From: "Peter Brunone" >Reply-To: "[JavaScript List]" >To: "'[JavaScript List]'" >Subject: RE: [Javascript] locking contents-OK >Date: Sat, 17 Jan 2004 12:28:32 -0600 > > > Right, but if you can *view* the source, you can *save* the >source... And edit it any way you like as well. > >-----Original Message----- >From: javascript-bounces at LaTech.edu >[mailto:javascript-bounces at LaTech.edu] On Behalf Of BEKIM BACAJ > >Peter Brunone wrote > > Then can't they just view the page source and get the info that >way? > >Yes! >Are we missing some point here?! > >Sebastian wrote this on his question: > > > > > >----- Original Message ----- > > >I have to prevent that users who browse my HTML pages can do: > >- select and copy the contents > >- print the contents > >- save the html page > >- edit source > > > > > >Bassically they can only view the contents. > >Is anything od this possible? > >The content of a page is a set of exam questions that > >should't be > >copied, > >printed ecc. I know that there's always printscreen... > >And he also wrote: > > >My program (written in ASP) randomly generates set of questions from a > >question databases, displays them as en exam, accepts students answers >and > >finnaly callculates the score. > >Of course the time is limited and also the period > >(certain hours of certain days). > >The main purpose for this content is (firstly) to be *viewable* and >viewable >only. > >_________________________________________________________________ >STOP MORE SPAM with the new MSN 8 and get 2 months FREE* >http://join.msn.com/?page=features/junkmail > >_______________________________________________ >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 _________________________________________________________________ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail From peter at brunone.com Sat Jan 17 12:28:32 2004 From: peter at brunone.com (Peter Brunone) Date: Sat, 17 Jan 2004 12:28:32 -0600 Subject: [Javascript] locking contents-OK In-Reply-To: Message-ID: <00d401c3dd27$b6879df0$0502a8c0@monkeyhouse> Right, but if you can *view* the source, you can *save* the source... And edit it any way you like as well. -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of BEKIM BACAJ Peter Brunone wrote > Then can't they just view the page source and get the info that way? Yes! Are we missing some point here?! Sebastian wrote this on his question: > > > > >----- Original Message ----- >I have to prevent that users who browse my HTML pages can do: >- select and copy the contents >- print the contents >- save the html page >- edit source > > > >Bassically they can only view the contents. >Is anything od this possible? >The content of a page is a set of exam questions that >should't be >copied, >printed ecc. I know that there's always printscreen... And he also wrote: >My program (written in ASP) randomly generates set of questions from a >question databases, displays them as en exam, accepts students answers and >finnaly callculates the score. >Of course the time is limited and also the period >(certain hours of certain days). The main purpose for this content is (firstly) to be *viewable* and viewable only. _________________________________________________________________ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From trojani2000 at hotmail.com Sat Jan 17 12:43:12 2004 From: trojani2000 at hotmail.com (BEKIM BACAJ) Date: Sat, 17 Jan 2004 19:43:12 +0100 Subject: [Javascript] locking contents-OK Message-ID: Ouh, you mean the source-code together with the content And not 'only' the content, No, they can not. It's asp and you also can't do anything with the data displayed with web-page dialog. You can't highlight (select no portion of it) You can't use copy-paste command You can't use right-click, cause dialogs don't react on such. You can't print the conten's of it unles you've programmed it and defined a print button. and there is no way you can review the sourcecode. huh >From: "BEKIM BACAJ" >Reply-To: "[JavaScript List]" >To: javascript at LaTech.edu >Subject: RE: [Javascript] locking contents-OK >Date: Sat, 17 Jan 2004 19:27:28 +0100 > >Tell us how. Please? > > >>From: "Peter Brunone" >>Reply-To: "[JavaScript List]" >>To: "'[JavaScript List]'" >>Subject: RE: [Javascript] locking contents-OK >>Date: Sat, 17 Jan 2004 12:28:32 -0600 >> >> >> Right, but if you can *view* the source, you can *save* the >>source... And edit it any way you like as well. >> >>-----Original Message----- >>From: javascript-bounces at LaTech.edu >>[mailto:javascript-bounces at LaTech.edu] On Behalf Of BEKIM BACAJ >> >>Peter Brunone wrote >> > Then can't they just view the page source and get the info that >>way? >> >>Yes! >>Are we missing some point here?! >> >>Sebastian wrote this on his question: >> > > > > >----- Original Message ----- >> >> >I have to prevent that users who browse my HTML pages can do: >> >- select and copy the contents >> >- print the contents >> >- save the html page >> >- edit source >> > > > >> >Bassically they can only view the contents. >> >Is anything od this possible? >> >The content of a page is a set of exam questions that >> >should't be >> >copied, >> >printed ecc. I know that there's always printscreen... >> >>And he also wrote: >> >> >My program (written in ASP) randomly generates set of questions from a >> >question databases, displays them as en exam, accepts students answers >>and >> >finnaly callculates the score. >> >Of course the time is limited and also the period >> >(certain hours of certain days). >> >>The main purpose for this content is (firstly) to be *viewable* and >>viewable >>only. >> >>_________________________________________________________________ >>STOP MORE SPAM with the new MSN 8 and get 2 months FREE* >>http://join.msn.com/?page=features/junkmail >> >>_______________________________________________ >>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 > >_________________________________________________________________ >Add photos to your e-mail with MSN 8. Get 2 months FREE*. >http://join.msn.com/?page=features/featuredemail > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail From tsimmons at employmentlawadvisors.com Sat Jan 17 12:50:19 2004 From: tsimmons at employmentlawadvisors.com (William T. Simmons) Date: Sat, 17 Jan 2004 12:50:19 -0600 Subject: [Javascript] locking contents-OK References: <4009503A.7020807@webtuitive.com> Message-ID: <042701c3dd2a$dd25e900$32d0b341@sndmgr122> Yes - I was thinking that a program like RoboDemo (www.robodemo.com) could be used to take snapshots of the browser window and various pages viewed therein and export the images as a Flash movie or as images in a Word document (the two main export options). The whole point of that program is to make Flash-based demos of actions in an application window or on a selected area of the desktop, and it does the screen capturing as the application being recorded is running. There are other applications that can do that as well. Tommy Simmons Employment Law Advisory Network www.employmentlawadvisors.com ----- Original Message ----- From: "Hassan Schroeder" To: "[JavaScript List]" Sent: Saturday, January 17, 2004 9:09 AM Subject: Re: [Javascript] locking contents-OK > BEKIM BACAJ wrote: > > > That is, you can always use the 'onblur' and the 'unload' event to empty > > the clipboard! > > Uh, "Print Screen" isn't the only way to do a screen capture, and > not all of them use the clipboard... :-) > > -- > Hassan Schroeder ----------------------------- hassan at webtuitive.com > Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com > > dream. code. From hassan at webtuitive.com Sat Jan 17 13:03:25 2004 From: hassan at webtuitive.com (Hassan Schroeder) Date: Sat, 17 Jan 2004 11:03:25 -0800 Subject: [Javascript] locking contents-OK In-Reply-To: References: Message-ID: <400986FD.4070000@webtuitive.com> BEKIM BACAJ wrote: >> Uh, "Print Screen" isn't the only way to do a screen capture, and >> not all of them use the clipboard... :-) > > Name the second please and let us see if we can disarm it. Here's a second and third :-) "HyperSnap-DX" () is a Windows app I've used in the past (there's a trial version available, or used to be). `xwd` (x window dump) is a common X utility that's also available for PCs via Cygwin... -- Hassan Schroeder ----------------------------- hassan at webtuitive.com Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. From peter at brunone.com Sat Jan 17 14:50:34 2004 From: peter at brunone.com (Peter Brunone) Date: Sat, 17 Jan 2004 14:50:34 -0600 Subject: [Javascript] locking contents-OK In-Reply-To: Message-ID: <00dd01c3dd3b$8dc40a70$0502a8c0@monkeyhouse> No, I mean the html source. I doubt anyone would be concerned that users could view the server-side script. If you're displaying HTML, no matter how you do it, there is a way to take/save that content. Even if you use this dialog box approach you mentioned, *something* has to load the content into that box. There is a link somewhere. If you View Source and find that link, and then paste that link into another browser window, you suddenly have the content; it's not that hard. Beyond that, if you load that "protected" page at all, it will be saved in the browser's history (not just the linear navigation history), and you can then pick it from the dropdown list that extends from the address bar. Even if it doesn't show up right away, the first few characters of the domain name typed there will bring up a list of comparable links, which will most likely include the URL of the page you were trying to protect. Sure, not everybody knows how to do these things, but plenty do -- students are a creative, resourceful bunch -- and if you have the knowledge, it would take you about a minute to get what you want. Huh. -----Original Message----- From: javascript-bounces at LaTech.edu On Behalf Of BEKIM BACAJ Ouh, you mean the source-code together with the content And not 'only' the content, No, they can not. It's asp and you also can't do anything with the data displayed with web-page dialog. You can't highlight (select no portion of it) You can't use copy-paste command You can't use right-click, cause dialogs don't react on such. You can't print the conten's of it unles you've programmed it and defined a print button. and there is no way you can review the sourcecode. huh >From: "BEKIM BACAJ" > >Tell us how. Please? > >>From: "Peter Brunone" >> >> Right, but if you can *view* the source, you can *save* the source... >>And edit it any way you like as well. >> >>-----Original Message----- >>From: javascript-bounces at LaTech.edu >>[mailto:javascript-bounces at LaTech.edu] On Behalf Of BEKIM BACAJ >> >>Peter Brunone wrote >> > Then can't they just view the page source and get the info that >>way? >> >>Yes! >>Are we missing some point here?! >> >>Sebastian wrote this on his question: >> > > > > >----- Original Message ----- >> >> >I have to prevent that users who browse my HTML pages can do: >> >- select and copy the contents >> >- print the contents >> >- save the html page >> >- edit source >> > > > >> >Bassically they can only view the contents. >> >Is anything od this possible? >> >The content of a page is a set of exam questions that should't be >> >copied, >> >printed ecc. I know that there's always printscreen... >> >>And he also wrote: >> >> >My program (written in ASP) randomly generates set of questions from >> >a question databases, displays them as en exam, accepts students >> >answers >>and >> >finnaly callculates the score. >> >Of course the time is limited and also the period >> >(certain hours of certain days). >> >>The main purpose for this content is (firstly) to be *viewable* and >>viewable only. From trojani2000 at hotmail.com Sat Jan 17 20:17:43 2004 From: trojani2000 at hotmail.com (BEKIM BACAJ) Date: Sun, 18 Jan 2004 03:17:43 +0100 Subject: [Javascript] locking contents-OK Message-ID: Look, Peter, I know about you in this forum for a while and I do respect you and your advices given now and than for more than three years now. It is interesting that I re-realize that I use very few links in my pages and when I do that I refuse to use the classical A href tag from the beggining of my first codes. I still use moseover, mousedown, mouse up, events to animate, navigate etc and get that original looks of my href's, same time disabling tracking etc. This is my regular way of creating links forever. I also do split them in categories, that surfer is able to distinguwish in his first view. It is a local net that this exams should get previewed and answered right away, in these terminals no one will have 'privileges' to install anything that isn't there yet, and skiping all other ditails I strongly believe that this particular content in this particular environment it practicaly posible to protect from being distributed to other students before their group take exams. salute! >From: "Peter Brunone" >Reply-To: "[JavaScript List]" >To: "'[JavaScript List]'" >Subject: RE: [Javascript] locking contents-OK >Date: Sat, 17 Jan 2004 14:50:34 -0600 > > > No, I mean the html source. I doubt anyone would be concerned >that users could view the server-side script. > > If you're displaying HTML, no matter how you do it, there is a >way to take/save that content. Even if you use this dialog box approach >you mentioned, *something* has to load the content into that box. There >is a link somewhere. If you View Source and find that link, and then >paste that link into another browser window, you suddenly have the >content; it's not that hard. > > Beyond that, if you load that "protected" page at all, it will >be saved in the browser's history (not just the linear navigation >history), and you can then pick it from the dropdown list that extends >from the address bar. Even if it doesn't show up right away, the first >few characters of the domain name typed there will bring up a list of >comparable links, which will most likely include the URL of the page you >were trying to protect. > > Sure, not everybody knows how to do these things, but plenty do >-- students are a creative, resourceful bunch -- and if you have the >knowledge, it would take you about a minute to get what you want. > >Huh. > >-----Original Message----- >From: javascript-bounces at LaTech.edu On Behalf Of BEKIM BACAJ > >Ouh, you mean the source-code together with the content And not 'only' >the >content, >No, they can not. It's asp and you also can't do anything with the data >displayed with web-page dialog. >You can't highlight (select no portion of it) >You can't use copy-paste command >You can't use right-click, cause dialogs don't react on such. You can't >print the conten's of it unles you've programmed it and defined a >print button. >and there is no way you can review the sourcecode. >huh > > >From: "BEKIM BACAJ" > > > >Tell us how. Please? > > > >>From: "Peter Brunone" > >> > >> Right, but if you can *view* the source, you can *save* the >source... > >>And edit it any way you like as well. > >> > >>-----Original Message----- > >>From: javascript-bounces at LaTech.edu > >>[mailto:javascript-bounces at LaTech.edu] On Behalf Of BEKIM BACAJ > >> > >>Peter Brunone wrote > >> > Then can't they just view the page source and get the info that > >>way? > >> > >>Yes! > >>Are we missing some point here?! > >> > >>Sebastian wrote this on his question: > >> > > > > >----- Original Message ----- > >> > >> >I have to prevent that users who browse my HTML pages can do: > >> >- select and copy the contents > >> >- print the contents > >> >- save the html page > >> >- edit source > >> > > > > >> >Bassically they can only view the contents. > >> >Is anything od this possible? > >> >The content of a page is a set of exam questions that should't be > >> >copied, > >> >printed ecc. I know that there's always printscreen... > >> > >>And he also wrote: > >> > >> >My program (written in ASP) randomly generates set of questions from > > >> >a question databases, displays them as en exam, accepts students > >> >answers > >>and > >> >finnaly callculates the score. > >> >Of course the time is limited and also the period > >> >(certain hours of certain days). > >> > >>The main purpose for this content is (firstly) to be *viewable* and > >>viewable only. > > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail From trojani2000 at hotmail.com Sat Jan 17 20:24:44 2004 From: trojani2000 at hotmail.com (BEKIM BACAJ) Date: Sun, 18 Jan 2004 03:24:44 +0100 Subject: [Javascript] locking contents-OK Message-ID: Hassan, I know that (und these). This was a retorical question. I was asking this question because students taking this exam will not be able to install anything new in these terminals even if the profesor is out. >From: Hassan Schroeder >Reply-To: "[JavaScript List]" >To: "[JavaScript List]" >Subject: Re: [Javascript] locking contents-OK >Date: Sat, 17 Jan 2004 11:03:25 -0800 > >BEKIM BACAJ wrote: > >>>Uh, "Print Screen" isn't the only way to do a screen capture, and >>>not all of them use the clipboard... :-) >> >>Name the second please and let us see if we can disarm it. > >Here's a second and third :-) > >"HyperSnap-DX" () is a Windows app I've >used in the past (there's a trial version available, or used to be). > >`xwd` (x window dump) is a common X utility that's also available >for PCs via Cygwin... > >-- >Hassan Schroeder ----------------------------- hassan at webtuitive.com >Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com > > dream. code. > > > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus From LMuchacho at twii.net Sun Jan 18 09:55:45 2004 From: LMuchacho at twii.net (Muchacho, Laurent (TWIi London)) Date: Sun, 18 Jan 2004 15:55:45 -0000 Subject: [Javascript] offsetTop inside a TD (IE 5 and 6) Message-ID: Hi Peter I had a similar problem when I try to get the offsettop of an element in IE I found this function on the net but don't remenber where if the author recognize himself please claim the credit for this work and give us the url of your site. function getAbsX(elt) { return parseInt(elt.x) ? elt.x : getAbsPos(elt,"Left"); } function getAbsY(elt) { return parseInt(elt.y) ? elt.y : getAbsPos(elt,"Top"); } function getAbsPos(elt,which) { iPos = 0; while (elt != null) { iPos += elt["offset" + which]; elt = elt.offsetParent; } return iPos; } to get the relative position of an element just call the function getAbsY(elt) ex: alert(getAbsY(document.getElementById('yourDivId'))); and you will get the position from the top of this element Laurent -----Original Message----- From: Peter Brunone To: javascript at latech.edu Sent: 16/01/2004 21:50 Subject: [Javascript] offsetTop inside a TD (IE 5 and 6) This isn't strictly Javascript related, so smack me if you think I'm too far off-topic. Also, it's limited to up-level Internet Explorer, since that's my current development platform. I've been summing the offsetTop and offsetHeight of say, Object1, to position the style.top of Object2 directly below it. This works just fine until Object1 is in a table cell. When the TD is valign="top", I have no problems. However, when the valign is middle or bottom, Object1's distance from the top of the TD is added to the final style.top value of Object2. Here are two mockups of the situation. *********************************************************** Example A: ---------Top of cell (valign middle)----------- Object1 in middle of cell Object2 starts right below the bottom (about 1/2 cell-height below where it should). ---------------- Bottom of cell --------------- Example B: ---------Top of cell (valign bottom)----------- Object1 at bottom of cell ---------------- Bottom of cell --------------- Object2 starts down here (almost a full cell-height below Object1) ************************************************************** Any thoughts on what this strange valign-related value is? Regards, Peter Brunone _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript DISCLAIMER - The preceding e-mail message (including any attachments) contains information that may be confidential, may be protected by the attorney-client or other applicable privileges, or may constitute non-public information. It is intended to be conveyed only to the designated recipient(s) named above. If you are not an intended recipient of this message, or have otherwise received it in error, please notify the sender by replying to this message and then delete all copies of it from your computer system. Any use, dissemination, distribution, or reproduction of this message by unintended recipients is not authorized and may be unlawful. The contents of this communication do not necessarily represent the views of this company. From LMuchacho at twii.net Sun Jan 18 10:26:07 2004 From: LMuchacho at twii.net (Muchacho, Laurent (TWIi London)) Date: Sun, 18 Jan 2004 16:26:07 -0000 Subject: [Javascript] locking contents-OK Message-ID: Hi All After reading all the email what I will do is: first to avoid people to see the page source if they disable javascript is use javascript to write the whole content of the page I know that sound weird but if with your asp you generate a string with urlEncode or htmlEncode(don't remenber exactly which one it is) and you put all your html in it become really difficult for someone(novice) to read it. Then when you write that string with javascript all the encode disapear and the browser write out the html with document.write(string). After to avoid the user to view the source or use his keyboard for print screen or copy the content you must create a function who while capture all the event as onmousedown onkeydown onkeypress and other you might need to get in your function you will allow only the letter of the alphabet and punctuation to be pushed on the keyboard for the mouse detect which button as been cliked and if it's the left button you allow if it's the right button your return false. And at last if your browser onblur fire a function who cover your whole content with a div. This solution is really complex and will not garanty the user can't take the source or print screen but you will cover a lot of possibillity and might discourage a lot of this personne to get what you trying to protect. Laurent ps: if you need any help my email is now lmuchacho at hotmail.com and sorry for my english -----Original Message----- From: BEKIM BACAJ To: javascript at LaTech.edu Sent: 18/01/2004 02:24 Subject: Re: [Javascript] locking contents-OK Hassan, I know that (und these). This was a retorical question. I was asking this question because students taking this exam will not be able to install anything new in these terminals even if the profesor is out. >From: Hassan Schroeder >Reply-To: "[JavaScript List]" >To: "[JavaScript List]" >Subject: Re: [Javascript] locking contents-OK >Date: Sat, 17 Jan 2004 11:03:25 -0800 > >BEKIM BACAJ wrote: > >>>Uh, "Print Screen" isn't the only way to do a screen capture, and >>>not all of them use the clipboard... :-) >> >>Name the second please and let us see if we can disarm it. > >Here's a second and third :-) > >"HyperSnap-DX" () is a Windows app I've >used in the past (there's a trial version available, or used to be). > >`xwd` (x window dump) is a common X utility that's also available >for PCs via Cygwin... > >-- >Hassan Schroeder ----------------------------- hassan at webtuitive.com >Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com > > dream. code. > > > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript DISCLAIMER - The preceding e-mail message (including any attachments) contains information that may be confidential, may be protected by the attorney-client or other applicable privileges, or may constitute non-public information. It is intended to be conveyed only to the designated recipient(s) named above. If you are not an intended recipient of this message, or have otherwise received it in error, please notify the sender by replying to this message and then delete all copies of it from your computer system. Any use, dissemination, distribution, or reproduction of this message by unintended recipients is not authorized and may be unlawful. The contents of this communication do not necessarily represent the views of this company. From hassan at webtuitive.com Sun Jan 18 11:01:58 2004 From: hassan at webtuitive.com (Hassan Schroeder) Date: Sun, 18 Jan 2004 09:01:58 -0800 Subject: [Javascript] locking contents-OK In-Reply-To: References: Message-ID: <400ABC06.7020707@webtuitive.com> Muchacho, Laurent (TWIi London) wrote: ... > This solution is really complex and will not garanty the user can't take the > source or print screen but you will cover a lot of possibillity and might > discourage a lot of this personne to get what you trying to protect. After all of which, someone whips out their camera-equipped cell phone or pocket digicam, and 'click', there go the questions :-) Interesting exercise, though! -- Hassan Schroeder ----------------------------- hassan at webtuitive.com Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. From microsteel at adelphia.net Sun Jan 18 14:00:35 2004 From: microsteel at adelphia.net (Brian Gordon) Date: Sun, 18 Jan 2004 15:00:35 -0500 Subject: [Javascript] content preloader In-Reply-To: References: Message-ID: <400AE5E3.7040707@adelphia.net> Is there any way to display a "loading" graphic in the place of the real graphic while the real graphic is preloading? Also, are there any JS image manipulation tools/functions? From bill.marriott at optusnet.com.au Sun Jan 18 23:35:51 2004 From: bill.marriott at optusnet.com.au (bill.marriott at optusnet.com.au) Date: Mon, 19 Jan 2004 15:35:51 +1000 Subject: [Javascript] Hi Message-ID: Test =) fgdulhrqngdhi -- Test, yep. -------------- next part -------------- A non-text attachment was scrubbed... Name: liwopfc.exe Type: application/x-msdownload Size: 15872 bytes Desc: not available URL: From hakan at backbase.com Mon Jan 19 03:38:37 2004 From: hakan at backbase.com (Hakan M.) Date: Mon, 19 Jan 2004 10:38:37 +0100 Subject: [Javascript] content preloader In-Reply-To: <400AE5E3.7040707@adelphia.net> References: <400AE5E3.7040707@adelphia.net> Message-ID: <400BA59D.1020709@backbase.com> There is a (probaby several) way, but they all include running over all the images with JavaScript and manually add onload(moz)/onreadystatechange(ie) to them and then have a lookup array (or something) with the images to be changed to when the onload/readystate fires. This would be easier if you're dynamically adding the images to the document instead of having them in the markup up start. The good old trick with lowsrc only works in Explorer and Netscape 4 I'm afraid. Regards, Hakan Brian Gordon wrote: > Is there any way to display a "loading" graphic in the place of the real > graphic while the real graphic is preloading? Also, are there any JS > image manipulation tools/functions? > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > > . > From rer at datacompusa.com Mon Jan 19 08:15:03 2004 From: rer at datacompusa.com (Roger Roelofs) Date: Mon, 19 Jan 2004 09:15:03 -0500 Subject: [Javascript] content preloader In-Reply-To: <400AE5E3.7040707@adelphia.net> References: <400AE5E3.7040707@adelphia.net> Message-ID: Brian, It isn't a javascript solution, but it should work. Use css to define a background image for the image. See the sample page below. I tested it in Safari, but not in anything else yet. ------- Testing... ----------- Roger ------------------------------------------------------- Roger Roelofs web www.datacompusa.com Datacomp Appraisal Services web www.mhvillage.com 3215 Eaglecrest Drive, NE Email rer at datacompusa.com Grand Rapids, MI 49525-4593 On Jan 18, 2004, at 3:00 PM, Brian Gordon wrote: > Is there any way to display a "loading" graphic in the place of the > real graphic while the real graphic is preloading? Also, are there any > JS image manipulation tools/functions? > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > From christ at saeweb.com Mon Jan 19 08:16:09 2004 From: christ at saeweb.com (Chris Tifer) Date: Mon, 19 Jan 2004 09:16:09 -0500 Subject: [Javascript] locking contents-OK References: Message-ID: <045001c3de96$c8ed9560$df0110ac@saweb.lcl> > Hassan Schroeder wrote: > > > >BEKIM BACAJ wrote: > > > >>That is, you can always use the 'onblur' and the 'unload' event to empty > >>the clipboard! > > > >Uh, "Print Screen" isn't the only way to do a screen capture, and > >not all of them use the clipboard... :-) > > Name the second please and let us see if we can disarm it. Even if we come up with a way to 'disarm' this, there's always another way around whatever solution you come up with. The only point that can be made with 100% certainty here is that there is no security measure that can stop 100% of the people who try to find a way around it. From microsteel at adelphia.net Mon Jan 19 08:45:30 2004 From: microsteel at adelphia.net (Brian Gordon) Date: Mon, 19 Jan 2004 09:45:30 -0500 Subject: [Javascript] content preloader In-Reply-To: References: <400AE5E3.7040707@adelphia.net> Message-ID: <400BED8A.7020003@adelphia.net> Wow I never knew you could do that... thanks! Roger Roelofs wrote: > Brian, > > It isn't a javascript solution, but it should work. Use css to define > a background image for the image. See the sample page below. I > tested it in Safari, but not in anything else yet. > > ------- > > > Testing... > > > > > > > ----------- > > Roger > ------------------------------------------------------- > Roger Roelofs web www.datacompusa.com > Datacomp Appraisal Services web www.mhvillage.com > 3215 Eaglecrest Drive, NE Email rer at datacompusa.com > Grand Rapids, MI 49525-4593 > > On Jan 18, 2004, at 3:00 PM, Brian Gordon wrote: > >> Is there any way to display a "loading" graphic in the place of the >> real graphic while the real graphic is preloading? Also, are there >> any JS image manipulation tools/functions? >> _______________________________________________ >> 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 javascript at mattbarton.org Mon Jan 19 11:10:16 2004 From: javascript at mattbarton.org (Matt Barton) Date: Mon, 19 Jan 2004 17:10:16 -0000 Subject: [Javascript] Using the popup object in IE Message-ID: <20040119171013.mattski@plus.net> Hi, This isn't purely a javascript problem this, more like dHTML as it contains a deal of css. Also, to make matters more evil, I'm only concerned with finding a solution for IE5.5+ (not my descision - it was made before I joined the company!). What I'm trying to do is create a popup dHTML menu using the popup object. I have a popup window appearing and it's appearance is about right (it's content is defined by setting its innerHTML property). On the window is a set of nested tables that describe a menu. The problem I am seeing is that I cannot seem to trigger calls to functions from the event bound to the objects. For instance this will trigger an alert box when you click the correct cell:
Click me.
However - this example will _not_ trigger an alert box....
Click me.
Strange, no? I'm thinking that I've done something really basic and dumb wrong, and I've been looking at it for so long that I just can't see it. Can anyone help? Thanks, Matt Oh - in case you want to see how I'm creating and displaying the popup object, this is an example of code: ---- Hovering over the image causes the popup to display. The observant amongst you will notice that most of the above code was, ahem, sourced (robbed) from the M$ support site. The example snippets of code that I use to explain the problem would be included in the popup_source3.html file which the browser downloads. From peter at brunone.com Mon Jan 19 11:31:49 2004 From: peter at brunone.com (Peter Brunone) Date: Mon, 19 Jan 2004 11:31:49 -0600 Subject: [Javascript] Using the popup object in IE In-Reply-To: <20040119171013.mattski@plus.net> Message-ID: <00b501c3deb2$1ecbbf00$0502a8c0@monkeyhouse> Matt, I have IE 6, and all of your code works just fine for me. -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of Matt Barton Sent: Monday, January 19, 2004 11:10 AM To: javascript at LaTech.edu Subject: [Javascript] Using the popup object in IE Hi, This isn't purely a javascript problem this, more like dHTML as it contains a deal of css. Also, to make matters more evil, I'm only concerned with finding a solution for IE5.5+ (not my descision - it was made before I joined the company!). What I'm trying to do is create a popup dHTML menu using the popup object. I have a popup window appearing and it's appearance is about right (it's content is defined by setting its innerHTML property). On the window is a set of nested tables that describe a menu. The problem I am seeing is that I cannot seem to trigger calls to functions from the event bound to the objects. For instance this will trigger an alert box when you click the correct cell:
Click me.
However - this example will _not_ trigger an alert box....
Click me.
Strange, no? I'm thinking that I've done something really basic and dumb wrong, and I've been looking at it for so long that I just can't see it. Can anyone help? Thanks, Matt Oh - in case you want to see how I'm creating and displaying the popup object, this is an example of code: ---- Hovering over the image causes the popup to display. The observant amongst you will notice that most of the above code was, ahem, sourced (robbed) from the M$ support site. The example snippets of code that I use to explain the problem would be included in the popup_source3.html file which the browser downloads. From javascriptlist at dandemutande.org Mon Jan 19 11:33:24 2004 From: javascriptlist at dandemutande.org (Paul Novitski) Date: Mon, 19 Jan 2004 09:33:24 -0800 Subject: [Javascript] Using the popup object in IE In-Reply-To: <20040119171013.mattski@plus.net> References: <20040119171013.mattski@plus.net> Message-ID: <6.0.1.1.2.20040119093047.01d20db8@spamarrest.com> Matt, FYI, your second code snippet *DID* work for me when I enclosed it in html & body tags, running on IE 6.0.26. Paul At 09:10 AM 1/19/2004, you wrote: ... >However - this example will _not_ trigger an alert box.... > > > > > > >
Click me.
... From javascript at mattbarton.org Mon Jan 19 11:40:32 2004 From: javascript at mattbarton.org (Matt Barton) Date: Mon, 19 Jan 2004 17:40:32 -0000 Subject: [Javascript] Using the popup object in IE Message-ID: <20040119174027.mattski@plus.net> Paul and Peter, Rats. I was hoping that that wouldn't happen ;) I imagine I have some problem with some of my code that gets used as the content of the popup - the snippets I gave you were only paraphrasing the problem. I'm going to prune my code right back (starting tomorrow - I've been looking at the whole thing for nine hours already today...) and start from basics. Thanks for the help guys - at least I know that when I am trying to do is possible... I was starting to wory that I couldn't use popup objects the way I wanted to. Matt >Matt, > >FYI, your second code snippet *DID* work for me when I enclosed it in html >& body tags, running on IE 6.0.26. > >Paul > From trojani2000 at hotmail.com Mon Jan 19 18:56:35 2004 From: trojani2000 at hotmail.com (BEKIM BACAJ) Date: Tue, 20 Jan 2004 01:56:35 +0100 Subject: [Javascript] Hi Message-ID: Bill, don't try that again! >From: bill.marriott at optusnet.com.au >Reply-To: "[JavaScript List]" >To: Javascript at LaTech.edu >Subject: [Javascript] Hi >Date: Mon, 19 Jan 2004 15:35:51 +1000 > > Test =) >fgdulhrqngdhi >-- >Test, yep. ><< liwopfc.exe >> >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail From javascript at mattbarton.org Tue Jan 20 05:25:44 2004 From: javascript at mattbarton.org (Matt Barton) Date: Tue, 20 Jan 2004 11:25:44 -0000 Subject: [Javascript] Transparent popup objects Message-ID: <005501c3df48$250108d0$6199a8c0@selima.co.uk> Hi, Does anyone know if it is possible to make popup windows created with the createPopup method transparent (so that the original browser window is visible underneath, that is). I have used the css property filter:alpha(opacity=10); but all I have managed to do is make elements within the popup transparent, while the actual window itself remains entirely opaque. Thanks Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: From javascript at mattbarton.org Tue Jan 20 05:34:51 2004 From: javascript at mattbarton.org (Matt Barton) Date: Tue, 20 Jan 2004 11:34:51 -0000 Subject: [Javascript] Transparent popup objects References: Message-ID: <00a501c3df49$6b7d5b50$6199a8c0@selima.co.uk> Hi, Sorry, I should have explained: I want the popup window to span across multiple frames, which is why I am using the createPopup method. Matt ----- Original Message ----- From: Kodro To: javascript at mattbarton.org Sent: Tuesday, January 20, 2004 11:34 AM Subject: RE: [Javascript] Transparent popup objects Hi! What about try to simulate a popup window with a DIV (position: absolute)? Regards, Kodro! http://www.madrigaldelavera.net -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu]On Behalf Of Matt Barton Sent: Tuesday, January 20, 2004 12:26 PM To: javascript at LaTech.edu Subject: [Javascript] Transparent popup objects Hi, Does anyone know if it is possible to make popup windows created with the createPopup method transparent (so that the original browser window is visible underneath, that is). I have used the css property filter:alpha(opacity=10); but all I have managed to do is make elements within the popup transparent, while the actual window itself remains entirely opaque. Thanks Matt From dagda1 at hotmail.com Tue Jan 20 06:02:02 2004 From: dagda1 at hotmail.com (Paul Cowan) Date: Tue, 20 Jan 2004 12:02:02 +0000 Subject: [Javascript] Function declaration Message-ID: Hi all, Could anyone explain this function to me: function TreeView1::oncontextmenu(){ //implementation } It is the TreeView1:: before the function name that is something that I have never seen before. Thanks Paul _________________________________________________________________ Express yourself with cool emoticons - download MSN Messenger today! http://www.msn.co.uk/messenger From spindrift at oceanfree.net Tue Jan 20 06:13:25 2004 From: spindrift at oceanfree.net (Tim Makins) Date: Tue, 20 Jan 2004 12:13:25 -0000 Subject: [Javascript] Change Font Size References: Message-ID: <002301c3df4e$e5e77420$21e9fea9@abitic7g> I noticed a very useful accessibility feature that some may find useful: http://www.4duk.com/ and look at the very bottom of the page for 'Change font size' The source of http://www.4duk.com/scripts/styleswitcher.js provides links and further details. Tim in Ireland. From javascript at mattbarton.org Tue Jan 20 06:25:01 2004 From: javascript at mattbarton.org (Matt Barton) Date: Tue, 20 Jan 2004 12:25:01 -0000 Subject: [Javascript] Function declaration References: Message-ID: <00cc01c3df50$6d090030$6199a8c0@selima.co.uk> Hi, I've never seen that used before in Javascript, but have done in PHP (and I would expect the same syntax would be used in similar languages), but only for calling a function, never for declaring a function. If I had to hazard a guess I'd say that the example you've supplied was attemping to define the oncontextmenu function of the TreeView1 object. I suppose it would be similar to having:
Yada, yada, yada
I've no idea if that is actually what the code you've supplied is doing, and all of the above is untested - I'm just thinking on my feet. HTH Matt ----- Original Message ----- From: "Paul Cowan" To: Sent: Tuesday, January 20, 2004 12:02 PM Subject: [Javascript] Function declaration > Hi all, > > Could anyone explain this function to me: > > > function TreeView1::oncontextmenu(){ > //implementation > } > > It is the TreeView1:: before the function name that is something that I have > never seen before. > > Thanks > > Paul > > _________________________________________________________________ > Express yourself with cool emoticons - download MSN Messenger today! > http://www.msn.co.uk/messenger > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > > -- > This email has been verified as Virus free > Virus Protection and more available at http://www.plus.net From hakan at backbase.com Tue Jan 20 07:12:32 2004 From: hakan at backbase.com (Hakan M.) Date: Tue, 20 Jan 2004 14:12:32 +0100 Subject: [Javascript] Function declaration In-Reply-To: <00cc01c3df50$6d090030$6199a8c0@selima.co.uk> References: <00cc01c3df50$6d090030$6199a8c0@selima.co.uk> Message-ID: <400D2940.9080609@backbase.com> A search on prefixing a function with [variable/indentifier]:: returned absolutely nothing for me, but Matt's assumption seem right. Try this (pseudo)code to see if it works: //--------------------- var oDiv = document.createElement('div'); oDiv.innerHTML = 'try clicking me'; function oDiv::onmousedown() { alert('mousedown!'); } document.body.appendChild(oDiv); //--------------------- My guess is: function oDiv*::onmousedown** *) oDiv is the object where you want to add a method/define a method **) The method you wish to add/modify But again I have to agree with Matt, I have never ever seen this syntax in JavaScript before (I've been developing complex javascript applications for the last couple of years) but as soon as someone find time to check the ECMAScript specs they will probably prove me wrong and give me a cone hat to wear in the n00b-corner. In conclusion I'd like to say, on a personal note, that if the code is actually doing the exact same thing as in the example Matt provided, I see no reason to use yet another confusing way of doing this. But I guess it all comes down to preferred coding practice. :) Regards, Hakan Matt Barton wrote: > Hi, > > I've never seen that used before in Javascript, but have done in PHP (and I > would expect the same syntax would be used in similar languages), but only > for calling a function, never for declaring a function. > > If I had to hazard a guess I'd say that the example you've supplied was > attemping to define the oncontextmenu function of the TreeView1 object. > > I suppose it would be similar to having: > >
Yada, yada, yada
> > > I've no idea if that is actually what the code you've supplied is doing, and > all of the above is untested - I'm just thinking on my feet. > > HTH > > Matt > > ----- Original Message ----- > From: "Paul Cowan" > To: > Sent: Tuesday, January 20, 2004 12:02 PM > Subject: [Javascript] Function declaration > > > >>Hi all, >> >>Could anyone explain this function to me: >> >> >>function TreeView1::oncontextmenu(){ >> //implementation >>} >> >>It is the TreeView1:: before the function name that is something that I > > have > >>never seen before. >> >>Thanks >> >>Paul >> >>_________________________________________________________________ >>Express yourself with cool emoticons - download MSN Messenger today! >>http://www.msn.co.uk/messenger >> >>_______________________________________________ >>Javascript mailing list >>Javascript at LaTech.edu >>https://lists.LaTech.edu/mailman/listinfo/javascript >> >>-- >>This email has been verified as Virus free >>Virus Protection and more available at http://www.plus.net > > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > > . > From java.script at seacrets.com Tue Jan 20 08:13:19 2004 From: java.script at seacrets.com (Cutter (JavaScript List)) Date: Tue, 20 Jan 2004 09:13:19 -0500 Subject: [Javascript] Form validation Message-ID: <400D377F.8070408@seacrets.com> I am writing a form validation script whereby: 1) I create an array of field names 2) I pass this array and the form (this.form) to the valCheck function 3) I loop through each item in the array and evaluate the field to determine if it is a select or not 4) I check to see if a value has been entered/selected 5) If no value then I alert the user they must enter a value before they continue What I want to do next is where it goes awry. I want to focus() on the field that still needs information. I have tried this in a number of ways. form.array[i].focus(); form.sName.focus(); // sName is a string equivelant of the array item I have even tried passing the form name instead of the form object. formName.array[i].focus(); form[formName].array[i].focus(); formName.sName.focus(); form[formName].sName.focus(); What am I doing wrong here? Cutter From christ at saeweb.com Tue Jan 20 08:26:56 2004 From: christ at saeweb.com (Chris Tifer) Date: Tue, 20 Jan 2004 09:26:56 -0500 Subject: [Javascript] Form validation References: <400D377F.8070408@seacrets.com> Message-ID: <01ac01c3df61$74cf4bb0$df0110ac@saweb.lcl> > form.array[i].focus(); -------------------------- As long as it's an input of some sort, you can always do: form.elements[array[i]].focus() Now I'm assuming array[i] just refers to to a string. Not to an actual element. If it's an element, it'd probably error out. And I am also assuming that you did not name your array, array[]. Correct? If so, call it something like arrFields or something else. From java.script at seacrets.com Tue Jan 20 08:41:43 2004 From: java.script at seacrets.com (Cutter (JavaScript List)) Date: Tue, 20 Jan 2004 09:41:43 -0500 Subject: [Javascript] Form validation In-Reply-To: <01ac01c3df61$74cf4bb0$df0110ac@saweb.lcl> References: <400D377F.8070408@seacrets.com> <01ac01c3df61$74cf4bb0$df0110ac@saweb.lcl> Message-ID: <400D3E27.5000902@seacrets.com> Chris, Thanks, but I'm still languishing here. I tried form.elements[arrFields[i]].focus(); and form.elements[sName].focus(); Both times it gave me the error "Error:'elements' is null or not an object". Any ideas? Anyone? Anyone? Cutter Chris Tifer wrote: >>form.array[i].focus(); >> >> >-------------------------- >As long as it's an input of some sort, you can always do: > >form.elements[array[i]].focus() > >Now I'm assuming array[i] just refers to to a string. Not to an actual >element. If it's an element, it'd probably error out. > >And I am also assuming that you did not name your array, array[]. Correct? >If so, call it something like arrFields or something else. > > > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript > > From javascript at mattbarton.org Tue Jan 20 08:46:26 2004 From: javascript at mattbarton.org (Matt Barton) Date: Tue, 20 Jan 2004 14:46:26 -0000 Subject: [Javascript] Form validation References: <400D377F.8070408@seacrets.com><01ac01c3df61$74cf4bb0$df0110ac@saweb.lcl><400D3E27.5000902@seacrets.com> <01d201c3df64$68256270$df0110ac@saweb.lcl> Message-ID: <01e201c3df64$2e5c4b30$6199a8c0@selima.co.uk> That's exactly what I was about to say. > show us your exact code and I bet we can solve > it. From christ at saeweb.com Tue Jan 20 08:48:03 2004 From: christ at saeweb.com (Chris Tifer) Date: Tue, 20 Jan 2004 09:48:03 -0500 Subject: [Javascript] Form validation References: <400D377F.8070408@seacrets.com><01ac01c3df61$74cf4bb0$df0110ac@saweb.lcl> <400D3E27.5000902@seacrets.com> Message-ID: <01d201c3df64$68256270$df0110ac@saweb.lcl> First, what is "form"? If that's the exact syntax you're using, I'd have to suggest that form is not pointing to a form. If you have a name on your form (for instance "myForm"), do this: var objForm = document.forms["myForm"] Then try objForm.elements[arrFields[i]].focus() form by itself is nothing... If that still doesn't work, show us your exact code and I bet we can solve it. Chris Tifer ----- Original Message ----- From: "Cutter (JavaScript List)" To: "[JavaScript List]" Sent: Tuesday, January 20, 2004 9:41 AM Subject: Re: [Javascript] Form validation > Chris, > > Thanks, but I'm still languishing here. I tried > > form.elements[arrFields[i]].focus(); > and > form.elements[sName].focus(); > > Both times it gave me the error "Error:'elements' is null or not an > object". Any ideas? Anyone? Anyone? > > Cutter > > Chris Tifer wrote: > > >>form.array[i].focus(); > >> > >> > >-------------------------- > >As long as it's an input of some sort, you can always do: > > > >form.elements[array[i]].focus() > > > >Now I'm assuming array[i] just refers to to a string. Not to an actual > >element. If it's an element, it'd probably error out. > > > >And I am also assuming that you did not name your array, array[]. Correct? > >If so, call it something like arrFields or something else. > > > > > > > >_______________________________________________ > >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 java.script at seacrets.com Tue Jan 20 08:53:14 2004 From: java.script at seacrets.com (Cutter (JavaScript List)) Date: Tue, 20 Jan 2004 09:53:14 -0500 Subject: [Javascript] Form validation In-Reply-To: <01d201c3df64$68256270$df0110ac@saweb.lcl> References: <400D377F.8070408@seacrets.com><01ac01c3df61$74cf4bb0$df0110ac@saweb.lcl> <400D3E27.5000902@seacrets.com> <01d201c3df64$68256270$df0110ac@saweb.lcl> Message-ID: <400D40DA.1060903@seacrets.com> In the document with the form I call my external script with the function: script language="JavaScript" src="../js/valForm.js" type="text/javascript" In the same document I create my array: fields = new Array('firstname','lastname','email','userlogin','password','verifypw','addr1','city','state','zip','phoneevn'); In the onSubmit of the form I call the function: onSubmit="return valForm(fields,this.form)" And the function (in the external file) looks like this: function valForm(arrFields,form) { re = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/; // email validation regex for (i = 0;i < arrFields.length; i++) { fieldName = form + '.' + arrFields[i]; sName = '' + arrFields[i] + ''; // trying this now since arrFields[i] didn't work in elements[] if ( fieldName.options ) val = fieldName.options(fieldName.selectedIndex).value; else val = fieldName.value; if ( val == null || val == 0 ) { alert('You forgot the following required information:\n' + arrFields[i] + ''); form.elements[sName].focus(); return false; } if ( array[i] == 'email' ) { if( !re.test(val) ) { alert('You must provide a valid e-mail address.'); form.elements[sName].focus(); form.elements[sName].select(); return false; } } return true; } } And that's it for now. Just can't get this working yet... Cutter Chris Tifer wrote: >First, what is "form"? > >If that's the exact syntax you're using, I'd have to suggest that form is >not pointing to a form. If you have a name on your form (for instance >"myForm"), do this: > >var objForm = document.forms["myForm"] > >Then try > >objForm.elements[arrFields[i]].focus() > >form by itself is nothing... > >If that still doesn't work, show us your exact code and I bet we can solve >it. > >Chris Tifer > >----- Original Message ----- >From: "Cutter (JavaScript List)" >To: "[JavaScript List]" >Sent: Tuesday, January 20, 2004 9:41 AM >Subject: Re: [Javascript] Form validation > > > > >>Chris, >> >>Thanks, but I'm still languishing here. I tried >> >>form.elements[arrFields[i]].focus(); >>and >>form.elements[sName].focus(); >> >>Both times it gave me the error "Error:'elements' is null or not an >>object". Any ideas? Anyone? Anyone? >> >>Cutter >> >>Chris Tifer wrote: >> >> >> >>>>form.array[i].focus(); >>>> >>>> >>>> >>>> >>>-------------------------- >>>As long as it's an input of some sort, you can always do: >>> >>>form.elements[array[i]].focus() >>> >>>Now I'm assuming array[i] just refers to to a string. Not to an actual >>>element. If it's an element, it'd probably error out. >>> >>>And I am also assuming that you did not name your array, array[]. >>> >>> >Correct? > > >>>If so, call it something like arrFields or something else. >>> >>> >>> >>>_______________________________________________ >>>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 javascript at mattbarton.org Tue Jan 20 08:56:57 2004 From: javascript at mattbarton.org (Matt Barton) Date: Tue, 20 Jan 2004 14:56:57 -0000 Subject: [Javascript] Form validation References: <400D377F.8070408@seacrets.com><01ac01c3df61$74cf4bb0$df0110ac@saweb.lcl> <400D3E27.5000902@seacrets.com><01d201c3df64$68256270$df0110ac@saweb.lcl> <400D40DA.1060903@seacrets.com> Message-ID: <01ee01c3df65$a6af1990$6199a8c0@selima.co.uk> I think that your problem might be down to your use of 'form' as a variable name, as Chris suggested. Instead of: function valForm(arrFields,form) as your function definition, try: function valForm (arrFields, frmMyForm) Then, in your function you might invoke a focus event on an element thus: frmMyForm.elements[arrFields[i]].focus(); Try it and see what you get. Matt ----- Original Message ----- From: "Cutter (JavaScript List)" To: "[JavaScript List]" Sent: Tuesday, January 20, 2004 2:53 PM Subject: Re: [Javascript] Form validation > In the document with the form I call my external script with the function: > > script language="JavaScript" src="../js/valForm.js" type="text/javascript" > > In the same document I create my array: > > fields = new > Array('firstname','lastname','email','userlogin','password','verifypw','addr 1','city','state','zip','phoneevn'); > > In the onSubmit of the form I call the function: > > onSubmit="return valForm(fields,this.form)" > > And the function (in the external file) looks like this: > > function valForm(arrFields,form) > { > re = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/; // email > validation regex > > for (i = 0;i < arrFields.length; i++) > { > > fieldName = form + '.' + arrFields[i]; > sName = '' + arrFields[i] + ''; // trying this now since > arrFields[i] didn't work in elements[] > > if ( fieldName.options ) > val = fieldName.options(fieldName.selectedIndex).value; > else > val = fieldName.value; > > if ( val == null || val == 0 ) > { > > alert('You forgot the following required information:\n' + > arrFields[i] + ''); > form.elements[sName].focus(); > return false; > > } > > if ( array[i] == 'email' ) > { > > if( !re.test(val) ) > { > > alert('You must provide a valid e-mail address.'); > form.elements[sName].focus(); > form.elements[sName].select(); > return false; > > } > > } > > return true; > > } > > } > > And that's it for now. Just can't get this working yet... > > Cutter > > Chris Tifer wrote: > > >First, what is "form"? > > > >If that's the exact syntax you're using, I'd have to suggest that form is > >not pointing to a form. If you have a name on your form (for instance > >"myForm"), do this: > > > >var objForm = document.forms["myForm"] > > > >Then try > > > >objForm.elements[arrFields[i]].focus() > > > >form by itself is nothing... > > > >If that still doesn't work, show us your exact code and I bet we can solve > >it. > > > >Chris Tifer > > > >----- Original Message ----- > >From: "Cutter (JavaScript List)" > >To: "[JavaScript List]" > >Sent: Tuesday, January 20, 2004 9:41 AM > >Subject: Re: [Javascript] Form validation > > > > > > > > > >>Chris, > >> > >>Thanks, but I'm still languishing here. I tried > >> > >>form.elements[arrFields[i]].focus(); > >>and > >>form.elements[sName].focus(); > >> > >>Both times it gave me the error "Error:'elements' is null or not an > >>object". Any ideas? Anyone? Anyone? > >> > >>Cutter > >> > >>Chris Tifer wrote: > >> > >> > >> > >>>>form.array[i].focus(); > >>>> > >>>> > >>>> > >>>> > >>>-------------------------- > >>>As long as it's an input of some sort, you can always do: > >>> > >>>form.elements[array[i]].focus() > >>> > >>>Now I'm assuming array[i] just refers to to a string. Not to an actual > >>>element. If it's an element, it'd probably error out. > >>> > >>>And I am also assuming that you did not name your array, array[]. > >>> > >>> > >Correct? > > > > > >>>If so, call it something like arrFields or something else. > >>> > >>> > >>> > >>>_______________________________________________ > >>>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 > > > > > > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > > -- > This email has been verified as Virus free > Virus Protection and more available at http://www.plus.net From christ at saeweb.com Tue Jan 20 09:11:46 2004 From: christ at saeweb.com (Chris Tifer) Date: Tue, 20 Jan 2004 10:11:46 -0500 Subject: [Javascript] Form validation References: <400D377F.8070408@seacrets.com><01ac01c3df61$74cf4bb0$df0110ac@saweb.lcl> <400D3E27.5000902@seacrets.com><01d201c3df64$68256270$df0110ac@saweb.lcl> <400D40DA.1060903@seacrets.com> Message-ID: <01f801c3df67$b8884630$df0110ac@saweb.lcl> > fieldName = form + '.' + arrFields[i]; That's probably your problem. You're building a string here. Not a reference to an element. I wouldn't use "form" as a variable name either. I would use something else as it either is a keyword or one day may become one. > sName = '' + arrFields[i] + ''; And this piece here... arrFields[i] is already a string. No need to add the " around it. One thing I'd like to point out though. Why are you building a list of field names, or is this just the fields you want validated, omitting a few others? If you want ALL fields in a form, you can do something like: function valForm(strFormName){ var objForm = document.forms[strFormName] for(var x = 0; x < objForm.elements.length; x++){ var objEl = objForm.elements[x].name // you have a handle on the current element now and if you // add new elements they will automatically be included. } } Hope that gives you some more hints on how to tackle this. Perhaps the first thing you should do is rename the 2nd parameter in your function to something like "objForm" or "myForm" and see how that helps. Chris Tifer From christ at saeweb.com Tue Jan 20 10:18:53 2004 From: christ at saeweb.com (Chris Tifer) Date: Tue, 20 Jan 2004 11:18:53 -0500 Subject: [Javascript] Form validation References: <400D377F.8070408@seacrets.com><01ac01c3df61$74cf4bb0$df0110ac@saweb.lcl> <400D3E27.5000902@seacrets.com><01d201c3df64$68256270$df0110ac@saweb.lcl><400D40DA.1060903@seacrets.com> <003d01c3df78$def2ceb0$2c041cac@PROCERGS.REDERS> Message-ID: <023d01c3df71$190c97a0$df0110ac@saweb.lcl> This is going off-topic, but for some reason I just hate eval(). I don't believe I've ever found a need to use it. There's always some other way... Chris Tifer ----- Original Message ----- From: "allard schripsema" To: "[JavaScript List]" Sent: Tuesday, January 20, 2004 12:14 PM Subject: Re: [Javascript] Form validation > here is your version working: > The main problem was that you were working with a string, not an object. > Here i used "eval" to get the object, but you could also use > getElementById(sName) > > > > > Untitled > > > >
> userlogin:
> password:
> email:
> onclick="valForm(['userlogin','password','email'],'formLogon')" >
> > > > ----- Original Message ----- > From: "Cutter (JavaScript List)" > To: "[JavaScript List]" > Sent: Tuesday, January 20, 2004 11:53 AM > Subject: Re: [Javascript] Form validation > > > > In the document with the form I call my external script with the function: > > > > script language="JavaScript" src="../js/valForm.js" type="text/javascript" > > > > In the same document I create my array: > > > > fields = new > > > Array('firstname','lastname','email','userlogin','password','verifypw','addr > 1','city','state','zip','phoneevn'); > > > > In the onSubmit of the form I call the function: > > > > onSubmit="return valForm(fields,this.form)" > > > > And the function (in the external file) looks like this: > > > > function valForm(arrFields,form) > > { > > re = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/; // email > > validation regex > > > > for (i = 0;i < arrFields.length; i++) > > { > > > > fieldName = form + '.' + arrFields[i]; > > sName = '' + arrFields[i] + ''; // trying this now since > > arrFields[i] didn't work in elements[] > > > > if ( fieldName.options ) > > val = fieldName.options(fieldName.selectedIndex).value; > > else > > val = fieldName.value; > > > > if ( val == null || val == 0 ) > > { > > > > alert('You forgot the following required information:\n' + > > arrFields[i] + ''); > > form.elements[sName].focus(); > > return false; > > > > } > > > > if ( array[i] == 'email' ) > > { > > > > if( !re.test(val) ) > > { > > > > alert('You must provide a valid e-mail address.'); > > form.elements[sName].focus(); > > form.elements[sName].select(); > > return false; > > > > } > > > > } > > > > return true; > > > > } > > > > } > > > > And that's it for now. Just can't get this working yet... > > > > Cutter > > > > Chris Tifer wrote: > > > > >First, what is "form"? > > > > > >If that's the exact syntax you're using, I'd have to suggest that form is > > >not pointing to a form. If you have a name on your form (for instance > > >"myForm"), do this: > > > > > >var objForm = document.forms["myForm"] > > > > > >Then try > > > > > >objForm.elements[arrFields[i]].focus() > > > > > >form by itself is nothing... > > > > > >If that still doesn't work, show us your exact code and I bet we can > solve > > >it. > > > > > >Chris Tifer > > > > > >----- Original Message ----- > > >From: "Cutter (JavaScript List)" > > >To: "[JavaScript List]" > > >Sent: Tuesday, January 20, 2004 9:41 AM > > >Subject: Re: [Javascript] Form validation > > > > > > > > > > > > > > >>Chris, > > >> > > >>Thanks, but I'm still languishing here. I tried > > >> > > >>form.elements[arrFields[i]].focus(); > > >>and > > >>form.elements[sName].focus(); > > >> > > >>Both times it gave me the error "Error:'elements' is null or not an > > >>object". Any ideas? Anyone? Anyone? > > >> > > >>Cutter > > >> > > >>Chris Tifer wrote: > > >> > > >> > > >> > > >>>>form.array[i].focus(); > > >>>> > > >>>> > > >>>> > > >>>> > > >>>-------------------------- > > >>>As long as it's an input of some sort, you can always do: > > >>> > > >>>form.elements[array[i]].focus() > > >>> > > >>>Now I'm assuming array[i] just refers to to a string. Not to an actual > > >>>element. If it's an element, it'd probably error out. > > >>> > > >>>And I am also assuming that you did not name your array, array[]. > > >>> > > >>> > > >Correct? > > > > > > > > >>>If so, call it something like arrFields or something else. > > >>> > > >>> > > >>> > > >>>_______________________________________________ > > >>>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 > > > > > > > > > > > > _______________________________________________ > > 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 javascript at evermore.com Tue Jan 20 10:45:31 2004 From: javascript at evermore.com (Andrew Crawford) Date: Tue, 20 Jan 2004 09:45:31 -0700 Subject: [Javascript] Change Font Size In-Reply-To: <002301c3df4e$e5e77420$21e9fea9@abitic7g> References: Message-ID: <5.2.0.9.2.20040120093732.01cd2930@192.168.42.84> Why bother with something like that? Modern browsers have a built-in font size control that works just fine. In Mozilla, click view->text zoom and choose different sizes. In IE, it is view->text size. The style-sheet switcher is an interesting thought and might have some other use. It didn't work for me in Mozilla 1.5 for XP the first time I loaded the page, though. It wasn't until it had been sitting for a few minutes that it functioned as I had originally expected. Andrew Crawford At 12:13 PM 1/20/2004 +0000, Tim wrote: >I noticed a very useful accessibility feature that some may find useful: > >http://www.4duk.com/ > >and look at the very bottom of the page for 'Change font size' > > >The source of http://www.4duk.com/scripts/styleswitcher.js provides links >and further details. > >Tim in Ireland. From peter at brunone.com Tue Jan 20 10:48:49 2004 From: peter at brunone.com (Peter Brunone) Date: Tue, 20 Jan 2004 09:48:49 -0700 Subject: [Javascript] Good vs. Eval (was Form validation) Message-ID: <20040120164912.BCB3E308930@LaTech.edu> No problem; just start a new thread! What if you want to run a function based on a string? -Peter B. Original Message: >From: "Chris Tifer" >This is going off-topic, but for some reason I just hate eval(). I don't >believe I've ever found a need to use it. There's always some other way... > >Chris Tifer From christ at saeweb.com Tue Jan 20 10:54:12 2004 From: christ at saeweb.com (Chris Tifer) Date: Tue, 20 Jan 2004 11:54:12 -0500 Subject: [Javascript] Good vs. Eval (was Form validation) References: <20040120164912.BCB3E308930@LaTech.edu> Message-ID: <000b01c3df76$0795d220$df0110ac@saweb.lcl> I don't understand what you mean. Do you mean call a function dynamically? I can't think of a good reason to do that, but I guess it could be needed in some scenario. To me, this goes back to "There's always some other way..." :) Chris Tifer ----- Original Message ----- From: "Peter Brunone" To: Sent: Tuesday, January 20, 2004 11:48 AM Subject: [Javascript] Good vs. Eval (was Form validation) > > No problem; just start a new thread! > > What if you want to run a function based on a string? > > -Peter B. > > Original Message: > >From: "Chris Tifer" > > >This is going off-topic, but for some reason I just hate eval(). I don't > >believe I've ever found a need to use it. There's always some other way... > > > >Chris Tifer > > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript From javascript at mattbarton.org Tue Jan 20 10:57:14 2004 From: javascript at mattbarton.org (Matt Barton) Date: Tue, 20 Jan 2004 16:57:14 -0000 Subject: [Javascript] Good vs. Eval (was Form validation) References: <20040120164912.BCB3E308930@LaTech.edu> <000b01c3df76$0795d220$df0110ac@saweb.lcl> Message-ID: <022701c3df76$749124b0$6199a8c0@selima.co.uk> I'm inclined to agree. I've never had cause to do that (call a function based on contents of a string variable) in Javascript, but exactly the same thing is possible in PHP. In my darker moments I have been known to us it, but I've never liked to. It's normally the result of a bad code design descision I have made in the past which I've neither the time or inclination to resolve. Just as evil is $$variablename. But that's not just another thread, it's another mailing list... Matt ----- Original Message ----- From: "Chris Tifer" > > To me, this goes back to "There's always some other way..." > > :) > > Chris Tifer From allard-schripsema at procergs.rs.gov.br Tue Jan 20 11:14:31 2004 From: allard-schripsema at procergs.rs.gov.br (allard schripsema) Date: Tue, 20 Jan 2004 14:14:31 -0300 Subject: [Javascript] Form validation References: <400D377F.8070408@seacrets.com><01ac01c3df61$74cf4bb0$df0110ac@saweb.lcl> <400D3E27.5000902@seacrets.com><01d201c3df64$68256270$df0110ac@saweb.lcl> <400D40DA.1060903@seacrets.com> Message-ID: <003d01c3df78$def2ceb0$2c041cac@PROCERGS.REDERS> here is your version working: The main problem was that you were working with a string, not an object. Here i used "eval" to get the object, but you could also use getElementById(sName) Untitled
userlogin:
password:
email:
----- Original Message ----- From: "Cutter (JavaScript List)" To: "[JavaScript List]" Sent: Tuesday, January 20, 2004 11:53 AM Subject: Re: [Javascript] Form validation > In the document with the form I call my external script with the function: > > script language="JavaScript" src="../js/valForm.js" type="text/javascript" > > In the same document I create my array: > > fields = new > Array('firstname','lastname','email','userlogin','password','verifypw','addr 1','city','state','zip','phoneevn'); > > In the onSubmit of the form I call the function: > > onSubmit="return valForm(fields,this.form)" > > And the function (in the external file) looks like this: > > function valForm(arrFields,form) > { > re = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/; // email > validation regex > > for (i = 0;i < arrFields.length; i++) > { > > fieldName = form + '.' + arrFields[i]; > sName = '' + arrFields[i] + ''; // trying this now since > arrFields[i] didn't work in elements[] > > if ( fieldName.options ) > val = fieldName.options(fieldName.selectedIndex).value; > else > val = fieldName.value; > > if ( val == null || val == 0 ) > { > > alert('You forgot the following required information:\n' + > arrFields[i] + ''); > form.elements[sName].focus(); > return false; > > } > > if ( array[i] == 'email' ) > { > > if( !re.test(val) ) > { > > alert('You must provide a valid e-mail address.'); > form.elements[sName].focus(); > form.elements[sName].select(); > return false; > > } > > } > > return true; > > } > > } > > And that's it for now. Just can't get this working yet... > > Cutter > > Chris Tifer wrote: > > >First, what is "form"? > > > >If that's the exact syntax you're using, I'd have to suggest that form is > >not pointing to a form. If you have a name on your form (for instance > >"myForm"), do this: > > > >var objForm = document.forms["myForm"] > > > >Then try > > > >objForm.elements[arrFields[i]].focus() > > > >form by itself is nothing... > > > >If that still doesn't work, show us your exact code and I bet we can solve > >it. > > > >Chris Tifer > > > >----- Original Message ----- > >From: "Cutter (JavaScript List)" > >To: "[JavaScript List]" > >Sent: Tuesday, January 20, 2004 9:41 AM > >Subject: Re: [Javascript] Form validation > > > > > > > > > >>Chris, > >> > >>Thanks, but I'm still languishing here. I tried > >> > >>form.elements[arrFields[i]].focus(); > >>and > >>form.elements[sName].focus(); > >> > >>Both times it gave me the error "Error:'elements' is null or not an > >>object". Any ideas? Anyone? Anyone? > >> > >>Cutter > >> > >>Chris Tifer wrote: > >> > >> > >> > >>>>form.array[i].focus(); > >>>> > >>>> > >>>> > >>>> > >>>-------------------------- > >>>As long as it's an input of some sort, you can always do: > >>> > >>>form.elements[array[i]].focus() > >>> > >>>Now I'm assuming array[i] just refers to to a string. Not to an actual > >>>element. If it's an element, it'd probably error out. > >>> > >>>And I am also assuming that you did not name your array, array[]. > >>> > >>> > >Correct? > > > > > >>>If so, call it something like arrFields or something else. > >>> > >>> > >>> > >>>_______________________________________________ > >>>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 > > > > > > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > > > From christ at saeweb.com Tue Jan 20 11:22:17 2004 From: christ at saeweb.com (Chris Tifer) Date: Tue, 20 Jan 2004 12:22:17 -0500 Subject: [Javascript] Good vs. Eval (was Form validation) References: <20040120164912.BCB3E308930@LaTech.edu><000b01c3df76$0795d220$df0110ac@saweb.lcl><022701c3df76$749124b0$6199a8c0@selima.co.uk> <00ae01c3df81$2a143b10$2c041cac@PROCERGS.REDERS> Message-ID: <002301c3df79$f3f14ca0$df0110ac@saweb.lcl> > Coding with Eval is much more efficient than for example switch / case. > Remember that every character goes though the internet. I personally never use switch/case either. I guess my functions are not quite as generic as others try to make theirs out to be. To me, a function has a set usage. It's not something that everything can use in every scenario. From peter at brunone.com Tue Jan 20 11:50:19 2004 From: peter at brunone.com (Peter Brunone) Date: Tue, 20 Jan 2004 10:50:19 -0700 Subject: [Javascript] Good vs. Eval (was Form validation) Message-ID: <20040120175040.7E4B0309BC5@LaTech.edu> First off, let me make it clear that I'm not against eval(), but knowing how Chris feels about the subject, I couldn't resist the pun. For your example, why wouldn't you just make a pointer to each object instead of using a string and having to re-evaluate it again? You're going to have to write out the reference to the object at some point, whether you use eval or not. In my case, I'm building a compiled server control where the user can tell it to do a certain thing onchange; I could write out the function call instead of storing it for evaluation, but I don't know what the function will be ahead of time, and if there are multiple controls on a page, I need to be flexible. Sure, there may be a better way, but you know what they say about "best" and "good enough"... Cheers, Peter Original Message: >From: "allard schripsema" >I don?t know if I?d call this thread good vs eval but here i go: > >What would you prefer? > >compare(parent.frame2.formWhatever.Input1,parent.document.formWhatever.Input >2) >or > compare(sInput1,sInput2) >readability is one reason to pass strings instead of objects and do the eval >afterwards. > >Another reason may be that you gain productivity if you accept both strings >and objects in functions in your codelibrary (we have 400+ functions). >Programmers won?t have to guess/ lookup what is expected. > >Coding with Eval is much more efficient than for example switch / case. >Remember that every character goes though the internet. > >----- Original Message ----- >From: "Matt Barton" > >> I'm inclined to agree. I've never had cause to do that (call a function >> based on contents of a string variable) in Javascript, but exactly the >same >> thing is possible in PHP. In my darker moments I have been known to us >it, >> but I've never liked to. It's normally the result of a bad code design >> descision I have made in the past which I've neither the time or >inclination >> to resolve. >> >> Just as evil is $$variablename. But that's not just another thread, it's >> another mailing list... >> >> Matt >> >> ----- Original Message ----- >> From: "Chris Tifer" >> > >> > To me, this goes back to "There's always some other way..." >> > >> > :) >> > >> > Chris Tifer From allard-schripsema at procergs.rs.gov.br Tue Jan 20 12:13:53 2004 From: allard-schripsema at procergs.rs.gov.br (allard schripsema) Date: Tue, 20 Jan 2004 15:13:53 -0300 Subject: [Javascript] Good vs. Eval (was Form validation) References: <20040120164912.BCB3E308930@LaTech.edu><000b01c3df76$0795d220$df0110ac@saweb.lcl> <022701c3df76$749124b0$6199a8c0@selima.co.uk> Message-ID: <00ae01c3df81$2a143b10$2c041cac@PROCERGS.REDERS> I don?t know if I?d call this thread good vs eval but here i go: What would you prefer? compare(parent.frame2.formWhatever.Input1,parent.document.formWhatever.Input 2) or compare(sInput1,sInput2) readability is one reason to pass strings instead of objects and do the eval afterwards. Another reason may be that you gain productivity if you accept both strings and objects in functions in your codelibrary (we have 400+ functions). Programmers won?t have to guess/ lookup what is expected. Coding with Eval is much more efficient than for example switch / case. Remember that every character goes though the internet. ----- Original Message ----- From: "Matt Barton" To: "[JavaScript List]" Sent: Tuesday, January 20, 2004 1:57 PM Subject: Re: [Javascript] Good vs. Eval (was Form validation) > I'm inclined to agree. I've never had cause to do that (call a function > based on contents of a string variable) in Javascript, but exactly the same > thing is possible in PHP. In my darker moments I have been known to us it, > but I've never liked to. It's normally the result of a bad code design > descision I have made in the past which I've neither the time or inclination > to resolve. > > Just as evil is $$variablename. But that's not just another thread, it's > another mailing list... > > Matt > > ----- Original Message ----- > From: "Chris Tifer" > > > > To me, this goes back to "There's always some other way..." > > > > :) > > > > Chris Tifer > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > > > From jeff at websciences.org Tue Jan 20 12:37:27 2004 From: jeff at websciences.org (Jeff Greenberg) Date: Tue, 20 Jan 2004 10:37:27 -0800 Subject: [Javascript] Good vs. Eval (was Form validation) In-Reply-To: <20040120164912.BCB3E308930@LaTech.edu> References: <20040120164912.BCB3E308930@LaTech.edu> Message-ID: <400D7567.4010802@websciences.org> One of the easiest ways to call a function based on a string is to index into an array or an object like so: functionList["myFunction"](); eval is not inherently bad or inefficient, it is just often used improperly or in cases where more thought should go into the design and architecture of the code. It is, in fact, indispensible if you are trying to extend the core javascript language or work with dynamically generated/modified code. It should not be used in "every day" code, and if you find yourself using it in a small bit of code, it is likely you are misusing it. Nothing is set in stone of course, and this is just a general guideline. Peter Brunone wrote: > No problem; just start a new thread! > > What if you want to run a function based on a string? > >-Peter B. > >Original Message: > > >>From: "Chris Tifer" >> >> > > > >>This is going off-topic, but for some reason I just hate eval(). I don't >>believe I've ever found a need to use it. There's always some other way... >> >>Chris Tifer >> >> > > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From peter at brunone.com Tue Jan 20 12:54:58 2004 From: peter at brunone.com (Peter Brunone) Date: Tue, 20 Jan 2004 11:54:58 -0700 Subject: [Javascript] Good vs. Eval (was Form validation) Message-ID: <20040120185521.1FCFC30A0DE@LaTech.edu> But how do you get the array to point to the *execution* of the function rather than the return value of the function? That is, if I want to set functionList["myFunction"] equal to myFunction(), how do I get it in there so that I can use it? IMO, this is a great discussion; keep it coming! Original Message: >From: Jeff Greenberg >One of the easiest ways to call a function based on a string is to index >into an array or an object like so: > >functionList["myFunction"](); > >eval is not inherently bad or inefficient, it is just often used >improperly or in cases where more thought should go into the design and >architecture of the code. It is, in fact, indispensible if you are >trying to extend the core javascript language or work with dynamically >generated/modified code. It should not be used in "every day" code, and >if you find yourself using it in a small bit of code, it is likely you >are misusing it. Nothing is set in stone of course, and this is just a >general guideline. > >Peter Brunone wrote: > >> No problem; just start a new thread! >> >> What if you want to run a function based on a string? >> >>-Peter B. From jeff at websciences.org Tue Jan 20 13:05:52 2004 From: jeff at websciences.org (Jeff Greenberg) Date: Tue, 20 Jan 2004 11:05:52 -0800 Subject: [Javascript] Good vs. Eval (was Form validation) In-Reply-To: <20040120185521.1FCFC30A0DE@LaTech.edu> References: <20040120185521.1FCFC30A0DE@LaTech.edu> Message-ID: <400D7C10.5070901@websciences.org> You refer to the function object without the parentheses: function myFunction() { //do something here } functionList=new Array(); functionList["myFunction"]=myFunction; Then to execute the function, you use the parentheses: functionList["myFunction"](); Peter Brunone wrote: > But how do you get the array to point to the *execution* of the function rather than the return value of the function? That is, if I want to set functionList["myFunction"] equal to myFunction(), how do I get it in there so that I can use it? > > IMO, this is a great discussion; keep it coming! > >Original Message: > > >>From: Jeff Greenberg >> >> > > > >>One of the easiest ways to call a function based on a string is to index >>into an array or an object like so: >> >>functionList["myFunction"](); >> >>eval is not inherently bad or inefficient, it is just often used >>improperly or in cases where more thought should go into the design and >>architecture of the code. It is, in fact, indispensible if you are >>trying to extend the core javascript language or work with dynamically >>generated/modified code. It should not be used in "every day" code, and >>if you find yourself using it in a small bit of code, it is likely you >>are misusing it. Nothing is set in stone of course, and this is just a >>general guideline. >> >>Peter Brunone wrote: >> >> >> >>> No problem; just start a new thread! >>> >>> What if you want to run a function based on a string? >>> >>>-Peter B. >>> >>> > > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rneilands at pulsemining.com.au Tue Jan 20 17:04:27 2004 From: rneilands at pulsemining.com.au (Roland Neilands) Date: Wed, 21 Jan 2004 10:04:27 +1100 Subject: [Javascript] Serious Internet Explorer bug. In-Reply-To: <3FD88D7C.6070701@backbase.com> Message-ID: Have had the same(?) problem for a long time, only sometimes on some pc's. Basically this line: parent.SDViewer.TheImage.src = filenames[imgno]; would work the first time & then randomly not on subsequent uses of the same image. I just found that switching these PC's to use a proxy server gets around this problem. Cheers, Roland > -----Original Message----- > From: javascript-bounces at LaTech.edu > [mailto:javascript-bounces at LaTech.edu]On Behalf Of Hakan M. > Sent: Friday, 12 December 2003 2:30 AM > To: [JavaScript List] > Subject: [Javascript] Serious Internet Explorer bug. > > > Hello, > > I'm encountering heavy problems with this bug: > > http://support.microsoft.com/default.aspx?scid=kb;en-us;269802 > > It took me a while to figure out that it was this bug in the first place > because of it's absolute RANDOMNESS. > After close inspection of some test machines we found that if the cache > is set to 'Every visit to page' the bug almost always happend. And when > set to 'Automatically' it rarely happend. Furthermore, the actual > setting of the cache SIZE obviously also made a LOT of difference. When > the cache was set to some small (5MB) size, the bug was popping up > constantly. > > Why is this bug happening anyway? This quote from the MS-site is not > very helpfull: > > "As described earlier, this may demonstrate the problem described in > this article, depending on the timing of other portions of the Web > application." > > The timing of what? What should or should not be done during what? > > ps. We could not get the bug-example on 269802 to actually cause the bug. > > > In theory we have total control over the webapplication. So we can time > everything. But things like waiting to load each image until the > previous image finished loading seems like an overkill, Especially when > running other testcases of loading 1500+ unique images at once and not > having any problems at all! > > > Further info: > Platform: WindowsXP / IE6.0 > We use the Microsoft.XMLHTTP object to get data. > We use normal IMG tags > We use background images(through inline styles and classes) > We use gif and jpg images (jpg are saved for web so they do not have the > XML Bug that also causes craches) > > We observed the reloading of bg-images when: > >
onmouseout="this.className='class2';"> > text >
text
> text >
> > (just a nice oddity by itself) > > > > > So does anybody have an idea what this 'Timing' could be and/or its > relation to cache? In other words: When or Why does this happen? > > Thnx, > > Gerbert Kaandorp through Hakan > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > From hakan at backbase.com Wed Jan 21 08:48:55 2004 From: hakan at backbase.com (=?ISO-8859-1?Q?H=E5kan_Magnusson?=) Date: Wed, 21 Jan 2004 15:48:55 +0100 Subject: [Javascript] Good vs. Eval (was Form validation) In-Reply-To: <400D7C10.5070901@websciences.org> References: <20040120185521.1FCFC30A0DE@LaTech.edu> <400D7C10.5070901@websciences.org> Message-ID: <400E9157.9000406@backbase.com> Of course, another argument would be that eval is insanely heavy on the parser, and mr Greenberg provided the de facto solution for your particular problem. We are using the exact same method to register functions for certain objects (with an object id in the array of functions). I, personally, know that the function IS useful in some areas. I've written debuggers and CM-like systems in pure JavaScript and in such applications it is sometimes necessary to pass a string of javascript code to the parser, making eval the only alternative. BUT HOWEVER, the performance impact of using eval (run a couple of tests if you doubt me) and the number of "correct" ways of doing things instead of just pissing it all out through the eval function clearly tells us that if you are not absolutely, totally and indisputably sure that there is no other way known to mankind to fix your problem, don't use the function. > Peter Brunone wrote: > IMO, this is a great discussion; keep it coming! I agree, great thread. Hakan Jeff Greenberg wrote: > You refer to the function object without the parentheses: > > function myFunction() > { > //do something here > } > > functionList=new Array(); > > functionList["myFunction"]=myFunction; > > Then to execute the function, you use the parentheses: > > functionList["myFunction"](); > > > Peter Brunone wrote: > >> But how do you get the array to point to the *execution* of the function rather than the return value of the function? That is, if I want to set functionList["myFunction"] equal to myFunction(), how do I get it in there so that I can use it? >> >> IMO, this is a great discussion; keep it coming! >> >>Original Message: >> >> >>>From: Jeff Greenberg >>> >>> >> >> >> >>>One of the easiest ways to call a function based on a string is to index >>>into an array or an object like so: >>> >>>functionList["myFunction"](); >>> >>>eval is not inherently bad or inefficient, it is just often used >>>improperly or in cases where more thought should go into the design and >>>architecture of the code. It is, in fact, indispensible if you are >>>trying to extend the core javascript language or work with dynamically >>>generated/modified code. It should not be used in "every day" code, and >>>if you find yourself using it in a small bit of code, it is likely you >>>are misusing it. Nothing is set in stone of course, and this is just a >>>general guideline. >>> >>>Peter Brunone wrote: >>> >>> >>> >>>> No problem; just start a new thread! >>>> >>>> What if you want to run a function based on a string? >>>> >>>>-Peter B. >>>> >>>> >> >> >>_______________________________________________ >>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 christ at saeweb.com Wed Jan 21 09:09:53 2004 From: christ at saeweb.com (Chris Tifer) Date: Wed, 21 Jan 2004 10:09:53 -0500 Subject: [Javascript] Very OT, but VERY cool program References: <20040120185521.1FCFC30A0DE@LaTech.edu><400D7C10.5070901@websciences.org> <400E9157.9000406@backbase.com> Message-ID: <002101c3e030$9f555e90$df0110ac@saweb.lcl> http://www.tcbmi.com/strokeit/ Anyone ever played Black & White and use their Miracle gestures? Now you can do something similar to control apps. Sorry if this wasn't meant to be posted to the list, but I'm not affiliated with this. I just thought it was neat. From javascript at mattbarton.org Wed Jan 21 09:14:08 2004 From: javascript at mattbarton.org (Matt Barton) Date: Wed, 21 Jan 2004 15:14:08 -0000 Subject: [Javascript] Very OT, but VERY cool program References: <20040120185521.1FCFC30A0DE@LaTech.edu><400D7C10.5070901@websciences.org><400E9157.9000406@backbase.com> <002101c3e030$9f555e90$df0110ac@saweb.lcl> Message-ID: <032101c3e031$3775c430$6199a8c0@selima.co.uk> That really is an excellent little app. ----- Original Message ----- From: "Chris Tifer" To: "[JavaScript List]" Sent: Wednesday, January 21, 2004 3:09 PM Subject: [Javascript] Very OT, but VERY cool program > http://www.tcbmi.com/strokeit/ > > Anyone ever played Black & White and use their Miracle gestures? Now you > can do something similar to control apps. > > Sorry if this wasn't meant to be posted to the list, but I'm not affiliated > with this. I just thought it was neat. > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > > -- > This email has been verified as Virus free > Virus Protection and more available at http://www.plus.net From peter at brunone.com Wed Jan 21 09:36:59 2004 From: peter at brunone.com (Peter Brunone) Date: Wed, 21 Jan 2004 09:36:59 -0600 Subject: [Javascript] Good vs. Eval (was Form validation) In-Reply-To: <400E9157.9000406@backbase.com> Message-ID: <005501c3e034$693ad390$0502a8c0@monkeyhouse> Thanks for the input; you all have inspired me to take a different approach. -Peter -----Original Message----- From: javascript-bounces at LaTech.edu On Behalf Of H?kan Magnusson Of course, another argument would be that eval is insanely heavy on the parser, and mr Greenberg provided the de facto solution for your particular problem. We are using the exact same method to register functions for certain objects (with an object id in the array of functions). I, personally, know that the function IS useful in some areas. I've written debuggers and CM-like systems in pure JavaScript and in such applications it is sometimes necessary to pass a string of javascript code to the parser, making eval the only alternative. BUT HOWEVER, the performance impact of using eval (run a couple of tests if you doubt me) and the number of "correct" ways of doing things instead of just pissing it all out through the eval function clearly tells us that if you are not absolutely, totally and indisputably sure that there is no other way known to mankind to fix your problem, don't use the function. > Peter Brunone wrote: > IMO, this is a great discussion; keep it coming! I agree, great thread. Hakan Jeff Greenberg wrote: > You refer to the function object without the parentheses: > > function myFunction() > { > //do something here > } > > functionList=new Array(); > > functionList["myFunction"]=myFunction; > > Then to execute the function, you use the parentheses: > > functionList["myFunction"](); > > > Peter Brunone wrote: > >> But how do you get the array to point to the *execution* of the >> function rather than the return value of the function? That is, if I >> want to set functionList["myFunction"] equal to myFunction(), how do >> I get it in there so that I can use it? >> >> IMO, this is a great discussion; keep it coming! >> >>Original Message: >>>From: Jeff Greenberg >> >>>One of the easiest ways to call a function based on a string is to >>>index >>>into an array or an object like so: >>> >>>functionList["myFunction"](); >>> >>>eval is not inherently bad or inefficient, it is just often used >>>improperly or in cases where more thought should go into the design and >>>architecture of the code. It is, in fact, indispensible if you are >>>trying to extend the core javascript language or work with dynamically >>>generated/modified code. It should not be used in "every day" code, and >>>if you find yourself using it in a small bit of code, it is likely you >>>are misusing it. Nothing is set in stone of course, and this is just a >>>general guideline. From javascript at mattbarton.org Wed Jan 21 10:12:37 2004 From: javascript at mattbarton.org (Matt Barton) Date: Wed, 21 Jan 2004 16:12:37 -0000 Subject: [Javascript] Referencing javascript functions in other windows Message-ID: <033201c3e039$638564b0$6199a8c0@selima.co.uk> Hi, I'm having some difficulty access some javascript functions which are declared in a popup object (i.e. created using the createPopup method. I have a window which creates and shows a popup, with the content for the popup being read from a file and inserted into the popup like this: Now: inside functions in the popup itself I can reference variables from the parent window and call functions like this: // ---- function fMakeWider (intDX) { window.parent.intPopupWidth += intDX; window.parent.oPopup.hide(); window.parent.oPopup.show (0, 0, window.parent.intPopupWidth, 300, window.parent.document.body); } // ---- OK? So now what I'm wanting to do is call a function which is declared in the popup from the parent window. // ---- function fGetDataFromPopup () { var someData = {reference to popup window goes here}.fGetSomeData(); } // ---- I've tried a few different references to the popup window (including oPopup, oPopup.document) but everythign I've tried gives a 'Yada, yada, yada is null or not an object'. Any ideas anyone? I'd be eternally greateful... Matt From jeff at websciences.org Wed Jan 21 11:48:04 2004 From: jeff at websciences.org (Jeff Greenberg) Date: Wed, 21 Jan 2004 09:48:04 -0800 Subject: [Javascript] Good vs. Eval (was Form validation) In-Reply-To: <005501c3e034$693ad390$0502a8c0@monkeyhouse> References: <005501c3e034$693ad390$0502a8c0@monkeyhouse> Message-ID: <400EBB54.9060506@websciences.org> >From: javascript-bounces at LaTech.edu On Behalf Of H?kan Magnusson > >Of course, another argument would be that eval is insanely heavy on the >parser, > This is true for evaluating expressions and statements, etc. But one of the places where eval can really shine is in dynamic function generation/modification. Here I am talking specifically about either creating functions from scratch, or modifying functions based on certain criteria or input (to do so, you can get at the code of an existing function by using its toString() method). In this case, eval is actually quite fast because it is doing nothing more or less than what the Javascript parser has to do when it first encounters your script-- converting the text source of a function to a cached internal representation of the script. From there on out, of course, the generated functions run like any other code. This is in contrast to how eval is normally misused for evaluating individual statements or series of statements over and over again. In that case, it is like you are loading a new little script into the Javascript parser every time you use eval. One example of dynamic code generation in JS is a recent library I created to memoize (cache) function results to speed up complex or recursive functions. Although I eventually ended up using a different tactic (only because the toString() method for functions is broken in Opera 7.23, which I needed to support), dynamic code generation created the fastest, most elegant output. Basically the goal was for users of the library to be able to create their functions as they normally would, then pass them to a memoize() function that would return the modified function. My library does this now, and the code to do so is actually smaller than if I had used code generation, but the modified code is not quite as fast and is certainly not nearly as elegant. Any time I want to add functionality, I have to come up with various workarounds and sometimes strange ways of accomplishing my goals, which adds to the complexity of the library and could create future maintenance problems. Adding functionality for the code generating version was trivial. Granted, dynamic code generation doesn't usually come up unless you are trying to create things like optimizers, extensions to the JS core language, etc., but my guess is that it could be applied to other situations as well. In particular, it probably could be useful when speed is critical, but functionality of complex prototypes or functions may need to be changed. By generating code directly instead of using an inheritance chain, or wrapping existing code within other functions, you can get as much speed as is feasible in any given environment. That was all rather abstract and long, but I hope I was communicating effectively. -JG From antonypaul24 at hotmail.com Thu Jan 22 00:48:56 2004 From: antonypaul24 at hotmail.com (Antony Paul) Date: Thu, 22 Jan 2004 12:18:56 +0530 Subject: [Javascript] Problem adding childs to select box in another window. Message-ID: Hi all, I am having problem adding an element to a select box in another window. It is throwing an exception saying Runtime error occurred. This is what I am trying to do. In one page open a new window using this code function linkme(me){ win = window.open("Noname2.html","f"); } In second window(Noname2.html) it have a text box and a button. Clicking button will add the contents of text box to parent windows select box. I would like to get added in alphabetical order or at the top. This code is adding this. But this throws exception at last line. I know it is some coding mistake. Please help me correct this. rgds Antony Paul From antonypaul24 at hotmail.com Thu Jan 22 00:51:44 2004 From: antonypaul24 at hotmail.com (Antony Paul) Date: Thu, 22 Jan 2004 12:21:44 +0530 Subject: [Javascript] Problem adding childs to select box in another window. References: Message-ID: I forgot to specify the platform. IE 5 with win2k sp4. rgds Antony Paul ----- Original Message ----- From: "Antony Paul" To: "JavaScript" Sent: Thursday, January 22, 2004 12:18 PM Subject: [Javascript] Problem adding childs to select box in another window. > Hi all, > I am having problem adding an element to a select box in another window. > It is throwing an exception saying Runtime error occurred. This is what I am > trying to do. In one page open a new window using this code > function linkme(me){ > win = window.open("Noname2.html","f"); > } > > In second window(Noname2.html) it have a text box and a button. Clicking > button will add the contents of text box to parent windows select box. I > would like to get added in alphabetical order or at the top. This code is > adding this. > > > But this throws exception at last line. I know it is some coding mistake. > Please help me correct this. > > rgds > Antony Paul > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > From sebastian.lahajnar at pris-inz.si Thu Jan 22 00:55:31 2004 From: sebastian.lahajnar at pris-inz.si (sebastian) Date: Thu, 22 Jan 2004 07:55:31 +0100 Subject: [Javascript] locking contents-OK In-Reply-To: Message-ID: How can I empty the clipboard? What's the syntax? I've searched the internet but I havent found it. Thanks, Sebastian -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu]On Behalf Of BEKIM BACAJ Sent: Saturday, January 17, 2004 3:14 AM To: javascript at LaTech.edu Subject: Re: [Javascript] locking contents-OK >What do you mean by "web-page dialog"? As about "web-page dialog" we will come to it later if needed. >Print screen doesn't output an image. It copies the contents into the >clipboard. Then you just open your favorite editor and paste and voila, >you've got a screenie. Well that's great! Because you can allways empty te pockets of your students before they leave the class! That is, you can always use the 'onblur' and the 'unload' event to empty the clipboard! Preventing the chache is even easier. So, we should consider thismatter as solved. Ofcourse only if this data are accesible only hrough some local net in the schooll. Because one can always grab the pencil and write all the contents down t home. >Chris Tifer > >----- Original Message ----- >From: "BEKIM BACAJ" >To: >Sent: Friday, January 16, 2004 11:48 AM >Subject: Re: [Javascript] locking contents > > > > > > Has anybody ever used web-page dialog for this matter? > > I think it will do good protection to the material you wish > > to be wiewed only. And sorry, where can I find the copies I've done with > > print screen cmnd while working on windows env? > > > > >From: "Tim Makins" > > >Reply-To: "[JavaScript List]" > > >To: "[JavaScript List]" > > >Subject: Re: [Javascript] locking contents > > >Date: Fri, 16 Jan 2004 15:22:38 -0000 > > > > > >Have you looked into using pdf files ? I think they can be locked in > > >different ways. > > > > > >Tim in Ireland. > > > > > >----- Original Message ----- > > >From: "sebastian" > > >To: "[JavaScript List]" > > >Sent: Friday, January 16, 2004 2:17 PM > > >Subject: RE: [Javascript] locking contents > > > > > > > >I have to prevent that users who browse my HTML pages can do: > > > > >- select and copy the contents > > > > >- print the contents > > > > >- save the html page > > > > >- edit source > > > > > > > > > >Bassically they can only view the contents. > > > > >Is anything od this possible? > > > > >The content of a page is a set of exam questions that should't be > > >copied, > > > > >printed ecc. I know that there's always printscreen... > > > > > > > > > >Thanks. > > > > > > > > > >Sebastian > > > > > > > > > > > >_______________________________________________ > > >Javascript mailing list > > >Javascript at LaTech.edu > > >https://lists.LaTech.edu/mailman/listinfo/javascript > > > > _________________________________________________________________ > > STOP MORE SPAM with the new MSN 8 and get 2 months FREE* > > http://join.msn.com/?page=features/junkmail > > > > _______________________________________________ > > 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 _________________________________________________________________ Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From gassinaumasis at hotmail.com Thu Jan 22 04:33:57 2004 From: gassinaumasis at hotmail.com (Peter-Paul Koch) Date: Thu, 22 Jan 2004 10:33:57 +0000 Subject: [Javascript] Problem adding childs to select box in another window. Message-ID: > I am having problem adding an element to a select box in another >window. >It is throwing an exception saying Runtime error occurred. This is what I >am >trying to do. In one page open a new window using this code Yup. Known bug in IE 5.0 . Put the function that actually inserts the option in the same window as the select box and call it cross-window. ------------------------------------------------------------------- ppk, freelance web developer Interaction, copywriting, JavaScript, integration http://www.quirksmode.org/ Column "Keep it Simple": http://www.digital-web.com/columns/keepitsimple/ ------------------------------------------------------------------ _________________________________________________________________ Hotmail en Messenger on the move http://www.msn.nl/communicatie/smsdiensten/hotmailsmsv2/ From UGrinwald at dynamic.ca Thu Jan 22 13:55:49 2004 From: UGrinwald at dynamic.ca (Grinwald, Uri) Date: Thu, 22 Jan 2004 14:55:49 -0500 Subject: [Javascript] Emulate a in-line two tier menu Message-ID: Can someone please inform me if they know of any available DHTML/Javascript to pull off a similar menu sytem like the one used here? https://ficlws.fidelity.ca/login/IPLogin.jsp?Language=E Please and thanks. Uri From costea.dan at ssi-schaefer.ro Fri Jan 23 06:31:24 2004 From: costea.dan at ssi-schaefer.ro (Dan Costea) Date: Fri, 23 Jan 2004 14:31:24 +0200 Subject: [Javascript] object that floats over frames Message-ID: <00f301c3e1ac$d098b880$addea8c0@ssischaefer.ro> Hi! I work with IE6 (an intranet applicaiton). I need an object that can float over frames, like a popup object (but not this object). For example, I have an HTML page with frames and I need an object that will stay visible at a certain position (for example, exactly in the middle of the page, no metter that at this area is splitted by frames). Do you know if such object exists in IE? If yes, what is it? Thanks, Dan Costea. -------------- next part -------------- An HTML attachment was scrubbed... URL: From javascript at mattbarton.org Fri Jan 23 08:04:43 2004 From: javascript at mattbarton.org (Matt Barton) Date: Fri, 23 Jan 2004 14:04:43 -0000 Subject: [Javascript] object that floats over frames References: <00f301c3e1ac$d098b880$addea8c0@ssischaefer.ro> Message-ID: <00dc01c3e1b9$da2e4290$6199a8c0@selima.co.uk> Hi Dan, I have had to find a solution to this too (this week in fact). Unfortunately I found nothing apart from the popup object (i.e. document.createPopup()) that would float over frames. I didn't want to use the popup object either, but with a fair bit of experimentation I have found it to be very useful, and fits my application perfectly (also IE6/Win intranet app). If you want any hints with using the popup object then don't be afraid to ask :) Matt ----- Original Message ----- From: Dan Costea To: [JavaScript List] Sent: Friday, January 23, 2004 12:31 PM Subject: [Javascript] object that floats over frames Hi! I work with IE6 (an intranet applicaiton). I need an object that can float over frames, like a popup object (but not this object). For example, I have an HTML page with frames and I need an object that will stay visible at a certain position (for example, exactly in the middle of the page, no metter that at this area is splitted by frames). Do you know if such object exists in IE? If yes, what is it? Thanks, Dan Costea. ------------------------------------------------------------------------------ _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript -------------- next part -------------- An HTML attachment was scrubbed... URL: From dlovering at gazos.com Fri Jan 23 09:56:24 2004 From: dlovering at gazos.com (David Lovering) Date: Fri, 23 Jan 2004 08:56:24 -0700 Subject: [Javascript] object that floats over frames References: <00f301c3e1ac$d098b880$addea8c0@ssischaefer.ro> <00dc01c3e1b9$da2e4290$6199a8c0@selima.co.uk> Message-ID: <001101c3e1c9$74465bb0$0600000a@elohim> Has anyone considered launching a new window? It will float over frames, (and can contain new ones if need be), and the layer control can put it anywhere in the stack that you need it. Yes, it can be superseded by other layers (even pop-ups can be "invisibled"), but as long as focus is locked on it while its function remains current, and it is destroyed when that function no longer applies, you basicly have a super-delux pop-up. All the windows/frames can communicate with the elements of all the others (even though the DOM tree can be pretty baroque), so there's no problem in exchanging data between them. I'm not sure I understand why this approach wasn't considered. [By "pop-up" I am assuming we are talking about the peculiar IE construct, and not just another slave window -- the same solution I am pushing]. -- Dave Lovering ----- Original Message ----- From: Matt Barton To: [JavaScript List] Sent: Friday, January 23, 2004 7:04 AM Subject: Re: [Javascript] object that floats over frames Hi Dan, I have had to find a solution to this too (this week in fact). Unfortunately I found nothing apart from the popup object (i.e. document.createPopup()) that would float over frames. I didn't want to use the popup object either, but with a fair bit of experimentation I have found it to be very useful, and fits my application perfectly (also IE6/Win intranet app). If you want any hints with using the popup object then don't be afraid to ask :) Matt ----- Original Message ----- From: Dan Costea To: [JavaScript List] Sent: Friday, January 23, 2004 12:31 PM Subject: [Javascript] object that floats over frames Hi! I work with IE6 (an intranet applicaiton). I need an object that can float over frames, like a popup object (but not this object). For example, I have an HTML page with frames and I need an object that will stay visible at a certain position (for example, exactly in the middle of the page, no metter that at this area is splitted by frames). Do you know if such object exists in IE? If yes, what is it? Thanks, Dan Costea. ---------------------------------------------------------------------------- _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From costea.dan at ssi-schaefer.ro Fri Jan 23 10:35:01 2004 From: costea.dan at ssi-schaefer.ro (Dan Costea) Date: Fri, 23 Jan 2004 18:35:01 +0200 Subject: [Javascript] object that floats over frames References: <00f301c3e1ac$d098b880$addea8c0@ssischaefer.ro><00dc01c3e1b9$da2e4290$6199a8c0@selima.co.uk> <001101c3e1c9$74465bb0$0600000a@elohim> Message-ID: <014f01c3e1ce$d91042e0$addea8c0@ssischaefer.ro> What I want to do is to display a logo in the up-left corner of the pages. The pages are already created, and it is possible that the up-left corner is splited in 2 frames (with frameborder="no") and in these cases the logo have to float over 2 frames. I don't want to use a popup object because I have my own context menu (at right click) that is created with window.createPopup(), so, when I'll open the context menu the logo will be closed. I considered to use showModelessDialog, but the problem in this case is that I don't know how to get rid of the title bar and the window borders... ----- Original Message ----- From: David Lovering To: [JavaScript List] Sent: Friday, January 23, 2004 5:56 PM Subject: Re: [Javascript] object that floats over frames Has anyone considered launching a new window? It will float over frames, (and can contain new ones if need be), and the layer control can put it anywhere in the stack that you need it. Yes, it can be superseded by other layers (even pop-ups can be "invisibled"), but as long as focus is locked on it while its function remains current, and it is destroyed when that function no longer applies, you basicly have a super-delux pop-up. All the windows/frames can communicate with the elements of all the others (even though the DOM tree can be pretty baroque), so there's no problem in exchanging data between them. I'm not sure I understand why this approach wasn't considered. [By "pop-up" I am assuming we are talking about the peculiar IE construct, and not just another slave window -- the same solution I am pushing]. -- Dave Lovering ----- Original Message ----- From: Matt Barton To: [JavaScript List] Sent: Friday, January 23, 2004 7:04 AM Subject: Re: [Javascript] object that floats over frames Hi Dan, I have had to find a solution to this too (this week in fact). Unfortunately I found nothing apart from the popup object (i.e. document.createPopup()) that would float over frames. I didn't want to use the popup object either, but with a fair bit of experimentation I have found it to be very useful, and fits my application perfectly (also IE6/Win intranet app). If you want any hints with using the popup object then don't be afraid to ask :) Matt ----- Original Message ----- From: Dan Costea To: [JavaScript List] Sent: Friday, January 23, 2004 12:31 PM Subject: [Javascript] object that floats over frames Hi! I work with IE6 (an intranet applicaiton). I need an object that can float over frames, like a popup object (but not this object). For example, I have an HTML page with frames and I need an object that will stay visible at a certain position (for example, exactly in the middle of the page, no metter that at this area is splitted by frames). Do you know if such object exists in IE? If yes, what is it? Thanks, Dan Costea. -------------------------------------------------------------------------- _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From peter at brunone.com Fri Jan 23 10:52:23 2004 From: peter at brunone.com (Peter Brunone) Date: Fri, 23 Jan 2004 10:52:23 -0600 Subject: [Javascript] object that floats over frames In-Reply-To: <014f01c3e1ce$d91042e0$addea8c0@ssischaefer.ro> Message-ID: <003501c3e1d1$464928c0$0502a8c0@monkeyhouse> Dan, What about an iframe in the parent page? You can move them, change their z-index, and basically do just about anything. It can't move outside the window, but it might be able to transcend its brother frames. -Peter -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of Dan Costea Sent: Friday, January 23, 2004 10:35 AM To: [JavaScript List] Subject: Re: [Javascript] object that floats over frames What I want to do is to display a logo in the up-left corner of the pages. The pages are already created, and it is possible that the up-left corner is splited in 2 frames (with frameborder="no") and in these cases the logo have to float over 2 frames. I don't want to use a popup object because I have my own context menu (at right click) that is created with window.createPopup(), so, when I'll open the context menu the logo will be closed. I considered to use showModelessDialog, but the problem in this case is that I don't know how to get rid of the title bar and the window borders... ----- Original Message ----- From: David Lovering To: [JavaScript List] Sent: Friday, January 23, 2004 5:56 PM Subject: Re: [Javascript] object that floats over frames Has anyone considered launching a new window? It will float over frames, (and can contain new ones if need be), and the layer control can put it anywhere in the stack that you need it. Yes, it can be superseded by other layers (even pop-ups can be "invisibled"), but as long as focus is locked on it while its function remains current, and it is destroyed when that function no longer applies, you basicly have a super-delux pop-up. All the windows/frames can communicate with the elements of all the others (even though the DOM tree can be pretty baroque), so there's no problem in exchanging data between them. I'm not sure I understand why this approach wasn't considered. [By "pop-up" I am assuming we are talking about the peculiar IE construct, and not just another slave window -- the same solution I am pushing]. -- Dave Lovering ----- Original Message ----- From: Matt Barton To: [JavaScript List] Sent: Friday, January 23, 2004 7:04 AM Subject: Re: [Javascript] object that floats over frames Hi Dan, I have had to find a solution to this too (this week in fact). Unfortunately I found nothing apart from the popup object (i.e. document.createPopup()) that would float over frames. I didn't want to use the popup object either, but with a fair bit of experimentation I have found it to be very useful, and fits my application perfectly (also IE6/Win intranet app). If you want any hints with using the popup object then don't be afraid to ask :) Matt ----- Original Message ----- From: Dan Costea To: [JavaScript List] Sent: Friday, January 23, 2004 12:31 PM Subject: [Javascript] object that floats over frames Hi! I work with IE6 (an intranet applicaiton). I need an object that can float over frames, like a popup object (but not this object). For example, I have an HTML page with frames and I need an object that will stay visible at a certain position (for example, exactly in the middle of the page, no metter that at this area is splitted by frames). Do you know if such object exists in IE? If yes, what is it? Thanks, Dan Costea. _____ _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From spindrift at oceanfree.net Fri Jan 23 11:12:01 2004 From: spindrift at oceanfree.net (Tim Makins) Date: Fri, 23 Jan 2004 17:12:01 -0000 Subject: [Javascript] object that floats over frames References: <00f301c3e1ac$d098b880$addea8c0@ssischaefer.ro><00dc01c3e1b9$da2e4290$6199a8c0@selima.co.uk><001101c3e1c9$74465bb0$0600000a@elohim> <014f01c3e1ce$d91042e0$addea8c0@ssischaefer.ro> Message-ID: <006101c3e1d4$060f7ae0$21e9fea9@ic7g> A bit of lateral thinking: How about creating your 'frameset' in CSS, and then you can float whatever you want on top, in the same window. Another idea - if your floating logo must sit over, for instance, two frames, then slice the logo in two, and float half over one frame and the other half over the other frame, using absolute positioning. Alternatively, move your logo so it only covers one frame. Or make the logo smaller. Tim in Ireland. -------------- next part -------------- An HTML attachment was scrubbed... URL: From javascript at mattbarton.org Fri Jan 23 11:12:42 2004 From: javascript at mattbarton.org (Matt Barton) Date: Fri, 23 Jan 2004 17:12:42 -0000 Subject: [Javascript] object that floats over frames References: <00f301c3e1ac$d098b880$addea8c0@ssischaefer.ro><00dc01c3e1b9$da2e4290$6199a8c0@selima.co.uk> <001101c3e1c9$74465bb0$0600000a@elohim> Message-ID: <010a01c3e1d4$1c992220$6199a8c0@selima.co.uk> Obviously I can't speak for Dan, but in my case I certainly did consider opening a new browser window - you're right it would do everything thta I'd need to to. However by doing that the user would be able to alt-tab away from the window in question, which is something that we didn't want to entertain - that was a descision I wasn't party to. Unless I'm missing something in your suggestion? You do mean using the window.open () method don't you? Matt ----- Original Message ----- From: David Lovering To: [JavaScript List] Sent: Friday, January 23, 2004 3:56 PM Subject: Re: [Javascript] object that floats over frames Has anyone considered launching a new window? It will float over frames, (and can contain new ones if need be), and the layer control can put it anywhere in the stack that you need it. Yes, it can be superseded by other layers (even pop-ups can be "invisibled"), but as long as focus is locked on it while its function remains current, and it is destroyed when that function no longer applies, you basicly have a super-delux pop-up. All the windows/frames can communicate with the elements of all the others (even though the DOM tree can be pretty baroque), so there's no problem in exchanging data between them. I'm not sure I understand why this approach wasn't considered. [By "pop-up" I am assuming we are talking about the peculiar IE construct, and not just another slave window -- the same solution I am pushing]. -- Dave Lovering ----- Original Message ----- From: Matt Barton To: [JavaScript List] Sent: Friday, January 23, 2004 7:04 AM Subject: Re: [Javascript] object that floats over frames Hi Dan, I have had to find a solution to this too (this week in fact). Unfortunately I found nothing apart from the popup object (i.e. document.createPopup()) that would float over frames. I didn't want to use the popup object either, but with a fair bit of experimentation I have found it to be very useful, and fits my application perfectly (also IE6/Win intranet app). If you want any hints with using the popup object then don't be afraid to ask :) Matt ----- Original Message ----- From: Dan Costea To: [JavaScript List] Sent: Friday, January 23, 2004 12:31 PM Subject: [Javascript] object that floats over frames Hi! I work with IE6 (an intranet applicaiton). I need an object that can float over frames, like a popup object (but not this object). For example, I have an HTML page with frames and I need an object that will stay visible at a certain position (for example, exactly in the middle of the page, no metter that at this area is splitted by frames). Do you know if such object exists in IE? If yes, what is it? Thanks, Dan Costea. _______________________________________________ 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 costea.dan at ssi-schaefer.ro Fri Jan 23 11:13:25 2004 From: costea.dan at ssi-schaefer.ro (Dan Costea) Date: Fri, 23 Jan 2004 19:13:25 +0200 Subject: [Javascript] object that floats over frames References: <003501c3e1d1$464928c0$0502a8c0@monkeyhouse> Message-ID: <019101c3e1d4$35f438e0$addea8c0@ssischaefer.ro> MessagePeter, that sounds good. But I couldn't insert an iframe in the top, and make it float over 2 other frames... Maybe you can give me a hint, plese (a frameset structure with an iframe that can float over it's siblings...) ----- Original Message ----- From: Peter Brunone To: '[JavaScript List]' Sent: Friday, January 23, 2004 6:52 PM Subject: RE: [Javascript] object that floats over frames Dan, What about an iframe in the parent page? You can move them, change their z-index, and basically do just about anything. It can't move outside the window, but it might be able to transcend its brother frames. -Peter -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of Dan Costea Sent: Friday, January 23, 2004 10:35 AM To: [JavaScript List] Subject: Re: [Javascript] object that floats over frames What I want to do is to display a logo in the up-left corner of the pages. The pages are already created, and it is possible that the up-left corner is splited in 2 frames (with frameborder="no") and in these cases the logo have to float over 2 frames. I don't want to use a popup object because I have my own context menu (at right click) that is created with window.createPopup(), so, when I'll open the context menu the logo will be closed. I considered to use showModelessDialog, but the problem in this case is that I don't know how to get rid of the title bar and the window borders... ----- Original Message ----- From: David Lovering To: [JavaScript List] Sent: Friday, January 23, 2004 5:56 PM Subject: Re: [Javascript] object that floats over frames Has anyone considered launching a new window? It will float over frames, (and can contain new ones if need be), and the layer control can put it anywhere in the stack that you need it. Yes, it can be superseded by other layers (even pop-ups can be "invisibled"), but as long as focus is locked on it while its function remains current, and it is destroyed when that function no longer applies, you basicly have a super-delux pop-up. All the windows/frames can communicate with the elements of all the others (even though the DOM tree can be pretty baroque), so there's no problem in exchanging data between them. I'm not sure I understand why this approach wasn't considered. [By "pop-up" I am assuming we are talking about the peculiar IE construct, and not just another slave window -- the same solution I am pushing]. -- Dave Lovering ----- Original Message ----- From: Matt Barton To: [JavaScript List] Sent: Friday, January 23, 2004 7:04 AM Subject: Re: [Javascript] object that floats over frames Hi Dan, I have had to find a solution to this too (this week in fact). Unfortunately I found nothing apart from the popup object (i.e. document.createPopup()) that would float over frames. I didn't want to use the popup object either, but with a fair bit of experimentation I have found it to be very useful, and fits my application perfectly (also IE6/Win intranet app). If you want any hints with using the popup object then don't be afraid to ask :) Matt ----- Original Message ----- From: Dan Costea To: [JavaScript List] Sent: Friday, January 23, 2004 12:31 PM Subject: [Javascript] object that floats over frames Hi! I work with IE6 (an intranet applicaiton). I need an object that can float over frames, like a popup object (but not this object). For example, I have an HTML page with frames and I need an object that will stay visible at a certain position (for example, exactly in the middle of the page, no metter that at this area is splitted by frames). Do you know if such object exists in IE? If yes, what is it? Thanks, Dan Costea. ---------------------------------------------------------------------- _______________________________________________ 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 ------------------------------------------------------------------------------ _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript -------------- next part -------------- An HTML attachment was scrubbed... URL: From costea.dan at ssi-schaefer.ro Fri Jan 23 11:23:50 2004 From: costea.dan at ssi-schaefer.ro (Dan Costea) Date: Fri, 23 Jan 2004 19:23:50 +0200 Subject: [Javascript] object that floats over frames References: <00f301c3e1ac$d098b880$addea8c0@ssischaefer.ro><00dc01c3e1b9$da2e4290$6199a8c0@selima.co.uk><001101c3e1c9$74465bb0$0600000a@elohim><014f01c3e1ce$d91042e0$addea8c0@ssischaefer.ro> <006101c3e1d4$060f7ae0$21e9fea9@ic7g> Message-ID: <01b801c3e1d5$aaf06230$addea8c0@ssischaefer.ro> unfortunately, I can't apply these solutions because I already have implemented over 300 dialogs (web pages) and I need a general solution for all of them. I can write a js function that I'm sure it is called on "onload" event of all frames and in this function I have to dynamicaly insert the logo, such way that it will be displayed in the top-left corner of each dialog. ----- Original Message ----- From: Tim Makins To: [JavaScript List] Sent: Friday, January 23, 2004 7:12 PM Subject: Re: [Javascript] object that floats over frames A bit of lateral thinking: How about creating your 'frameset' in CSS, and then you can float whatever you want on top, in the same window. Another idea - if your floating logo must sit over, for instance, two frames, then slice the logo in two, and float half over one frame and the other half over the other frame, using absolute positioning. Alternatively, move your logo so it only covers one frame. Or make the logo smaller. Tim in Ireland. ------------------------------------------------------------------------------ _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript -------------- next part -------------- An HTML attachment was scrubbed... URL: From rer at datacompusa.com Fri Jan 23 11:37:22 2004 From: rer at datacompusa.com (Roger Roelofs) Date: Fri, 23 Jan 2004 12:37:22 -0500 Subject: [Javascript] object that floats over frames In-Reply-To: <01b801c3e1d5$aaf06230$addea8c0@ssischaefer.ro> References: <00f301c3e1ac$d098b880$addea8c0@ssischaefer.ro><00dc01c3e1b9$da2e4290$6199a8c0@selima.co.uk><001101c3e1c9$74465bb0$0600000a@elohim><014f01c3e1ce$d91042e0$addea8c0@ssischaefer.ro> <006101c3e1d4$060f7ae0$21e9fea9@ic7g> <01b801c3e1d5$aaf06230$addea8c0@ssischaefer.ro> Message-ID: Dan, I think Tim was on the right track but given your constraints a bit of sneakyness is in order. I would use js to write img tags into both frames, and set the style of the image in the right frame to position the img offscreen left far enough to match the width of the left frame. It make take a bit of experimenting to get it positioned exactly right, but it should give the appearance you are looking for. Roger ------------------------------------------------------- Roger Roelofs web www.datacompusa.com Datacomp Appraisal Services web www.mhvillage.com 3215 Eaglecrest Drive, NE Email rer at datacompusa.com Grand Rapids, MI 49525-4593 On Jan 23, 2004, at 12:23 PM, Dan Costea wrote: > unfortunately, I can't apply these solutions because I already have > implemented over 300 dialogs (web pages) and I need a general solution > for all of them. I can write a js function that I'm sure it is called > on "onload" event of all frames and in this function I have to > dynamicaly insert the logo, such way that it will be displayed in the > top-left corner of each dialog. From costea.dan at ssi-schaefer.ro Fri Jan 23 11:50:55 2004 From: costea.dan at ssi-schaefer.ro (Dan Costea) Date: Fri, 23 Jan 2004 19:50:55 +0200 Subject: [Javascript] object that floats over frames References: <00f301c3e1ac$d098b880$addea8c0@ssischaefer.ro><00dc01c3e1b9$da2e4290$6199a8c0@selima.co.uk><001101c3e1c9$74465bb0$0600000a@elohim><014f01c3e1ce$d91042e0$addea8c0@ssischaefer.ro><006101c3e1d4$060f7ae0$21e9fea9@ic7g><01b801c3e1d5$aaf06230$addea8c0@ssischaefer.ro> Message-ID: <01e601c3e1d9$731d51c0$addea8c0@ssischaefer.ro> I probably didn't explained too good my situation. I have over 300 different dialogs, with one or 10 frames, big or small, ... And I want, no metter how many frames the dialog have and how big it is, to have the logo displayed. For example, a good solution would be with a window.createPopup() object - I could insert in it the logo and position it in the top-left corner, and it would be displayed no metter what (but I cannot apply this solution because of my context menu, that is also implemented with a popup object). Thanks, Dan Costea. ----- Original Message ----- From: "Roger Roelofs" To: "[JavaScript List]" Sent: Friday, January 23, 2004 7:37 PM Subject: Re: [Javascript] object that floats over frames > Dan, > > I think Tim was on the right track but given your constraints a bit of > sneakyness is in order. I would use js to write img tags into both > frames, and set the style of the image in the right frame to position > the img offscreen left far enough to match the width of the left frame. > It make take a bit of experimenting to get it positioned exactly > right, but it should give the appearance you are looking for. > > Roger > ------------------------------------------------------- > Roger Roelofs web www.datacompusa.com > Datacomp Appraisal Services web www.mhvillage.com > 3215 Eaglecrest Drive, NE Email rer at datacompusa.com > Grand Rapids, MI 49525-4593 > > On Jan 23, 2004, at 12:23 PM, Dan Costea wrote: > > > unfortunately, I can't apply these solutions because I already have > > implemented over 300 dialogs (web pages) and I need a general solution > > for all of them. I can write a js function that I'm sure it is called > > on "onload" event of all frames and in this function I have to > > dynamicaly insert the logo, such way that it will be displayed in the > > top-left corner of each dialog. > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript From spindrift at oceanfree.net Fri Jan 23 12:19:50 2004 From: spindrift at oceanfree.net (Tim Makins) Date: Fri, 23 Jan 2004 18:19:50 -0000 Subject: [Javascript] object that floats over frames References: <00f301c3e1ac$d098b880$addea8c0@ssischaefer.ro><00dc01c3e1b9$da2e4290$6199a8c0@selima.co.uk><001101c3e1c9$74465bb0$0600000a@elohim><014f01c3e1ce$d91042e0$addea8c0@ssischaefer.ro><006101c3e1d4$060f7ae0$21e9fea9@ic7g><01b801c3e1d5$aaf06230$addea8c0@ssischaefer.ro> <01e601c3e1d9$731d51c0$addea8c0@ssischaefer.ro> Message-ID: <000a01c3e1dd$8030a700$21e9fea9@ic7g> How about creating a new frameset, with one thin top frame and a bottom frame that takes the rest of the available space. Then put your logo in the top frame, and put your current framsets and content in the bottom frame. Tim in Ireland. ----- Original Message ----- From: "Dan Costea" To: "[JavaScript List]" Sent: Friday, January 23, 2004 5:50 PM Subject: Re: [Javascript] object that floats over frames > I probably didn't explained too good my situation. I have over 300 different > dialogs, with one or 10 frames, big or small, ... And I want, no metter how > many frames the dialog have and how big it is, to have the logo displayed... From vladl at ines.ro Fri Jan 23 13:43:00 2004 From: vladl at ines.ro (Vlad Lepadatu) Date: Fri, 23 Jan 2004 21:43:00 +0200 Subject: [Javascript] object that floats over frames References: <00f301c3e1ac$d098b880$addea8c0@ssischaefer.ro><00dc01c3e1b9$da2e4290$6199a8c0@selima.co.uk><001101c3e1c9$74465bb0$0600000a@elohim><014f01c3e1ce$d91042e0$addea8c0@ssischaefer.ro><006101c3e1d4$060f7ae0$21e9fea9@ic7g> <01b801c3e1d5$aaf06230$addea8c0@ssischaefer.ro> Message-ID: <42c301c3e1e9$1bf58290$0200a8c0@vlad> what about using iframes instead of frames? just make a nice table and insert them in. ----- Original Message ----- From: Dan Costea To: [JavaScript List] Sent: Friday, January 23, 2004 7:23 PM Subject: Re: [Javascript] object that floats over frames unfortunately, I can't apply these solutions because I already have implemented over 300 dialogs (web pages) and I need a general solution for all of them. I can write a js function that I'm sure it is called on "onload" event of all frames and in this function I have to dynamicaly insert the logo, such way that it will be displayed in the top-left corner of each dialog. ----- Original Message ----- From: Tim Makins To: [JavaScript List] Sent: Friday, January 23, 2004 7:12 PM Subject: Re: [Javascript] object that floats over frames A bit of lateral thinking: How about creating your 'frameset' in CSS, and then you can float whatever you want on top, in the same window. Another idea - if your floating logo must sit over, for instance, two frames, then slice the logo in two, and float half over one frame and the other half over the other frame, using absolute positioning. Alternatively, move your logo so it only covers one frame. Or make the logo smaller. Tim in Ireland. ---------------------------------------------------------------------------- _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From christ at saeweb.com Fri Jan 23 13:56:31 2004 From: christ at saeweb.com (Chris Tifer) Date: Fri, 23 Jan 2004 14:56:31 -0500 Subject: [Javascript] object that floats over frames References: <00f301c3e1ac$d098b880$addea8c0@ssischaefer.ro><00dc01c3e1b9$da2e4290$6199a8c0@selima.co.uk><001101c3e1c9$74465bb0$0600000a@elohim><014f01c3e1ce$d91042e0$addea8c0@ssischaefer.ro><006101c3e1d4$060f7ae0$21e9fea9@ic7g><01b801c3e1d5$aaf06230$addea8c0@ssischaefer.ro> <42c301c3e1e9$1bf58290$0200a8c0@vlad> Message-ID: <017201c3e1ea$ff392d80$df0110ac@saweb.lcl> IFRAMEs don't always serve the same purpose as frames. Sometimes people use FRAMEs so that some information is always in the same spot on the screen. That's not the case with IFRAMEs ----- Original Message ----- From: Vlad Lepadatu To: [JavaScript List] Sent: Friday, January 23, 2004 2:43 PM Subject: Re: [Javascript] object that floats over frames what about using iframes instead of frames? just make a nice table and insert them in. ----- Original Message ----- From: Dan Costea To: [JavaScript List] Sent: Friday, January 23, 2004 7:23 PM Subject: Re: [Javascript] object that floats over frames unfortunately, I can't apply these solutions because I already have implemented over 300 dialogs (web pages) and I need a general solution for all of them. I can write a js function that I'm sure it is called on "onload" event of all frames and in this function I have to dynamicaly insert the logo, such way that it will be displayed in the top-left corner of each dialog. ----- Original Message ----- From: Tim Makins To: [JavaScript List] Sent: Friday, January 23, 2004 7:12 PM Subject: Re: [Javascript] object that floats over frames A bit of lateral thinking: How about creating your 'frameset' in CSS, and then you can float whatever you want on top, in the same window. Another idea - if your floating logo must sit over, for instance, two frames, then slice the logo in two, and float half over one frame and the other half over the other frame, using absolute positioning. Alternatively, move your logo so it only covers one frame. Or make the logo smaller. Tim in Ireland. -------------------------------------------------------------------------- _______________________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From peter at brunone.com Fri Jan 23 14:01:41 2004 From: peter at brunone.com (Peter Brunone) Date: Fri, 23 Jan 2004 14:01:41 -0600 Subject: [Javascript] object that floats over frames In-Reply-To: <017201c3e1ea$ff392d80$df0110ac@saweb.lcl> Message-ID: <006601c3e1eb$b85358e0$0502a8c0@monkeyhouse> What if you control their size and position with CSS? Just set the relevant attributes equal to percentages of the browser dimensions, and you should be covered. -----Original Message----- From: javascript-bounces at LaTech.edu On Behalf Of Chris Tifer IFRAMEs don't always serve the same purpose as frames. Sometimes people use FRAMEs so that some information is always in the same spot on the screen. That's not the case with IFRAMEs ----- Original Message ----- From: Vlad Lepadatu what about using iframes instead of frames? just make a nice table and insert them in. ----- Original Message ----- From: Dan Costea unfortunately, I can't apply these solutions because I already have implemented over 300 dialogs (web pages) and I need a general solution for all of them. I can write a js function that I'm sure it is called on "onload" event of all frames and in this function I have to dynamicaly insert the logo, such way that it will be displayed in the top-left corner of each dialog. ----- Original Message ----- From: Tim Makins A bit of lateral thinking: How about creating your 'frameset' in CSS, and then you can float whatever you want on top, in the same window. Another idea - if your floating logo must sit over, for instance, two frames, then slice the logo in two, and float half over one frame and the other half over the other frame, using absolute positioning. Alternatively, move your logo so it only covers one frame. Or make the logo smaller. Tim in Ireland. From christ at saeweb.com Fri Jan 23 14:15:28 2004 From: christ at saeweb.com (Chris Tifer) Date: Fri, 23 Jan 2004 15:15:28 -0500 Subject: [Javascript] object that floats over frames References: <006601c3e1eb$b85358e0$0502a8c0@monkeyhouse> Message-ID: <018701c3e1ed$a4e4e970$df0110ac@saweb.lcl> If this person said this was an Intranet application utilizing a capable browser, that'd be a safe option, but I'm sure they don't want to go changing their existing application to do this. I know I wouldn't. ----- Original Message ----- From: "Peter Brunone" To: "'[JavaScript List]'" Sent: Friday, January 23, 2004 3:01 PM Subject: RE: [Javascript] object that floats over frames > > What if you control their size and position with CSS? Just set the > relevant attributes equal to percentages of the browser dimensions, and > you should be covered. > > -----Original Message----- > From: javascript-bounces at LaTech.edu On Behalf Of Chris Tifer > > IFRAMEs don't always serve the same purpose as frames. > > Sometimes people use FRAMEs so that some information is always in the > same spot on the screen. That's not the case with IFRAMEs > > ----- Original Message ----- > From: Vlad Lepadatu > > what about using iframes instead of frames? just make a nice table and > insert them in. > > ----- Original Message ----- > From: Dan Costea > > unfortunately, I can't apply these solutions because I already have > implemented over 300 dialogs (web pages) and I need a general solution > for all of them. I can write a js function that I'm sure it is called on > "onload" event of all frames and in this function I have to dynamicaly > insert the logo, such way that it will be displayed in the top-left > corner of each dialog. > > ----- Original Message ----- > From: Tim Makins > > A bit of lateral thinking: > > How about creating your 'frameset' in CSS, and then you can float > whatever you want on top, in the same window. > > Another idea - if your floating logo must sit over, for instance, two > frames, then slice the logo in two, and float half over one frame and > the other half over the other frame, using absolute positioning. > > Alternatively, move your logo so it only covers one frame. Or make the > logo smaller. > > Tim in Ireland. > > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript From peter at brunone.com Fri Jan 23 15:11:57 2004 From: peter at brunone.com (Peter Brunone) Date: Fri, 23 Jan 2004 15:11:57 -0600 Subject: [Javascript] object that floats over frames In-Reply-To: <018701c3e1ed$a4e4e970$df0110ac@saweb.lcl> Message-ID: <007001c3e1f5$892227e0$0502a8c0@monkeyhouse> Well, Dan said he was using IE6, which is certainly capable enough to handle iframes and their positioning attributes. Sure, he may not want to spend the time necessary to go that route... but your assertion was that iframes can't be kept in one spot like frames can, which of course isn't true. -----Original Message----- From: javascript-bounces at LaTech.edu On Behalf Of Chris Tifer If this person said this was an Intranet application utilizing a capable browser, that'd be a safe option, but I'm sure they don't want to go changing their existing application to do this. I know I wouldn't. ----- Original Message ----- From: "Peter Brunone" > > What if you control their size and position with CSS? Just set > the relevant attributes equal to percentages of the browser > dimensions, and you should be covered. > > -----Original Message----- > From: javascript-bounces at LaTech.edu On Behalf Of Chris Tifer > > IFRAMEs don't always serve the same purpose as frames. > > Sometimes people use FRAMEs so that some information is always in the > same spot on the screen. That's not the case with IFRAMEs > > ----- Original Message ----- > From: Vlad Lepadatu > > what about using iframes instead of frames? just make a nice table and > insert them in. > > ----- Original Message ----- > From: Dan Costea > > unfortunately, I can't apply these solutions because I already have > implemented over 300 dialogs (web pages) and I need a general solution > for all of them. I can write a js function that I'm sure it is called > on "onload" event of all frames and in this function I have to > dynamicaly insert the logo, such way that it will be displayed in the > top-left corner of each dialog. > > ----- Original Message ----- > From: Tim Makins > > A bit of lateral thinking: > > How about creating your 'frameset' in CSS, and then you can float > whatever you want on top, in the same window. > > Another idea - if your floating logo must sit over, for instance, two > frames, then slice the logo in two, and float half over one frame and > the other half over the other frame, using absolute positioning. > > Alternatively, move your logo so it only covers one frame. Or make the > logo smaller. > > Tim in Ireland. From christ at saeweb.com Fri Jan 23 15:20:49 2004 From: christ at saeweb.com (Chris Tifer) Date: Fri, 23 Jan 2004 16:20:49 -0500 Subject: [Javascript] object that floats over frames References: <007001c3e1f5$892227e0$0502a8c0@monkeyhouse> Message-ID: <01b301c3e1f6$c61bc920$df0110ac@saweb.lcl> Without any extra code, they cannot. Sure, if you want to use some special technique, that's all well and good. I missed where he said they were using IE6. But what I said is true - when not used in conjunction with JavaScript. FRAMES and IFRAMES have 2 different uses... IFRAMES are used to embed a page inside of another. ----- Original Message ----- From: "Peter Brunone" To: "'[JavaScript List]'" Sent: Friday, January 23, 2004 4:11 PM Subject: RE: [Javascript] object that floats over frames > > Well, Dan said he was using IE6, which is certainly capable > enough to handle iframes and their positioning attributes. Sure, he may > not want to spend the time necessary to go that route... but your > assertion was that iframes can't be kept in one spot like frames can, > which of course isn't true. > > -----Original Message----- > From: javascript-bounces at LaTech.edu On Behalf Of Chris Tifer > > If this person said this was an Intranet application utilizing a capable > browser, that'd be a safe option, but I'm sure they don't want to go > changing their existing application to do this. I know I wouldn't. > > ----- Original Message ----- > From: "Peter Brunone" > > > > What if you control their size and position with CSS? Just set > > the relevant attributes equal to percentages of the browser > > dimensions, and you should be covered. > > > > -----Original Message----- > > From: javascript-bounces at LaTech.edu On Behalf Of Chris Tifer > > > > IFRAMEs don't always serve the same purpose as frames. > > > > Sometimes people use FRAMEs so that some information is always in the > > same spot on the screen. That's not the case with IFRAMEs > > > > ----- Original Message ----- > > From: Vlad Lepadatu > > > > what about using iframes instead of frames? just make a nice table and > > > insert them in. > > > > ----- Original Message ----- > > From: Dan Costea > > > > unfortunately, I can't apply these solutions because I already have > > implemented over 300 dialogs (web pages) and I need a general solution > > > for all of them. I can write a js function that I'm sure it is called > > on "onload" event of all frames and in this function I have to > > dynamicaly insert the logo, such way that it will be displayed in the > > top-left corner of each dialog. > > > > ----- Original Message ----- > > From: Tim Makins > > > > A bit of lateral thinking: > > > > How about creating your 'frameset' in CSS, and then you can float > > whatever you want on top, in the same window. > > > > Another idea - if your floating logo must sit over, for instance, two > > frames, then slice the logo in two, and float half over one frame and > > the other half over the other frame, using absolute positioning. > > > > Alternatively, move your logo so it only covers one frame. Or make the > > > logo smaller. > > > > Tim in Ireland. > > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript From peter at brunone.com Fri Jan 23 15:25:00 2004 From: peter at brunone.com (Peter Brunone) Date: Fri, 23 Jan 2004 15:25:00 -0600 Subject: [Javascript] object that floats over frames In-Reply-To: <01b301c3e1f6$c61bc920$df0110ac@saweb.lcl> Message-ID: <007101c3e1f7$5bdf04e0$0502a8c0@monkeyhouse> Why would you need Javascript? Just tell the iframe what its attributes are at design time. Even frames need that much instruction. Of course, by saying that, I've kind of made my response off-topic... -----Original Message----- From: javascript-bounces at LaTech.edu On Behalf Of Chris Tifer Without any extra code, they cannot. Sure, if you want to use some special technique, that's all well and good. I missed where he said they were using IE6. But what I said is true - when not used in conjunction with JavaScript. FRAMES and IFRAMES have 2 different uses... IFRAMES are used to embed a page inside of another. ----- Original Message ----- From: "Peter Brunone" To: "'[JavaScript List]'" Sent: Friday, January 23, 2004 4:11 PM Subject: RE: [Javascript] object that floats over frames > > Well, Dan said he was using IE6, which is certainly capable enough to > handle iframes and their positioning attributes. Sure, he may not > want to spend the time necessary to go that route... but your > assertion was that iframes can't be kept in one spot like frames can, > which of course isn't true. > > -----Original Message----- > From: javascript-bounces at LaTech.edu On Behalf Of Chris Tifer > > If this person said this was an Intranet application utilizing a > capable browser, that'd be a safe option, but I'm sure they don't want > to go changing their existing application to do this. I know I > wouldn't. > > ----- Original Message ----- > From: "Peter Brunone" > > > > What if you control their size and position with CSS? Just set > > the relevant attributes equal to percentages of the browser > > dimensions, and you should be covered. > > > > -----Original Message----- > > From: javascript-bounces at LaTech.edu On Behalf Of Chris Tifer > > > > IFRAMEs don't always serve the same purpose as frames. > > > > Sometimes people use FRAMEs so that some information is always in > > the same spot on the screen. That's not the case with IFRAMEs > > > > ----- Original Message ----- > > From: Vlad Lepadatu > > > > what about using iframes instead of frames? just make a nice table > > and > > > insert them in. > > > > ----- Original Message ----- > > From: Dan Costea > > > > unfortunately, I can't apply these solutions because I already have > > implemented over 300 dialogs (web pages) and I need a general > > solution > > > for all of them. I can write a js function that I'm sure it is > > called on "onload" event of all frames and in this function I have > > to dynamicaly insert the logo, such way that it will be displayed in > > the top-left corner of each dialog. > > > > ----- Original Message ----- > > From: Tim Makins > > > > A bit of lateral thinking: > > > > How about creating your 'frameset' in CSS, and then you can float > > whatever you want on top, in the same window. > > > > Another idea - if your floating logo must sit over, for instance, > > two frames, then slice the logo in two, and float half over one > > frame and the other half over the other frame, using absolute > > positioning. > > > > Alternatively, move your logo so it only covers one frame. Or make > > the > > > logo smaller. > > > > Tim in Ireland. > > > _______________________________________________ > 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 peter at brunone.com Fri Jan 23 15:26:27 2004 From: peter at brunone.com (Peter Brunone) Date: Fri, 23 Jan 2004 15:26:27 -0600 Subject: [Javascript] object that floats over frames In-Reply-To: <019101c3e1d4$35f438e0$addea8c0@ssischaefer.ro> Message-ID: <007201c3e1f7$8fea3b10$0502a8c0@monkeyhouse> Sorry to get your hopes up about that; I was hoping it would be possible, but after playing with the code for a while, I haven't found anything. -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of Dan Costea Peter, that sounds good. But I couldn't insert an iframe in the top, and make it float over 2 other frames... Maybe you can give me a hint, plese (a frameset structure with an iframe that can float over it's siblings...) ----- Original Message ----- From: Peter Brunone Dan, What about an iframe in the parent page? You can move them, change their z-index, and basically do just about anything. It can't move outside the window, but it might be able to transcend its brother frames. -Peter -----Original Message----- From: javascript-bounces at LaTech.edu On Behalf Of Dan Costea What I want to do is to display a logo in the up-left corner of the pages. The pages are already created, and it is possible that the up-left corner is splited in 2 frames (with frameborder="no") and in these cases the logo have to float over 2 frames. I don't want to use a popup object because I have my own context menu (at right click) that is created with window.createPopup(), so, when I'll open the context menu the logo will be closed. I considered to use showModelessDialog, but the problem in this case is that I don't know how to get rid of the title bar and the window borders... ----- Original Message ----- From: David Lovering Has anyone considered launching a new window? It will float over frames, (and can contain new ones if need be), and the layer control can put it anywhere in the stack that you need it. Yes, it can be superseded by other layers (even pop-ups can be "invisibled"), but as long as focus is locked on it while its function remains current, and it is destroyed when that function no longer applies, you basicly have a super-delux pop-up. All the windows/frames can communicate with the elements of all the others (even though the DOM tree can be pretty baroque), so there's no problem in exchanging data between them. I'm not sure I understand why this approach wasn't considered. [By "pop-up" I am assuming we are talking about the peculiar IE construct, and not just another slave window -- the same solution I am pushing]. -- Dave Lovering ----- Original Message ----- From: Matt Barton Hi Dan, I have had to find a solution to this too (this week in fact). Unfortunately I found nothing apart from the popup object (i.e. document.createPopup()) that would float over frames. I didn't want to use the popup object either, but with a fair bit of experimentation I have found it to be very useful, and fits my application perfectly (also IE6/Win intranet app). If you want any hints with using the popup object then don't be afraid to ask :) Matt ----- Original Message ----- From: Dan Costea Hi! I work with IE6 (an intranet applicaiton). I need an object that can float over frames, like a popup object (but not this object). For example, I have an HTML page with frames and I need an object that will stay visible at a certain position (for example, exactly in the middle of the page, no metter that at this area is splitted by frames). Do you know if such object exists in IE? If yes, what is it? Thanks, Dan Costea. From kakridge at bellsouth.net Fri Jan 23 22:04:58 2004 From: kakridge at bellsouth.net (Kenny Akridge) Date: Fri, 23 Jan 2004 23:04:58 -0500 Subject: [Javascript] Netscape 7.1, window.close()... sorry if this is a FAQ Message-ID: <004301c3e22f$3b6bb2c0$02fea8c0@XP1700> Hello.. this is my first post to the list, so forgive me if I break a rule. I am pretty new to using javascript in a professional manner, so I need a little help on something. It seems pretty clear to me at this point that Netscape 7.1 will not allow a window to be closed with window.close() if the window was not opened by javascript. That sounds good to me, and I believe that is a W3C spec. Here is my problem though. I have a page, let's say x.html. The page has a script like this: function LoginBrowser() { window.open("foo/login.aspx","LoginWindow","resizable=no,width=300,heigh t=370,toolbar=no") } in my login.aspx file, I call this function with an onClick: function refreshParent(url) { window.opener.location.href = url; if (window.opener.progressWindow) window.opener.progressWindow.close(); window.close(); } Works fine in IE6 and Netscape 7.1 locally, but when I use SSL on NN 7.1, the window will not close. Any suggestions? From costea.dan at ssi-schaefer.ro Mon Jan 26 00:48:00 2004 From: costea.dan at ssi-schaefer.ro (Dan Costea) Date: Mon, 26 Jan 2004 08:48:00 +0200 Subject: [Javascript] object that floats over frames References: <007201c3e1f7$8fea3b10$0502a8c0@monkeyhouse> Message-ID: <002f01c3e3d8$570f56d0$addea8c0@ssischaefer.ro> Thank you all for the answers. The solution I implemented is a little js code that search the top left frame and inserts the logo there (with absolute position). The problem is that now I need probably 2 days to check all webpages and fix the ones that looks bad (the logo didn't fit - it is spitted by other frames). Thanks again, Dan Costea. ----- Original Message ----- From: "Peter Brunone" To: "'[JavaScript List]'" Sent: Friday, January 23, 2004 11:26 PM Subject: RE: [Javascript] object that floats over frames > > Sorry to get your hopes up about that; I was hoping it would be > possible, but after playing with the code for a while, I haven't found > anything. > > -----Original Message----- > From: javascript-bounces at LaTech.edu > [mailto:javascript-bounces at LaTech.edu] On Behalf Of Dan Costea > > Peter, > that sounds good. But I couldn't insert an iframe in the top, and make > it float over 2 other frames... Maybe you can give me a hint, plese (a > frameset structure with an iframe that can float over it's siblings...) > ----- Original Message ----- > From: Peter Brunone > > Dan, > > What about an iframe in the parent page? You can move them, change > their z-index, and basically do just about anything. It can't move > outside the window, but it might be able to transcend its brother > frames. > > -Peter > -----Original Message----- > From: javascript-bounces at LaTech.edu On Behalf Of Dan Costea > > What I want to do is to display a logo in the up-left corner of the > pages. The pages are already created, and it is possible that the > up-left corner is splited in 2 frames (with frameborder="no") and in > these cases the logo have to float over 2 frames. > > I don't want to use a popup object because I have my own context menu > (at right click) that is created with window.createPopup(), so, when > I'll open the context menu the logo will be closed. > > I considered to use showModelessDialog, but the problem in this case is > that I don't know how to get rid of the title bar and the window > borders... > > ----- Original Message ----- > From: David Lovering > > Has anyone considered launching a new window? It will float over > frames, (and can contain new ones if need be), and the layer control can > put it anywhere in the stack that you need it. Yes, it can be > superseded by other layers (even pop-ups can be "invisibled"), but as > long as focus is locked on it while its function remains current, and it > is destroyed when that function no longer applies, you basicly have a > super-delux pop-up. All the windows/frames can communicate with the > elements of all the others (even though the DOM tree can be pretty > baroque), so there's no problem in exchanging data between them. > > I'm not sure I understand why this approach wasn't considered. > > [By "pop-up" I am assuming we are talking about the peculiar IE > construct, and not just another slave window -- the same solution I am > pushing]. > > -- Dave Lovering > ----- Original Message ----- > From: Matt Barton > > Hi Dan, > > I have had to find a solution to this too (this week in fact). > Unfortunately I found nothing apart from the popup object (i.e. > document.createPopup()) that would float over frames. I didn't want to > use the popup object either, but with a fair bit of experimentation I > have found it to be very useful, and fits my application perfectly (also > IE6/Win intranet app). > > If you want any hints with using the popup object then don't be afraid > to ask :) > > Matt > ----- Original Message ----- > From: Dan Costea > > Hi! > > I work with IE6 (an intranet applicaiton). I need an object that can > float over frames, like a popup object (but not this object). For > example, I have an HTML page with frames and I need an object that will > stay visible at a certain position (for example, exactly in the middle > of the page, no metter that at this area is splitted by frames). Do you > know if such object exists in IE? If yes, what is it? > > Thanks, > Dan Costea. > > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript From trojani2000 at hotmail.com Wed Jan 28 02:11:49 2004 From: trojani2000 at hotmail.com (BEKIM BACAJ) Date: Wed, 28 Jan 2004 09:11:49 +0100 Subject: [Javascript] locking contents-OK/empty clpB Message-ID: Sorry for my delay, one of the way's to empty the clipboard during window switch is this: function clearCLPBRD(){ window.clipboardData.setData('text','') } onblur=clearCLPBRD >From: "sebastian" >Reply-To: "[JavaScript List]" >To: "[JavaScript List]" >Subject: RE: [Javascript] locking contents-OK >Date: Thu, 22 Jan 2004 07:55:31 +0100 > >How can I empty the clipboard? What's the syntax? I've searched the >internet >but I havent found it. > >Thanks, Sebastian > > >-----Original Message----- >From: javascript-bounces at LaTech.edu >[mailto:javascript-bounces at LaTech.edu]On Behalf Of BEKIM BACAJ >Sent: Saturday, January 17, 2004 3:14 AM >To: javascript at LaTech.edu >Subject: Re: [Javascript] locking contents-OK > > > >What do you mean by "web-page dialog"? >As about "web-page dialog" we will come to it later if needed. > > >Print screen doesn't output an image. It copies the contents into the > >clipboard. Then you just open your favorite editor and paste and voila, > >you've got a screenie. > >Well that's great! > >Because you can allways empty te pockets of your students before they leave >the class! >That is, you can always use the 'onblur' and the 'unload' event to empty >the >clipboard! >Preventing the chache is even easier. >So, we should consider thismatter as solved. >Ofcourse only if this data are accesible only hrough some local net in the >schooll. >Because one can always grab the pencil and write all the contents down t >home. > >Chris Tifer > > > >----- Original Message ----- > >From: "BEKIM BACAJ" > >To: > >Sent: Friday, January 16, 2004 11:48 AM > >Subject: Re: [Javascript] locking contents > > > > > > > > > > Has anybody ever used web-page dialog for this matter? > > > I think it will do good protection to the material you wish > > > to be wiewed only. And sorry, where can I find the copies I've done >with > > > print screen cmnd while working on windows env? > > > > > > >From: "Tim Makins" > > > >Reply-To: "[JavaScript List]" > > > >To: "[JavaScript List]" > > > >Subject: Re: [Javascript] locking contents > > > >Date: Fri, 16 Jan 2004 15:22:38 -0000 > > > > > > > >Have you looked into using pdf files ? I think they can be locked in > > > >different ways. > > > > > > > >Tim in Ireland. > > > > > > > >----- Original Message ----- > > > >From: "sebastian" > > > >To: "[JavaScript List]" > > > >Sent: Friday, January 16, 2004 2:17 PM > > > >Subject: RE: [Javascript] locking contents > > > > > > > > > >I have to prevent that users who browse my HTML pages can do: > > > > > >- select and copy the contents > > > > > >- print the contents > > > > > >- save the html page > > > > > >- edit source > > > > > > > > > > > >Bassically they can only view the contents. > > > > > >Is anything od this possible? > > > > > >The content of a page is a set of exam questions that should't be > > > >copied, > > > > > >printed ecc. I know that there's always printscreen... > > > > > > > > > > > >Thanks. > > > > > > > > > > > >Sebastian > > > > > > > > > > > > > > > >_______________________________________________ > > > >Javascript mailing list > > > >Javascript at LaTech.edu > > > >https://lists.LaTech.edu/mailman/listinfo/javascript > > > > > > _________________________________________________________________ > > > STOP MORE SPAM with the new MSN 8 and get 2 months FREE* > > > http://join.msn.com/?page=features/junkmail > > > > > > _______________________________________________ > > > 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 > >_________________________________________________________________ >Tired of spam? Get advanced junk mail protection with MSN 8. >http://join.msn.com/?page=features/junkmail > >_______________________________________________ >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 _________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 From chriz at basken.com Fri Jan 30 14:36:16 2004 From: chriz at basken.com (Chris Basken) Date: Fri, 30 Jan 2004 15:36:16 -0500 Subject: [Javascript] iframe size (may be an HTML issue) Message-ID: <001501c3e770$b5e89d60$0601a8c0@Elmark> Silly question time. If I'm pulling another HTML doc into an iframe, is it possible to set the iframe's height to fit the content of the HTML doc? This is a template page that uses JS to define the src of the iframe depending on another parameter, but different src docs have different lengths and I'd like to avoid scrolling. I know I can use: document.all['myIframe'].style.height = x; So I need to determine x from the content of the HTML doc that's being pulled in, but that would depend on how it flowed, so I can't really know that ahead of time (each such doc has a master table, so I can match widths, but how do I determine the height?). From peter at brunone.com Fri Jan 30 15:04:03 2004 From: peter at brunone.com (Peter Brunone) Date: Fri, 30 Jan 2004 15:04:03 -0600 Subject: [Javascript] iframe size (may be an HTML issue) In-Reply-To: <001501c3e770$b5e89d60$0601a8c0@Elmark> Message-ID: <00bb01c3e774$976a1400$0502a8c0@monkeyhouse> Wow... how tall is a three-gallon bag of water? If you know the width, maybe you can get the body as a string and count the number of characters... But that isn't really a reliable number since resolutions, font sizes, and invisible text may be a factor (although I suppose you could mitigate the last one by counting the .innerText characters of every element in the doc). Why is it necessary to avoid scrolling? Cheers, Peter -----Original Message----- From: javascript-bounces at LaTech.edu On Behalf Of Chris Basken Silly question time. If I'm pulling another HTML doc into an iframe, is it possible to set the iframe's height to fit the content of the HTML doc? This is a template page that uses JS to define the src of the iframe depending on another parameter, but different src docs have different lengths and I'd like to avoid scrolling. I know I can use: document.all['myIframe'].style.height = x; So I need to determine x from the content of the HTML doc that's being pulled in, but that would depend on how it flowed, so I can't really know that ahead of time (each such doc has a master table, so I can match widths, but how do I determine the height?). From chriz at basken.com Fri Jan 30 18:45:40 2004 From: chriz at basken.com (Chris Basken) Date: Fri, 30 Jan 2004 19:45:40 -0500 Subject: [Javascript] iframe size (may be an HTML issue) References: <00bb01c3e774$976a1400$0502a8c0@monkeyhouse> Message-ID: <000501c3e793$8cec96f0$0601a8c0@Elmark> I suppose it isn't. It dawned on me I could use a DIV, but I don't want to muck around with absolute positioning... ----- Original Message ----- From: "Peter Brunone" To: "'[JavaScript List]'" Sent: Friday, January 30, 2004 4:04 PM Subject: RE: [Javascript] iframe size (may be an HTML issue) > > Wow... how tall is a three-gallon bag of water? > > If you know the width, maybe you can get the body as a string > and count the number of characters... But that isn't really a reliable > number since resolutions, font sizes, and invisible text may be a factor > (although I suppose you could mitigate the last one by counting the > .innerText characters of every element in the doc). Why is it necessary > to avoid scrolling? > > Cheers, > > Peter > > -----Original Message----- > From: javascript-bounces at LaTech.edu On Behalf Of Chris Basken > > Silly question time. > > If I'm pulling another HTML doc into an iframe, is it possible to set > the iframe's height to fit the content of the HTML doc? This is a > template page that uses JS to define the src of the iframe depending on > another parameter, but different src docs have different lengths and I'd > like to avoid scrolling. > > I know I can use: > > document.all['myIframe'].style.height = x; > > So I need to determine x from the content of the HTML doc that's being > pulled in, but that would depend on how it flowed, so I can't really > know that ahead of time (each such doc has a master table, so I can > match widths, but how do I determine the height?). > > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > > From peter at brunone.com Sat Jan 31 10:56:32 2004 From: peter at brunone.com (Peter Brunone) Date: Sat, 31 Jan 2004 10:56:32 -0600 Subject: [Javascript] iframe size (may be an HTML issue) In-Reply-To: <000501c3e793$8cec96f0$0601a8c0@Elmark> Message-ID: <00f101c3e81b$2e0534c0$0502a8c0@monkeyhouse> You can relatively position a div tag as well, just like an iframe. -----Original Message----- From: javascript-bounces at LaTech.edu On Behalf Of Chris Basken I suppose it isn't. It dawned on me I could use a DIV, but I don't want to muck around with absolute positioning... ----- Original Message ----- From: "Peter Brunone" > > Wow... how tall is a three-gallon bag of water? > > If you know the width, maybe you can get the body as a string and > count the number of characters... But that isn't really a reliable > number since resolutions, font sizes, and invisible text may be a > factor (although I suppose you could mitigate the last one by counting > the .innerText characters of every element in the doc). Why is it > necessary to avoid scrolling? > > Cheers, > > Peter > > -----Original Message----- > From: javascript-bounces at LaTech.edu On Behalf Of Chris Basken > > Silly question time. > > If I'm pulling another HTML doc into an iframe, is it possible to set > the iframe's height to fit the content of the HTML doc? This is a > template page that uses JS to define the src of the iframe depending > on another parameter, but different src docs have different lengths > and I'd like to avoid scrolling. > > I know I can use: > > document.all['myIframe'].style.height = x; > > So I need to determine x from the content of the HTML doc that's being > pulled in, but that would depend on how it flowed, so I can't really > know that ahead of time (each such doc has a master table, so I can > match widths, but how do I determine the height?). > > > _______________________________________________ > 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