From merchant at LATECH.EDU Mon Apr 1 10:05:25 2002 From: merchant at LATECH.EDU (David Merchant) Date: Mon, 01 Apr 2002 10:05:25 -0600 Subject: [Javascript] JavaScript List Unsubscirbe, Subscribe & Posting Info. Message-ID: <5.1.0.14.2.20020401100505.026787a0@mail.latech.edu> There are two sets of instructions, first for those who joined the list directly and second for those who joined the list via egroups (at present I cannot manually unsubscribe anyone who joined via Yahoo Groups or eGroups). 1. If you wish to subscribe or unsubscribe, visit https://lists.LaTech.edu/mailman/listinfo/javascript or send a message with the word `help' in it to the request address, javascript-request at LaTech.edu, for further instructions. To post to the list, send your posts to javascript at latech.edu 2. For those who subscribed to the Javascript list via Yahoo Groups (formally eGroups), here is how to unsubscribe: To unsubscribe via email: From your email program, send a blank message to: javascript-unsubscribe at yahoogroups.com To unsubscribe via the Web: * Sign in to Yahoo! Groups and go to the My Groups page. * Click on the Edit Message Settings link at the top of the page. * Look for the group you wish to unsubscribe from, and select Unsubscribe from the pull-down list on the right. * Click Update to save your changes. The group will no longer be listed on the My Groups page, and you will no longer receive messages. Note: If you own a group, you must first give up your ownership in the Members section of your group before you can unsubscribe on the My Groups page. I CANNOT manually unsubscribe you if you subscribed to the list via eGroups or Yahoo Groups. I have complained _repeatedly_ about this to the folks at Yahoo Groups, but to no avail. I can only manually unsubscribe those who joined via https://lists.LaTech.edu/mailman/listinfo/javascript. TTFN, David Head, Systems Dept, Louisiana Tech University merchant at latech.edu JavaScript List Administrator (www.mountaindragon.com/javascript/) Webmaster, HTML Encyclopedia (www.mountaindragon.com/html/) Webmaster, Memorial Day Page: (www.usmemorialday.org/) From amin at imkenberg.net Tue Apr 2 04:37:14 2002 From: amin at imkenberg.net (M. Amin) Date: Tue, 2 Apr 2002 12:37:14 +0200 Subject: [Javascript] Is there any available remote scripting tools ? Message-ID: <002401c1da32$5c190c90$f800a8c0@rayasoftware.com> Dear All, Is there any available remote scripting tools ? Any help will be appreciated. Regards, M. Amin -------------- next part -------------- An HTML attachment was scrubbed... URL: From LMuchacho at twii.net Tue Apr 2 06:09:13 2002 From: LMuchacho at twii.net (Muchacho, Laurent (TWIi London)) Date: Tue, 2 Apr 2002 13:09:13 +0100 Subject: [Javascript] Stupid Q on FORMS & TARGET Message-ID: <76A6F0FCCA27D4119DEF00805F5700AC027C3163@lon.webmail.twii.net> Hi Walter Try that javascript function to execute when you submit the form : function submitForm(){ var str=""; for(var i;isubmit form I explain make a simple loop throw the form create a string who contain the full form name and value and change the sources of the specifique page I think that should work in ns4 too I haven't tested yet Laurent -----Original Message----- From: Walter Torres [mailto:walter at torres.ws] Sent: 29 March 2002 15:12 To: javascript at LaTech.edu Subject: RE: [Javascript] Stupid Q on FORMS & TARGET Did that as well. No change. Walter > -----Original Message----- > From: javascript-admin at LaTech.edu > [mailto:javascript-admin at LaTech.edu]On > Behalf Of Peter-Paul Koch > Sent: Friday, March 29, 2002 12:46 AM > To: javascript at LaTech.edu > Subject: Re: [Javascript] Stupid Q on FORMS & TARGET > > > > >I know I am overlooking something really simple here. > > > >I want to get the result back from a FORM submit and place it into a > >particular FRAME. > > > >
> method='post' > > name='logonForm' > > id='logonForm' > > target='master.left'> > > > >This tells me that the reply should show up in the FRAME > named LEFT in the > >WINDOW named MASTER. > > > >Right!?!? > > Wrong. It tells that the reply should show up in the frame named > "master.left" If you wnat the reply in frame left, simply do > > target="left"> > > In HTML you don't need to give the path to the frame through > all other > frames, as you do in JavaScript. > > ppk > > _________________________________________________________________ > Join the world's largest e-mail service with MSN Hotmail. > http://www.hotmail.com > > _______________________________________________ > 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 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 SMartin at neopostonline.com Tue Apr 2 09:43:00 2002 From: SMartin at neopostonline.com (SMartin at neopostonline.com) Date: Tue, 2 Apr 2002 10:43:00 -0500 Subject: [Javascript] Document.preload Message-ID: I have seen references to a function by this name on several Web pages but can't find any documentation on how it works or its syntax. Any pointers? -------------- next part -------------- An HTML attachment was scrubbed... URL: From gassinaumasis at hotmail.com Tue Apr 2 10:53:30 2002 From: gassinaumasis at hotmail.com (Peter-Paul Koch) Date: Tue, 02 Apr 2002 16:53:30 +0000 Subject: [Javascript] Document.preload Message-ID: >I have seen references to a function by this name on several Web pages but >can't find any documentation on how it works or its syntax. Any pointers? This function is not native JavaScript, so I suppose it has been written by the creator of the page. Check the source code or JavaScript includes for the code. ppk _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com From Mark.Drozd at walgreens.com Tue Apr 2 14:47:48 2002 From: Mark.Drozd at walgreens.com (Mark.Drozd at walgreens.com) Date: Tue, 2 Apr 2002 14:47:48 -0600 Subject: [Javascript] Clear history onload= Message-ID: Does anyone have a function that will clear the history so a user cannot use the back button to "go back" or use the address drop down (tool bar) to select a URL where a previous user was? I have an application where new users share a computer. These new users should not be able to go back to (or view) where a previous user was. I would like the first screen of my application to clear the history to null each time that first page loaded. All of my users will be using IE 5.0. All of our browswers are set to reload a new page each time and not cache. Thanks! From gtroll at msn.com Tue Apr 2 15:44:50 2002 From: gtroll at msn.com (Golden Troll) Date: Tue, 2 Apr 2002 13:44:50 -0800 Subject: [Javascript] Clear history onload= In-Reply-To: Message-ID: From another list: I think this will work for you: Courtesy of irt.org http://developer.irt.org/script/902.htm Peace and Respects, Scott Gahres Owner Golden Troll four20 Ventures hemp at goldentroll.com http://goldentroll.com -----Original Message----- From: javascript-admin at LaTech.edu [mailto:javascript-admin at LaTech.edu]On Behalf Of Mark.Drozd at walgreens.com Sent: Tuesday, April 02, 2002 12:48 PM To: javascript at LaTech.edu Subject: [Javascript] Clear history onload= Does anyone have a function that will clear the history so a user cannot use the back button to "go back" or use the address drop down (tool bar) to select a URL where a previous user was? I have an application where new users share a computer. These new users should not be able to go back to (or view) where a previous user was. I would like the first screen of my application to clear the history to null each time that first page loaded. All of my users will be using IE 5.0. All of our browswers are set to reload a new page each time and not cache. Thanks! _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From RFreeman at ncb.org.uk Wed Apr 3 06:47:59 2002 From: RFreeman at ncb.org.uk (RFreeman at ncb.org.uk) Date: Wed, 3 Apr 2002 12:47:59 +0000 Subject: [Javascript] Broken script ! Message-ID: Hi all, First post here as I am new to jscript programming. When a certain link is clicked, I want it to run this script and to change the top frame in my framset (cunningly named topFrame) but it does not seem to work - any help much appreciated. Yours, Rich Click From cutterbl at hotmail.com Wed Apr 3 07:24:41 2002 From: cutterbl at hotmail.com (Cutter Bl) Date: Wed, 03 Apr 2002 08:24:41 -0500 Subject: [Javascript] Broken script ! Message-ID: The "javascript:" construct is unnecessary in the onClick event because it is implied. I would try something more like this: Click Cutter http://www.falcon-knives.com ----Original Message Follows---- From: "Dan Costea" modify your script like this: Click ----- Original Message ----- From: To: Sent: Wednesday, April 03, 2002 4:47 AM Subject: [Javascript] Broken script ! > Hi all, > > First post here as I am new to jscript programming. When a certain link is > clicked, I want it to run this script and to change the top frame in my > framset (cunningly named topFrame) but it does not seem to work - any help > much appreciated. > > Yours, > > Rich > > > > Click > > > _______________________________________________ > 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 _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx From RFreeman at ncb.org.uk Wed Apr 3 08:43:33 2002 From: RFreeman at ncb.org.uk (RFreeman at ncb.org.uk) Date: Wed, 3 Apr 2002 14:43:33 +0000 Subject: [Javascript] Thanks for help Message-ID: Hi Dan, Thanks for your help - it worked a treat ! http://dev.youngtransnet.org.uk/games_offline/hunt/8to11_new.htm Rich From costea.dan at ssi-schaefer.ro Wed Apr 3 16:59:29 2002 From: costea.dan at ssi-schaefer.ro (Dan Costea) Date: Wed, 3 Apr 2002 14:59:29 -0800 Subject: [Javascript] Broken script ! References: Message-ID: <019b01c1db63$366c7f90$8ddea8c0@pcdanc> modify your script like this: Click ----- Original Message ----- From: To: Sent: Wednesday, April 03, 2002 4:47 AM Subject: [Javascript] Broken script ! > Hi all, > > First post here as I am new to jscript programming. When a certain link is > clicked, I want it to run this script and to change the top frame in my > framset (cunningly named topFrame) but it does not seem to work - any help > much appreciated. > > Yours, > > Rich > > > > Click > > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript From gassinaumasis at hotmail.com Tue Apr 9 03:28:23 2002 From: gassinaumasis at hotmail.com (Peter-Paul Koch) Date: Tue, 09 Apr 2002 08:28:23 +0000 Subject: [Javascript] .fireEvent("onchange") and .onchange(); Message-ID: >I work with IE6. Can someone tell me what is the difference between the >methods: fireEvent ("onchange") and onchange ()? fireEvent() is a MS only method while onchange() is cross-browser. >for example, I have a checkbox: myCheckbox; I can use myCheckbox.fireEvent >("onchange") or myCheckbox.onchange (). It seems to do the same think, but >fireEvent method takes much more time (with very many objects). Can you >tell me why? Dunno, never tried it. But use onchange() anyway, since it works everywhere. ppk _________________________________________________________________ Join the world?s largest e-mail service with MSN Hotmail. http://www.hotmail.com From s2audi at yahoo.com Tue Apr 9 08:42:59 2002 From: s2audi at yahoo.com (C Wells) Date: Tue, 9 Apr 2002 06:42:59 -0700 (PDT) Subject: [Javascript] rexec jscript Message-ID: <20020409134259.84021.qmail@web20514.mail.yahoo.com> Hi, I wrote a jscript program that reads 4 registry keys, then calculates the byte count of files in a directory, but I have found out that I won't be allowed to place that js file on the remote servers I need to. "You can't put any code on production servers" So is there a way (w/or w/out jscript) to read a registry key on a remote server ? I would guess calculating the byte count for files in a dir on the remote server would be out of the question without a mapped drive, which I won't be allowed to do. Thanks for any help! PS If I am able to convince the powers that it is ok to put the jscript program on the remote box, what would be the best way to rexec it from an XPpro box ? __________________________________________________ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://taxes.yahoo.com/ From costea.dan at ssi-schaefer.ro Tue Apr 9 12:42:35 2002 From: costea.dan at ssi-schaefer.ro (Dan Costea) Date: Tue, 9 Apr 2002 10:42:35 -0700 Subject: [Javascript] .fireEvent("onchange") and .onchange(); Message-ID: <001d01c1dfee$0a6423f0$8ddea8c0@pcdanc> Hi, I work with IE6. Can someone tell me what is the difference between the methods: fireEvent ("onchange") and onchange ()? for example, I have a checkbox: myCheckbox; I can use myCheckbox.fireEvent ("onchange") or myCheckbox.onchange (). It seems to do the same think, but fireEvent method takes much more time (with very many objects). Can you tell me why? Thanks, Dan -------------- next part -------------- An HTML attachment was scrubbed... URL: From SMartin at neopostonline.com Tue Apr 9 13:27:50 2002 From: SMartin at neopostonline.com (SMartin at neopostonline.com) Date: Tue, 9 Apr 2002 14:27:50 -0400 Subject: [Javascript] .fireEvent("onchange") and .onchange(); Message-ID: fireEvent() allows you to, well, fire an event programatically and to create your own event handlers. When you use fireevent for a default behavior and event handler, you're going through some extra layers to get to basically the same programming block. Thus, you're better off sticking with the default event handler (in this case onChange()) rather than bothering with fireEvent. For more details on the fireEvent method, see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/ht ml/letmthfireeventBHV.asp -----Original Message----- From: Peter-Paul Koch [mailto:gassinaumasis at hotmail.com] Sent: Tuesday, April 09, 2002 4:28 AM To: javascript at LaTech.edu Subject: Re: [Javascript] .fireEvent("onchange") and .onchange(); >I work with IE6. Can someone tell me what is the difference between the >methods: fireEvent ("onchange") and onchange ()? fireEvent() is a MS only method while onchange() is cross-browser. >for example, I have a checkbox: myCheckbox; I can use >myCheckbox.fireEvent >("onchange") or myCheckbox.onchange (). It seems to do the same think, but >fireEvent method takes much more time (with very many objects). Can you >tell me why? Dunno, never tried it. But use onchange() anyway, since it works everywhere. ppk _________________________________________________________________ Join the world's largest e-mail service with MSN Hotmail. http://www.hotmail.com _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From msocarras at terra.es Wed Apr 10 08:32:33 2002 From: msocarras at terra.es (Manuel Socarras Reyes) Date: Wed, 10 Apr 2002 15:32:33 +0200 Subject: [Javascript] window.open in links References: <20020409134259.84021.qmail@web20514.mail.yahoo.com> Message-ID: <3CB43EF1.1010601@terra.es> hi: i have a problem opening a window from a link: open window after clicking in the link, the new window opens & the one with the link shows a new page with [object Window] in it. Mac ------ NN 6.2 PC ---- NN 4.77 NN 6.1 IE 6.0 where only works fine is in Mac, IE 5.0. i know that a solution is calling a function but i'd like to know the origin of the problem open window -- Saludos, Manuel Socarr?s Reyes Barcelona. Spain From LMuchacho at twii.net Wed Apr 10 08:46:00 2002 From: LMuchacho at twii.net (Muchacho, Laurent (TWIi London)) Date: Wed, 10 Apr 2002 14:46:00 +0100 Subject: [Javascript] window.open in links Message-ID: <76A6F0FCCA27D4119DEF00805F5700AC027C3189@lon.webmail.twii.net> Hi Manuel just write void in front and it will be ok open window Laurent -----Original Message----- From: Manuel Socarras Reyes [mailto:msocarras at terra.es] Sent: 10 April 2002 14:33 To: javascript at LaTech.edu Subject: [Javascript] window.open in links hi: i have a problem opening a window from a link: open window after clicking in the link, the new window opens & the one with the link shows a new page with [object Window] in it. Mac ------ NN 6.2 PC ---- NN 4.77 NN 6.1 IE 6.0 where only works fine is in Mac, IE 5.0. i know that a solution is calling a function but i'd like to know the origin of the problem open window -- Saludos, Manuel Socarr?s Reyes Barcelona. Spain _______________________________________________ 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 msocarras at terra.es Wed Apr 10 19:50:57 2002 From: msocarras at terra.es (Manuel Socarras Reyes) Date: Thu, 11 Apr 2002 02:50:57 +0200 Subject: [Javascript] window.open in links References: <76A6F0FCCA27D4119DEF00805F5700AC027C3189@lon.webmail.twii.net> Message-ID: <3CB4DDF1.3010904@terra.es> thanks a lot Laurent, my problem is solved! now i realized the open method is returning a pointer to the window that is interpreted by the browser as a URL -- Saludos, Manuel Socarr?s Reyes Barcelona. Spain Muchacho, Laurent (TWIi London) wrote: >Hi Manuel > >just write void in front and it will be ok > >href="JavaScript:void >window.open('basket.htm','myWindow','width=400,height=300');">open >window > >Laurent > > >-----Original Message----- >From: Manuel Socarras Reyes [mailto:msocarras at terra.es] >Sent: 10 April 2002 14:33 >To: javascript at LaTech.edu >Subject: [Javascript] window.open in links > > >hi: > >i have a problem opening a window from a link: > >href="JavaScript:window.open('basket.htm','myWindow','width=400,height=300') >;">open >window > >after clicking in the link, the new window opens & the one with the link >shows a new page with [object Window] in it. > >Mac >------ >NN 6.2 > >PC >---- >NN 4.77 >NN 6.1 >IE 6.0 > >where only works fine is in Mac, IE 5.0. > > i know that a solution is calling a function but i'd like to know the >origin of the problem > > > > > >open window > From FERONMA at cic-i.com Thu Apr 11 03:57:11 2002 From: FERONMA at cic-i.com (FERON Matthieu) Date: Thu, 11 Apr 2002 10:57:11 +0200 Subject: [Javascript] cr/lf problem in calling a mail window Message-ID: <8384BC6ECC36EF42A8CAC21C8ECC6346405E75@gcmcina1.cic-na.cm-cic.fr> Hello, I use this code to build a mail window.location = "mailto:mymail at myserver.ext?Subject=Contribution HTM : &Body=Titre:\nDescription:\nIns?re ici un fichier zip contenant les pages et images ? relier\nD?s que les pages seront int?gr?es dans le site, tu recevras une confirmation par mail."; it works well and include my text in the right place but the '\n' doesn't seem to work to include cr/lf. if anyone has an idea. Matthieu F?ron mferon at adeuza.fr http://ffwnet.phpnet.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From cutterbl at hotmail.com Thu Apr 11 07:36:04 2002 From: cutterbl at hotmail.com (Cutter Bl) Date: Thu, 11 Apr 2002 08:36:04 -0400 Subject: [Javascript] window.open in links Message-ID: Laurent, You might also try something along the lines of: open window Cutter http://www.falcon-knives.com ----Original Message Follows---- From: Manuel Socarras Reyes Reply-To: javascript at LaTech.edu To: javascript at LaTech.edu Subject: Re: [Javascript] window.open in links Date: Thu, 11 Apr 2002 02:50:57 +0200 thanks a lot Laurent, my problem is solved! now i realized the open method is returning a pointer to the window that is interpreted by the browser as a URL -- Saludos, Manuel Socarr?s Reyes Barcelona. Spain Muchacho, Laurent (TWIi London) wrote: >Hi Manuel > >just write void in front and it will be ok > >href="JavaScript:void >window.open('basket.htm','myWindow','width=400,height=300');">open >window > >Laurent > > >-----Original Message----- >From: Manuel Socarras Reyes [mailto:msocarras at terra.es] >Sent: 10 April 2002 14:33 >To: javascript at LaTech.edu >Subject: [Javascript] window.open in links > > >hi: > >i have a problem opening a window from a link: > >href="JavaScript:window.open('basket.htm','myWindow','width=400,height=300') >;">open >window > >after clicking in the link, the new window opens & the one with the link >shows a new page with [object Window] in it. > >Mac >------ >NN 6.2 > >PC >---- >NN 4.77 >NN 6.1 >IE 6.0 > >where only works fine is in Mac, IE 5.0. > >i know that a solution is calling a function but i'd like to know the >origin of the problem > > > > > >open window > _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx From cutterbl at hotmail.com Thu Apr 11 07:39:40 2002 From: cutterbl at hotmail.com (Cutter Bl) Date: Thu, 11 Apr 2002 08:39:40 -0400 Subject: [Javascript] cr/lf problem in calling a mail window Message-ID: I haven't tried this so you may have to play with it a bit, but it seems as if you declare the body of the message to be HTML. If that is the case I would think you would use HTML tags for formatting (
for line break,

for paragraphs, etc.). Somebody stop me if I'm way off base here, I've never done this type of mailto: construct before. Cutter http://www.falcon-knives.com ----Original Message Follows---- From: FERON Matthieu Reply-To: javascript at LaTech.edu To: "Javascript (E-mail)" Subject: [Javascript] cr/lf problem in calling a mail window Date: Thu, 11 Apr 2002 10:57:11 +0200 Hello, I use this code to build a mail window.location = "mailto:mymail at myserver.ext?Subject=Contribution HTM : &Body=Titre:\nDescription:\nIns?re ici un fichier zip contenant les pages et images ? relier\nD?s que les pages seront int?gr?es dans le site, tu recevras une confirmation par mail."; it works well and include my text in the right place but the '\n' doesn't seem to work to include cr/lf. if anyone has an idea. Matthieu F?ron mferon at adeuza.fr http://ffwnet.phpnet.org _________________________________________________________________ Join the world?s largest e-mail service with MSN Hotmail. http://www.hotmail.com From FERONMA at cic-i.com Thu Apr 11 07:43:47 2002 From: FERONMA at cic-i.com (FERON Matthieu) Date: Thu, 11 Apr 2002 14:43:47 +0200 Subject: [Javascript] cr/lf problem in calling a mail window Message-ID: <8384BC6ECC36EF42A8CAC21C8ECC63463CF6F9@gcmcina1.cic-na.cm-cic.fr> thanks Cutter, but I've already tried this. and also %13%10. I'm quite sure it's possible but there's surely a little trick to find. -----Message d'origine----- De : Cutter Bl [mailto:cutterbl at hotmail.com] Envoy? : jeudi 11 avril 2002 14:40 ? : javascript at LaTech.edu Objet : Re: [Javascript] cr/lf problem in calling a mail window I haven't tried this so you may have to play with it a bit, but it seems as if you declare the body of the message to be HTML. If that is the case I would think you would use HTML tags for formatting (
for line break,

for paragraphs, etc.). Somebody stop me if I'm way off base here, I've never done this type of mailto: construct before. Cutter http://www.falcon-knives.com ----Original Message Follows---- From: FERON Matthieu Reply-To: javascript at LaTech.edu To: "Javascript (E-mail)" Subject: [Javascript] cr/lf problem in calling a mail window Date: Thu, 11 Apr 2002 10:57:11 +0200 Hello, I use this code to build a mail window.location = "mailto:mymail at myserver.ext?Subject=Contribution HTM : &Body=Titre:\nDescription:\nIns?re ici un fichier zip contenant les pages et images ? relier\nD?s que les pages seront int?gr?es dans le site, tu recevras une confirmation par mail."; it works well and include my text in the right place but the '\n' doesn't seem to work to include cr/lf. if anyone has an idea. Matthieu F?ron mferon at adeuza.fr http://ffwnet.phpnet.org _________________________________________________________________ Join the world's largest e-mail service with MSN Hotmail. http://www.hotmail.com _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript -------------- next part -------------- An HTML attachment was scrubbed... URL: From LMuchacho at twii.net Thu Apr 11 07:59:39 2002 From: LMuchacho at twii.net (Muchacho, Laurent (TWIi London)) Date: Thu, 11 Apr 2002 13:59:39 +0100 Subject: [Javascript] window.open in links Message-ID: <76A6F0FCCA27D4119DEF00805F5700AC027C318D@lon.webmail.twii.net> Hi Cutter Your solution will work I agree but the way I do it work fine too and I don't need to call the onclick the results is 14 less character When I write code the less I can write the better it is for me and the browser Laurent -----Original Message----- From: Cutter Bl [mailto:cutterbl at hotmail.com] Sent: 11 April 2002 13:36 To: javascript at LaTech.edu Subject: Re: [Javascript] window.open in links Laurent, You might also try something along the lines of: open window Cutter http://www.falcon-knives.com ----Original Message Follows---- From: Manuel Socarras Reyes Reply-To: javascript at LaTech.edu To: javascript at LaTech.edu Subject: Re: [Javascript] window.open in links Date: Thu, 11 Apr 2002 02:50:57 +0200 thanks a lot Laurent, my problem is solved! now i realized the open method is returning a pointer to the window that is interpreted by the browser as a URL -- Saludos, Manuel Socarr?s Reyes Barcelona. Spain Muchacho, Laurent (TWIi London) wrote: >Hi Manuel > >just write void in front and it will be ok > >href="JavaScript:void >window.open('basket.htm','myWindow','width=400,height=300');">open >window > >Laurent > > >-----Original Message----- >From: Manuel Socarras Reyes [mailto:msocarras at terra.es] >Sent: 10 April 2002 14:33 >To: javascript at LaTech.edu >Subject: [Javascript] window.open in links > > >hi: > >i have a problem opening a window from a link: > >href="JavaScript:window.open('basket.htm','myWindow','width=400,height=300' ) >;">open >window > >after clicking in the link, the new window opens & the one with the link >shows a new page with [object Window] in it. > >Mac >------ >NN 6.2 > >PC >---- >NN 4.77 >NN 6.1 >IE 6.0 > >where only works fine is in Mac, IE 5.0. > >i know that a solution is calling a function but i'd like to know the >origin of the problem > > > > > >open window > _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx _______________________________________________ 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 Malki.Cymbalista at weizmann.ac.il Thu Apr 11 08:17:55 2002 From: Malki.Cymbalista at weizmann.ac.il (Malka Cymbalista) Date: Thu, 11 Apr 2002 16:17:55 +0300 Subject: [Javascript] forcing a window to refresh Message-ID: I am creating an html page that contains a form. Basically, when the user first sees the page, 3 questions are displayed each having a yes or no answer. If the user clicks on yes, then an additional section opens where the user must enter more information. This additional section contains text boxes and textarea boxes. We are using javascript with layers to control what is placed on the page and where. It pretty much works except for one problem. When the user clicks on yes, the new section appears but only with the text that is printed outside each text box or textarea. the text boxes themselves do not appear. If the user resized the window or does something that forces a "refresh" then everything appears properly. Is there anything that will force a "refresh" of the window? Doing reload() is not an answer because that resets the page to the original without the additional sections. Any help will be appreciated. TIA. Malki Cymbalista Webmaster, Weizmann Institute of Science Rehovot, Israel 76100 Internet: Malki.Cymbalista at weizmann.ac.il From Mark.Drozd at walgreens.com Thu Apr 11 09:44:48 2002 From: Mark.Drozd at walgreens.com (Mark.Drozd at walgreens.com) Date: Thu, 11 Apr 2002 09:44:48 -0500 Subject: [Javascript] forcing a window to refresh Message-ID: Malki, Try to put the labels and text boxes (that appear after the user selects YES) within a
tag. Then set the document.layers[divId].visibility to either hidden or visible depending on the value of YES/NO. This way the page is loaded with everything you need initially and no refresh is required. Hope this helps... "Malka Cymbalista" @LaTech.edu on 04/11/2002 08:17:55 AM Please respond to javascript at LaTech.edu Sent by: javascript-admin at LaTech.edu To: cc: Subject: [Javascript] forcing a window to refresh I am creating an html page that contains a form. Basically, when the user first sees the page, 3 questions are displayed each having a yes or no answer. If the user clicks on yes, then an additional section opens where the user must enter more information. This additional section contains text boxes and textarea boxes. We are using javascript with layers to control what is placed on the page and where. It pretty much works except for one problem. When the user clicks on yes, the new section appears but only with the text that is printed outside each text box or textarea. the text boxes themselves do not appear. If the user resized the window or does something that forces a "refresh" then everything appears properly. Is there anything that will force a "refresh" of the window? Doing reload() is not an answer because that resets the page to the original without the additional sections. Any help will be appreciated. TIA. Malki Cymbalista Webmaster, Weizmann Institute of Science Rehovot, Israel 76100 Internet: Malki.Cymbalista at weizmann.ac.il _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From peter at brunone.com Thu Apr 11 10:29:51 2002 From: peter at brunone.com (Peter Brunone) Date: Thu, 11 Apr 2002 10:29:51 -0500 Subject: [Javascript] cr/lf problem in calling a mail window In-Reply-To: <8384BC6ECC36EF42A8CAC21C8ECC6346405E75@gcmcina1.cic-na.cm-cic.fr> Message-ID: cr/lf problem in calling a mail windowMathieu, You are in effect sending this information through the URL, so you need to encode it. Otherwise the slashes can be taken as directory markings or escape characters... either way, you can't transfer a crlf as such through the querystring. Some server-side engines have a way around this; for example, ASP has a function called Server.URLEncode() that can be used to encode all such troublesome characters. The encoded value of cr/lf is %0A%0D; unfortunately, this throws a javascript "unterminated string constant" error, which does not happen with %20 (the encoded value for space). After some trial and error, I found that you have to escape the *letter* in this encoded value. Don't ask me why; perhaps someone with a better Jscript/C background can say. Anyway, the end result is that you should code like this example, which works (watch for line wrapping): Javascript Mail Let me know how this works out for you. Cheers, Peter -----Original Message----- From: javascript-admin at LaTech.edu [mailto:javascript-admin at LaTech.edu]On Behalf Of FERON Matthieu Sent: Thursday, April 11, 2002 3:57 AM To: Javascript (E-mail) Subject: [Javascript] cr/lf problem in calling a mail window Hello, I use this code to build a mail window.location = "mailto:mymail at myserver.ext?Subject=Contribution HTM : &Body=Titre:\nDescription:\nIns?re ici un fichier zip contenant les pages et images ? relier\nD?s que les pages seront int?gr?es dans le site, tu recevras une confirmation par mail."; it works well and include my text in the right place but the '\n' doesn't seem to work to include cr/lf. if anyone has an idea. Matthieu F?ron mferon at adeuza.fr http://ffwnet.phpnet.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From FERONMA at cic-i.com Thu Apr 11 10:30:54 2002 From: FERONMA at cic-i.com (FERON Matthieu) Date: Thu, 11 Apr 2002 17:30:54 +0200 Subject: [Javascript] cr/lf problem in calling a mail window Message-ID: <8384BC6ECC36EF42A8CAC21C8ECC63463CF6FA@gcmcina1.cic-na.cm-cic.fr> You're a genius !!!! really !! It works exactly as I wanted it to . I guessed it was a combination of a kind of escape sequence but didn't find out which one. great thanks. :-)) -----Message d'origine----- De : Peter Brunone [mailto:peter at brunone.com] Envoy? : jeudi 11 avril 2002 17:30 ? : javascript at LaTech.edu Objet : RE: [Javascript] cr/lf problem in calling a mail window Mathieu, You are in effect sending this information through the URL, so you need to encode it. Otherwise the slashes can be taken as directory markings or escape characters... either way, you can't transfer a crlf as such through the querystring. Some server-side engines have a way around this; for example, ASP has a function called Server.URLEncode() that can be used to encode all such troublesome characters. The encoded value of cr/lf is %0A%0D; unfortunately, this throws a javascript "unterminated string constant" error, which does not happen with %20 (the encoded value for space). After some trial and error, I found that you have to escape the *letter* in this encoded value. Don't ask me why; perhaps someone with a better Jscript/C background can say. Anyway, the end result is that you should code like this example, which works (watch for line wrapping): Javascript Mail Let me know how this works out for you. Cheers, Peter -----Original Message----- From: javascript-admin at LaTech.edu [mailto:javascript-admin at LaTech.edu]On Behalf Of FERON Matthieu Sent: Thursday, April 11, 2002 3:57 AM To: Javascript (E-mail) Subject: [Javascript] cr/lf problem in calling a mail window Hello, I use this code to build a mail window.location = " mailto:mymail at myserver.ext?Subject=Contribution HTM : &Body=Titre:\nDescription:\nIns?re ici un fichier zip contenant les pages et images ? relier\nD?s que les pages seront int?gr?es dans le site, tu recevras une confirmation par mail."; it works well and include my text in the right place but the '\n' doesn't seem to work to include cr/lf. if anyone has an idea. Matthieu F?ron mferon at adeuza.fr http://ffwnet.phpnet.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From wolfsong at midcoast.com Thu Apr 11 13:05:14 2002 From: wolfsong at midcoast.com (WolfSong) Date: Thu, 11 Apr 2002 14:05:14 -0400 Subject: [Javascript] Code that used to work in Netscape no longer does References: <20020411170101.DBEA8308B64@LaTech.edu> Message-ID: <002201c1e183$6ef50000$6e9ac3d8@oemcomputer> Hi, I wrote this script with a group during a CIS course and it has always worked fine until I loaded it into Netscape Navigator 4.7. It sends back a NaN value and freezes Netscape. The code still works fine in up to IE 5.50 (haven't tested higher). Can anyone tell me what's wrong? Thanks, Audra Seigars CODE:
Red: Green: Blue:
From gtroll at msn.com Thu Apr 11 14:20:02 2002 From: gtroll at msn.com (Golden Troll) Date: Thu, 11 Apr 2002 12:20:02 -0700 Subject: [Javascript] Code that used to work in Netscape no longer does In-Reply-To: <002201c1e183$6ef50000$6e9ac3d8@oemcomputer> Message-ID: You can't change elements (bgcolor) on the fly w/ NN4. Peace and Respects, Scott Gahres Owner Golden Troll Ventures hemp at goldentroll.com http://goldentroll.com * hemp info send e-mail w/ subscribe in subject and your nickname and e-mail in the body *(c)2002 4:20 has been a trademark of Golden Troll since 1994 IM us! AOL GoldenTrollHelp MSN gtroll at msn.com Yahoo! live_customer_help -----Original Message----- From: javascript-admin at LaTech.edu [mailto:javascript-admin at LaTech.edu]On Behalf Of WolfSong Sent: Thursday, April 11, 2002 11:05 AM To: javascript at LaTech.edu Subject: [Javascript] Code that used to work in Netscape no longer does Hi, I wrote this script with a group during a CIS course and it has always worked fine until I loaded it into Netscape Navigator 4.7. It sends back a NaN value and freezes Netscape. The code still works fine in up to IE 5.50 (haven't tested higher). Can anyone tell me what's wrong? Thanks, Audra Seigars CODE:
Red: Green: Blue:
_______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From peter at brunone.com Thu Apr 11 15:02:18 2002 From: peter at brunone.com (Peter Brunone) Date: Thu, 11 Apr 2002 15:02:18 -0500 Subject: [Javascript] Code that used to work in Netscape no longer does In-Reply-To: Message-ID: Sure you can; I've done it many times, including right now just to be sure (it's one of the few things you CAN change in NN4). Audra, the problem is that you're trying to get the color of the body before the body exists. When I put this script right before the tag, it populates all fields correctly. There may be other issues, but this fixes your original problem. Cheers, Peter |-----Original Message----- |From: javascript-admin at LaTech.edu On |Behalf Of Golden Troll | |You can't change elements (bgcolor) on the fly w/ NN4. | |Peace and Respects, |Scott Gahres |Owner |Golden Troll Ventures hemp at goldentroll.com http://goldentroll.com | |-----Original Message----- |From: javascript-admin at LaTech.edu On |Behalf Of WolfSong | |Hi, | |I wrote this script with a group during a CIS course and it has always |worked fine until I loaded it into Netscape Navigator 4.7. It sends back |a |NaN value and freezes Netscape. The code still works fine in up to IE |5.50 |(haven't tested higher). Can anyone tell me what's wrong? | |Thanks, |Audra Seigars | |CODE: | | | | |
|
| | Red: | | Green: | | Blue: | |
|
| From gtroll at msn.com Thu Apr 11 17:22:50 2002 From: gtroll at msn.com (Golden Troll) Date: Thu, 11 Apr 2002 15:22:50 -0700 Subject: [Javascript] window.open in links In-Reply-To: <76A6F0FCCA27D4119DEF00805F5700AC027C318D@lon.webmail.twii.net> Message-ID: Laurent, What about all those people that don't have or have turned off JavaScript? It would be more inclusive to write the link something like this: open window When writing commercial apps you don't want to block anybody from being able to buy... Not sure which browsers support the width and height attributes of the a href tag... not standards compliant...but I remember using it back when NN4 was the rage....Peace and Respects, Scott Gahres Owner Golden Troll hemp at goldentroll.com http://goldentroll.com -----Original Message----- From: javascript-admin at LaTech.edu [mailto:javascript-admin at LaTech.edu]On Behalf Of Muchacho, Laurent (TWIi London) Sent: Thursday, April 11, 2002 6:00 AM To: 'javascript at LaTech.edu' Subject: RE: [Javascript] window.open in links Hi Cutter Your solution will work I agree but the way I do it work fine too and I don't need to call the onclick the results is 14 less character When I write code the less I can write the better it is for me and the browser Laurent -----Original Message----- From: Cutter Bl [mailto:cutterbl at hotmail.com] Sent: 11 April 2002 13:36 To: javascript at LaTech.edu Subject: Re: [Javascript] window.open in links Laurent, You might also try something along the lines of: o pen window Cutter http://www.falcon-knives.com ----Original Message Follows---- From: Manuel Socarras Reyes Reply-To: javascript at LaTech.edu To: javascript at LaTech.edu Subject: Re: [Javascript] window.open in links Date: Thu, 11 Apr 2002 02:50:57 +0200 thanks a lot Laurent, my problem is solved! now i realized the open method is returning a pointer to the window that is interpreted by the browser as a URL -- Saludos, Manuel Socarr?s Reyes Barcelona. Spain Muchacho, Laurent (TWIi London) wrote: >Hi Manuel > >just write void in front and it will be ok > >href="JavaScript:void >window.open('basket.htm','myWindow','width=400,height=300');">open >window > >Laurent > > >-----Original Message----- >From: Manuel Socarras Reyes [mailto:msocarras at terra.es] >Sent: 10 April 2002 14:33 >To: javascript at LaTech.edu >Subject: [Javascript] window.open in links > > >hi: > >i have a problem opening a window from a link: > >href="JavaScript:window.open('basket.htm','myWindow','width=400,height= 300' ) >;">open >window > >after clicking in the link, the new window opens & the one with the link >shows a new page with [object Window] in it. > >Mac >------ >NN 6.2 > >PC >---- >NN 4.77 >NN 6.1 >IE 6.0 > >where only works fine is in Mac, IE 5.0. > >i know that a solution is calling a function but i'd like to know the >origin of the problem > > > > > >open window > _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx _______________________________________________ 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. _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From LMuchacho at twii.net Fri Apr 12 05:25:21 2002 From: LMuchacho at twii.net (Muchacho, Laurent (TWIi London)) Date: Fri, 12 Apr 2002 11:25:21 +0100 Subject: [Javascript] window.open in links Message-ID: <76A6F0FCCA27D4119DEF00805F5700AC027C318F@lon.webmail.twii.net> Hi Scott Thanks for that small point it work fine like you recommend except you wrote : " open window " forgetting the onclick to open the window if javascript enabled and I never see width and height working in a href like you recommend personne who don't have javascript enabled will not be abble to see a lot of site now day just to remenber the initial question From: Manuel Socarras Reyes [mailto:msocarras at terra.es] >Sent: 10 April 2002 14:33 >To: javascript at LaTech.edu >Subject: [Javascript] window.open in links > > >hi: > >i have a problem opening a window from a link: > >href="JavaScript:window.open('basket.htm','myWindow','width=400,height= 300' ) >;">open >window > >after clicking in the link, the new window opens & the one with the link >shows a new page with [object Window] in it. > I think we all answer to his question now And don't need to come back on it Laurent -----Original Message----- From: Golden Troll [mailto:gtroll at msn.com] Sent: 11 April 2002 23:23 To: javascript at LaTech.edu Subject: RE: [Javascript] window.open in links Laurent, What about all those people that don't have or have turned off JavaScript? It would be more inclusive to write the link something like this: When writing commercial apps you don't want to block anybody from being able to buy... Not sure which browsers support the width and height attributes of the a href tag... not standards compliant...but I remember using it back when NN4 was the rage....Peace and Respects, Scott Gahres Owner Golden Troll hemp at goldentroll.com http://goldentroll.com -----Original Message----- From: javascript-admin at LaTech.edu [mailto:javascript-admin at LaTech.edu]On Behalf Of Muchacho, Laurent (TWIi London) Sent: Thursday, April 11, 2002 6:00 AM To: 'javascript at LaTech.edu' Subject: RE: [Javascript] window.open in links Hi Cutter Your solution will work I agree but the way I do it work fine too and I don't need to call the onclick the results is 14 less character When I write code the less I can write the better it is for me and the browser Laurent -----Original Message----- From: Cutter Bl [mailto:cutterbl at hotmail.com] Sent: 11 April 2002 13:36 To: javascript at LaTech.edu Subject: Re: [Javascript] window.open in links Laurent, You might also try something along the lines of: o pen window Cutter http://www.falcon-knives.com ----Original Message Follows---- From: Manuel Socarras Reyes Reply-To: javascript at LaTech.edu To: javascript at LaTech.edu Subject: Re: [Javascript] window.open in links Date: Thu, 11 Apr 2002 02:50:57 +0200 thanks a lot Laurent, my problem is solved! now i realized the open method is returning a pointer to the window that is interpreted by the browser as a URL -- Saludos, Manuel Socarr?s Reyes Barcelona. Spain Muchacho, Laurent (TWIi London) wrote: >Hi Manuel > >just write void in front and it will be ok > >href="JavaScript:void >window.open('basket.htm','myWindow','width=400,height=300');">open >window > >Laurent > > >-----Original Message----- >From: Manuel Socarras Reyes [mailto:msocarras at terra.es] >Sent: 10 April 2002 14:33 >To: javascript at LaTech.edu >Subject: [Javascript] window.open in links > > >hi: > >i have a problem opening a window from a link: > >href="JavaScript:window.open('basket.htm','myWindow','width=400,height= 300' ) >;">open >window > >after clicking in the link, the new window opens & the one with the link >shows a new page with [object Window] in it. > >Mac >------ >NN 6.2 > >PC >---- >NN 4.77 >NN 6.1 >IE 6.0 > >where only works fine is in Mac, IE 5.0. > >i know that a solution is calling a function but i'd like to know the >origin of the problem > > > > > >open window > _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx _______________________________________________ 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. _______________________________________________ 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 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 daugustine at rlwinc.com Fri Apr 12 12:23:55 2002 From: daugustine at rlwinc.com (Daniel G. Augustine) Date: Fri, 12 Apr 2002 13:23:55 -0400 Subject: [Javascript] Making One Selection List Dictate Another's Contents Message-ID: Hey all, i am still relatively new to javascripting. There has to be a way to do what i want, i just cant figure it out, so im truing to you guys...I want to have 2 selection lists on my page, one of which is the "father" list and the other is the "child" list. When a user would select one choice from the first list (father list) the script would populate the options for the child list based on the first lists's choice. For example, I have A, B, C, and D in the first list and the second list is disabled (i have the code for that all taken care of) until one of those A, B, C or D choices is made. Lets say B is chosen. After B is chose, Cat and Dog show up in the child list. Or, I choose D from the father list and then Snake and Rabbit show up in the "child" list. Note: This is just an example of how to do this...i mainly just want to have control over making the user select a choce form the father list, and then haveing a child list enabled with the contents of that child list specific to what was chosen in the father list. Anyway to do this would be fine... ALSO...VERY IMPORTANT...this application is being developed for use with Pocket PC's, which means Internet Explorer CE, which in turn means, NO Dynamic functions or DHTML supported...i wish i could use it, but i cant! any way to do this??? Thanks in advance for the help. Dan ____________________________________________________________________________ _ Daniel G. Augustine Intern RLW, Inc. (814) 867-5122 (717)-314-6052 (mobile) Pennsylvania State University Undergraduate Student School of Information Sciences and Technology http://ist.psu.edu From merchant at LATECH.EDU Fri Apr 12 13:46:02 2002 From: merchant at LATECH.EDU (David Merchant) Date: Fri, 12 Apr 2002 13:46:02 -0500 Subject: [Javascript] JavaScript List Unsubscirbe, Subscribe & Posting Info. Message-ID: <5.1.0.14.2.20020412134546.04e149f0@mail.latech.edu> There are two sets of instructions, first for those who joined the list directly and second for those who joined the list via egroups (at present I cannot manually unsubscribe anyone who joined via Yahoo Groups or eGroups). 1. If you wish to subscribe or unsubscribe, visit https://lists.LaTech.edu/mailman/listinfo/javascript or send a message with the word `help' in it to the request address, javascript-request at LaTech.edu, for further instructions. To post to the list, send your posts to javascript at latech.edu 2. For those who subscribed to the Javascript list via Yahoo Groups (formally eGroups), here is how to unsubscribe: To unsubscribe via email: From your email program, send a blank message to: javascript-unsubscribe at yahoogroups.com To unsubscribe via the Web: * Sign in to Yahoo! Groups and go to the My Groups page. * Click on the Edit Message Settings link at the top of the page. * Look for the group you wish to unsubscribe from, and select Unsubscribe from the pull-down list on the right. * Click Update to save your changes. The group will no longer be listed on the My Groups page, and you will no longer receive messages. Note: If you own a group, you must first give up your ownership in the Members section of your group before you can unsubscribe on the My Groups page. I CANNOT manually unsubscribe you if you subscribed to the list via eGroups or Yahoo Groups. I have complained _repeatedly_ about this to the folks at Yahoo Groups, but to no avail. I can only manually unsubscribe those who joined via https://lists.LaTech.edu/mailman/listinfo/javascript. TTFN, David Head, Systems Dept, Louisiana Tech University merchant at latech.edu JavaScript List Administrator (www.mountaindragon.com/javascript/) Webmaster, HTML Encyclopedia (www.mountaindragon.com/html/) Webmaster, Memorial Day Page (www.usmemorialday.org/) Webmaster, Midori Ito Site (www.mountaindragon.com/midori/) From tutwabee at hotmail.com Fri Apr 12 17:36:47 2002 From: tutwabee at hotmail.com (Trey H) Date: Fri, 12 Apr 2002 22:36:47 +0000 Subject: [Javascript] Making One Selection List Dictate Another's Contents Message-ID: I have found one solution, but it is a little strange. My solution involves making 2 identical pages exept that one variable is different. That variable contains the other pages location. I would have used one page, but it didn't work for some reason. First, change the box.html to what you would like it to look like. Then copy the whole source code to the box2.html file. In the box2.html file make sure the sloc variable contains "box.html". When you change the parent select box on the box.html page it goes to box2.html and changes the child select box accordingly. This sure works visa-versa also. You may need some more help because the values of other input fields in forms don't stay the same as what the user made them. I can easily help you with this, but I need to know what your input fields names are and I need a rough copy of your page. ==================================== Trey: tutwabee at hotmail.com Get free JavaScripts at the Blue Dragon! Just go to: http://www.websiter.biz ==================================== Make money by being online: http://www.degoo.com/index.php?refid=tutwabee =================================== Earn free traffic for your website easily: http://tools.addme.com/servlet/popview?id=52260 ==================================== >From: "Daniel G. Augustine" >Reply-To: javascript at LaTech.edu >To: >Subject: [Javascript] Making One Selection List Dictate Another's Contents >Date: Fri, 12 Apr 2002 13:23:55 -0400 > > >Hey all, > >i am still relatively new to javascripting. There has to be a way to do >what i want, i just cant figure it out, so im truing to you guys...I want >to >have 2 selection lists on my page, one of which is the "father" list and >the >other is the "child" list. > >When a user would select one choice from the first list (father list) the >script would populate the options for the child list based on the first >lists's choice. For example, I have A, B, C, and D in the first list and >the second list is disabled (i have the code for that all taken care of) >until one of those A, B, C or D choices is made. Lets say B is chosen. >After B is chose, Cat and Dog show up in the child list. Or, I choose D >from the father list and then Snake and Rabbit show up in the "child" list. > >Note: This is just an example of how to do this...i mainly just want to >have control over making the user select a choce form the father list, and >then haveing a child list enabled with the contents of that child list >specific to what was chosen in the father list. Anyway to do this would be >fine... > >ALSO...VERY IMPORTANT...this application is being developed for use with >Pocket PC's, which means Internet Explorer CE, which in turn means, NO >Dynamic functions or DHTML supported...i wish i could use it, but i cant! >any way to do this??? > > >Thanks in advance for the help. > >Dan > >____________________________________________________________________________ >_ > >Daniel G. Augustine >Intern >RLW, Inc. >(814) 867-5122 >(717)-314-6052 (mobile) > >Pennsylvania State University >Undergraduate Student >School of Information Sciences and Technology >http://ist.psu.edu > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. From tutwabee at hotmail.com Fri Apr 12 17:41:14 2002 From: tutwabee at hotmail.com (Trey H) Date: Fri, 12 Apr 2002 22:41:14 +0000 Subject: [Javascript] Making One Selection List Dictate Another's Contents Message-ID: I am sorry, the attachments were lost on this last email for some reason. I will try again. I hope the attachments are there. They should be box.html and box2.html They may appear at the bottom of this email depending on your email provider. >From: "Trey H" >Reply-To: javascript at LaTech.edu >To: javascript at LaTech.edu >Subject: Re: [Javascript] Making One Selection List Dictate Another's >Contents >Date: Fri, 12 Apr 2002 22:36:47 +0000 > >I have found one solution, but it is a little strange. My solution >involves >making 2 identical pages exept that one variable is different. That >variable contains the other pages location. I would have used one page, >but >it didn't work for some reason. > >First, change the box.html to what you would like it to look like. Then >copy the whole source code to the box2.html file. In the box2.html file >make sure the sloc variable contains "box.html". > >When you change the parent select box on the box.html page it goes to >box2.html and changes the child select box accordingly. This sure works >visa-versa also. You may need some more help because the values of other >input fields in forms don't stay the same as what the user made them. I >can >easily help you with this, but I need to know what your input fields names >are and I need a rough copy of your page. > >==================================== >Trey: tutwabee at hotmail.com >Get free JavaScripts at the Blue Dragon! >Just go to: >http://www.websiter.biz >==================================== >Make money by being online: >http://www.degoo.com/index.php?refid=tutwabee >=================================== >Earn free traffic for your website easily: >http://tools.addme.com/servlet/popview?id=52260 >==================================== > > > >>From: "Daniel G. Augustine" >>Reply-To: javascript at LaTech.edu >>To: >>Subject: [Javascript] Making One Selection List Dictate Another's Contents >>Date: Fri, 12 Apr 2002 13:23:55 -0400 >> >> >>Hey all, >> >>i am still relatively new to javascripting. There has to be a way to do >>what i want, i just cant figure it out, so im truing to you guys...I want >>to >>have 2 selection lists on my page, one of which is the "father" list and >>the >>other is the "child" list. >> >>When a user would select one choice from the first list (father list) the >>script would populate the options for the child list based on the first >>lists's choice. For example, I have A, B, C, and D in the first list and >>the second list is disabled (i have the code for that all taken care of) >>until one of those A, B, C or D choices is made. Lets say B is chosen. >>After B is chose, Cat and Dog show up in the child list. Or, I choose D >>from the father list and then Snake and Rabbit show up in the "child" >>list. >> >>Note: This is just an example of how to do this...i mainly just want to >>have control over making the user select a choce form the father list, and >>then haveing a child list enabled with the contents of that child list >>specific to what was chosen in the father list. Anyway to do this would >>be >>fine... >> >>ALSO...VERY IMPORTANT...this application is being developed for use with >>Pocket PC's, which means Internet Explorer CE, which in turn means, NO >>Dynamic functions or DHTML supported...i wish i could use it, but i cant! >>any way to do this??? >> >> >>Thanks in advance for the help. >> >>Dan >> >>____________________________________________________________________________ >>_ >> >>Daniel G. Augustine >>Intern >>RLW, Inc. >>(814) 867-5122 >>(717)-314-6052 (mobile) >> >>Pennsylvania State University >>Undergraduate Student >>School of Information Sciences and Technology >>http://ist.psu.edu >> >>_______________________________________________ >>Javascript mailing list >>Javascript at LaTech.edu >>https://lists.LaTech.edu/mailman/listinfo/javascript > > >_________________________________________________________________ >Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript ==================================== Trey: tutwabee at hotmail.com Get free JavaScripts at the Blue Dragon! Just go to: http://www.websiter.biz ==================================== Make money by being online: http://www.degoo.com/index.php?refid=tutwabee =================================== Earn free traffic for your website easily: http://tools.addme.com/servlet/popview?id=52260 ==================================== _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From extstarrfam at cox-internet.com Sun Apr 14 14:45:29 2002 From: extstarrfam at cox-internet.com (Steve) Date: Sun, 14 Apr 2002 14:45:29 -0500 Subject: [Javascript] Making One Selection List Dictate Another's Contents Message-ID: <001001c1e3ec$eee72fc0$9326e942@coxinternet.com> Try this out. It is not perfect. You will have to supply more of the client-side interaction code to make it complete but it does work. Parent List to Child List Display Options
From wolfsong at midcoast.com Sun Apr 14 20:19:53 2002 From: wolfsong at midcoast.com (WolfSong) Date: Sun, 14 Apr 2002 21:19:53 -0400 Subject: [Javascript] Re: Code that used to work in Netscape no longer does (WolfSong) References: <20020412170101.8DDC5308F65@LaTech.edu> Message-ID: <001701c1e41b$a8987c20$8d9ac3d8@oemcomputer> Thanks for the help! Audra CIS Major/Beginning Web Author University of Maine, Augusta From andyg at ihug.co.nz Sun Apr 14 22:46:43 2002 From: andyg at ihug.co.nz (Andrew Gibson) Date: Mon, 15 Apr 2002 15:46:43 +1200 Subject: [Javascript] Creating a new
References: <20020412170101.8DDC5308F65@LaTech.edu> <001701c1e41b$a8987c20$8d9ac3d8@oemcomputer> Message-ID: <002301c1e430$2c5f97f0$14c9adcb@k1n8i8> How can I create a new
in a page already loaded via a javascript function? From grillo at lazzuri.com.br Sun Apr 14 22:56:27 2002 From: grillo at lazzuri.com.br (Marcelo Simon) Date: Mon, 15 Apr 2002 00:56:27 -0300 Subject: [Javascript] Help on Macintosh Message-ID: <002a01c1e431$84c94d40$0c05b8c8@Motta> Hi, can anyone tell me why this isn't working on a Mac ? Everything is ok on a PC, but on the mac it ain't submitting the form. this is triggered by: TIA Marcelo Simon -------------- next part -------------- An HTML attachment was scrubbed... URL: From tutwabee at hotmail.com Sun Apr 14 23:00:35 2002 From: tutwabee at hotmail.com (Trey H) Date: Mon, 15 Apr 2002 04:00:35 +0000 Subject: [Javascript] Creating a new
Message-ID: You should probably reload the page's source code and add the div command at the bottom. You could also load the function into an IE IFRAME and then add the div afterwards. ==================================== Trey: tutwabee at hotmail.com Get free JavaScripts at the Blue Dragon! Just go to: http://www.websiter.biz ==================================== Make money by being online: http://www.degoo.com/index.php?refid=tutwabee =================================== Earn free traffic for your website easily: http://tools.addme.com/servlet/popview?id=52260 ==================================== >From: "Andrew Gibson" >Reply-To: javascript at LaTech.edu >To: >Subject: [Javascript] Creating a new
>Date: Mon, 15 Apr 2002 15:46:43 +1200 > >How can I create a new
in a page already loaded via a >javascript function? > > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx From tutwabee at hotmail.com Sun Apr 14 23:04:21 2002 From: tutwabee at hotmail.com (Trey H) Date: Mon, 15 Apr 2002 04:04:21 +0000 Subject: [Javascript] Help on Macintosh Message-ID: I do not own a mac computer myself, so I may be wrong on this. It may be because you are using an image as the button to launch the submit. It could also be that mac does not accept the submit() function for some reason. Also, you may want to try something as simple as renaming your form objects. I have tried this before when I had a strange error and it works sometimes. I hope you figure it out. ==================================== Trey: tutwabee at hotmail.com Get free JavaScripts at the Blue Dragon! Just go to: http://www.websiter.biz ==================================== Make money by being online: http://www.degoo.com/index.php?refid=tutwabee =================================== Earn free traffic for your website easily: http://tools.addme.com/servlet/popview?id=52260 ==================================== >From: "Marcelo Simon" >Reply-To: javascript at LaTech.edu >To: >Subject: [Javascript] Help on Macintosh >Date: Mon, 15 Apr 2002 00:56:27 -0300 > >Hi, > >can anyone tell me why this isn't working on a Mac ? Everything is ok on a >PC, but on the mac it ain't submitting the form. > > > >this is triggered by: > >onClick="valuerestore()"> > >TIA >Marcelo Simon _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com From andyg at ihug.co.nz Sun Apr 14 23:26:18 2002 From: andyg at ihug.co.nz (Andrew Gibson) Date: Mon, 15 Apr 2002 16:26:18 +1200 Subject: [Javascript] Creating a new
References: Message-ID: <004901c1e435$b10837f0$14c9adcb@k1n8i8> > You should probably reload the page's source code and add the div command at > the bottom. You could also load the function into an IE IFRAME and then add > the div afterwards. > > ==================================== > Trey: tutwabee at hotmail.com Thanks Trey. I looked in to the textrange object, but couldn't get it to work, so I tried: var myStr="
" document.body.innerHTML=document.body.innerHTML+myStr and this seems to do the trick without reloading the source! Andrew Gibson ============================================== Web Presentation Innovations: DHTML, Javascript, XML http://www.dscript.net.nz From extstarrfam at cox-internet.com Mon Apr 15 00:23:07 2002 From: extstarrfam at cox-internet.com (Steve) Date: Mon, 15 Apr 2002 00:23:07 -0500 Subject: [Javascript] I Need an Object Message-ID: <001001c1e43d$a0efe9a0$9326e942@coxinternet.com> I wrote this code earlier to help someone else. Now I am caught up in how to make the page work that is created after the first selection is made. If I try to use 'Step 1 Choices' on the page that is created using javascript, I get an error message of "Object Needed" and the DOCTYPE definition is highlighted. I have been trying in vane to figure it out. Does any one have a solution. Here is the code: Parent List to Child List Display Options
===================== From Snarf at LaTech.edu Mon Apr 15 10:51:54 2002 From: Snarf at LaTech.edu (Snarf at LaTech.edu) Date: Mon, 15 Apr 2002 11:51:54 -0400 Subject: [Javascript] Making One Selection List Dictate Another's Contents Message-ID: <2CA7FA77.7407F895.001A38F2@aol.com> http://www.geocities.com/snarf_scripts/compact-categories.html From costea.dan at ssi-schaefer.ro Mon Apr 15 11:10:51 2002 From: costea.dan at ssi-schaefer.ro (Dan Costea) Date: Mon, 15 Apr 2002 09:10:51 -0700 Subject: [Javascript] Creating a new
References: <20020412170101.8DDC5308F65@LaTech.edu> <001701c1e41b$a8987c20$8d9ac3d8@oemcomputer> <002301c1e430$2c5f97f0$14c9adcb@k1n8i8> Message-ID: <008c01c1e498$1d0fc820$8ddea8c0@pcdanc> function makeDiv () { var oDiv = document.createElement ("DIV"); oDiv.id = "newDiv"; document.body.appendChild (oDiv); delete oDiv; } Dan. ----- Original Message ----- From: "Andrew Gibson" To: Sent: Sunday, April 14, 2002 8:46 PM Subject: [Javascript] Creating a new
> How can I create a new
in a page already loaded via a > javascript function? > > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript From extstarrfam at cox-internet.com Mon Apr 15 12:36:41 2002 From: extstarrfam at cox-internet.com (Steve) Date: Mon, 15 Apr 2002 12:36:41 -0500 Subject: [Javascript] GeoCity.com Message-ID: <000c01c1e4a4$1b070960$9326e942@coxinternet.com> I when there (geocity.com) and it would not load properly in my IE5.5 and it would not work. "Object requires" -------------- next part -------------- An HTML attachment was scrubbed... URL: From tutwabee at hotmail.com Mon Apr 15 16:55:39 2002 From: tutwabee at hotmail.com (Trey H) Date: Mon, 15 Apr 2002 21:55:39 +0000 Subject: [Javascript] GeoCity.com Message-ID: The geocity.com address is not related to HTML or JavaScript. You probably wanted http://www.geocities.com where you can get free websites. ==================================== Trey: tutwabee at hotmail.com Get free JavaScripts at the Blue Dragon! Just go to: http://www.websiter.biz ==================================== Make money by being online: http://www.degoo.com/index.php?refid=tutwabee =================================== Earn free traffic for your website easily: http://tools.addme.com/servlet/popview?id=52260 ==================================== >From: "Steve" >Reply-To: javascript at LaTech.edu >To: >Subject: [Javascript] GeoCity.com >Date: Mon, 15 Apr 2002 12:36:41 -0500 > >I when there (geocity.com) and it would not load properly in my IE5.5 and >it would not work. "Object requires" _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx From rhernandez at datadec.es Tue Apr 16 09:11:28 2002 From: rhernandez at datadec.es (=?iso-8859-1?Q?Rafael_Hern=E1ndez?=) Date: Tue, 16 Apr 2002 16:11:28 +0200 Subject: [Javascript] Creating a new
Message-ID: <8C987B8472B8A84FB42BD34E6C8A58CA2442AF@srv-w2k-exchang.datadec2000.es> function construyeDiv () { st = "
"; st+=""; st+=""; st+="
"; st+=""; st+="
"; document.body.insertAdjacentHTML("BeforeEnd",st); } > -----Mensaje original----- > De: Andrew Gibson [SMTP:andyg at ihug.co.nz] > Enviado el: lunes 15 de abril de 2002 5:47 > Para: javascript at LaTech.edu > Asunto: [Javascript] Creating a new
> > How can I create a new
in a page already loaded > via a > javascript function? > > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript From extstarrfam at cox-internet.com Tue Apr 16 12:44:26 2002 From: extstarrfam at cox-internet.com (Steve) Date: Tue, 16 Apr 2002 12:44:26 -0500 Subject: [Javascript] GeoCity.com Message-ID: <000b01c1e56e$5a789620$9326e942@coxinternet.com> Last night I went back to the site by passing the link into the browser address bar rather than clicking on the link. The site loaded properly and the program worked. I have been trying to sort out their program's code. I am still trying to understand why the simple program I put together did not work. From daugustine at rlwinc.com Tue Apr 16 14:21:09 2002 From: daugustine at rlwinc.com (Daniel G. Augustine) Date: Tue, 16 Apr 2002 15:21:09 -0400 Subject: [Javascript] Making One Selection List Dictate Another's Contents In-Reply-To: Message-ID: Trey, I tried implementing your strategy into my application, but to no avail. I get an error when i load the file. I have attached the 2 files that i modified to use the same idea that bo.html and box2.html did. any help you could give would be great...ive been trying many different approaches to this problem...thanks in advance Dan -----Original Message----- From: javascript-admin at LaTech.edu [mailto:javascript-admin at LaTech.edu]On Behalf Of Trey H Sent: Friday, April 12, 2002 6:41 PM To: javascript at LaTech.edu Subject: Re: [Javascript] Making One Selection List Dictate Another's Contents I am sorry, the attachments were lost on this last email for some reason. I will try again. I hope the attachments are there. They should be box.html and box2.html They may appear at the bottom of this email depending on your email provider. >From: "Trey H" >Reply-To: javascript at LaTech.edu >To: javascript at LaTech.edu >Subject: Re: [Javascript] Making One Selection List Dictate Another's >Contents >Date: Fri, 12 Apr 2002 22:36:47 +0000 > >I have found one solution, but it is a little strange. My solution >involves >making 2 identical pages exept that one variable is different. That >variable contains the other pages location. I would have used one page, >but >it didn't work for some reason. > >First, change the box.html to what you would like it to look like. Then >copy the whole source code to the box2.html file. In the box2.html file >make sure the sloc variable contains "box.html". > >When you change the parent select box on the box.html page it goes to >box2.html and changes the child select box accordingly. This sure works >visa-versa also. You may need some more help because the values of other >input fields in forms don't stay the same as what the user made them. I >can >easily help you with this, but I need to know what your input fields names >are and I need a rough copy of your page. > >==================================== >Trey: tutwabee at hotmail.com >Get free JavaScripts at the Blue Dragon! >Just go to: >http://www.websiter.biz >==================================== >Make money by being online: >http://www.degoo.com/index.php?refid=tutwabee >=================================== >Earn free traffic for your website easily: >http://tools.addme.com/servlet/popview?id=52260 >==================================== > > > >>From: "Daniel G. Augustine" >>Reply-To: javascript at LaTech.edu >>To: >>Subject: [Javascript] Making One Selection List Dictate Another's Contents >>Date: Fri, 12 Apr 2002 13:23:55 -0400 >> >> >>Hey all, >> >>i am still relatively new to javascripting. There has to be a way to do >>what i want, i just cant figure it out, so im truing to you guys...I want >>to >>have 2 selection lists on my page, one of which is the "father" list and >>the >>other is the "child" list. >> >>When a user would select one choice from the first list (father list) the >>script would populate the options for the child list based on the first >>lists's choice. For example, I have A, B, C, and D in the first list and >>the second list is disabled (i have the code for that all taken care of) >>until one of those A, B, C or D choices is made. Lets say B is chosen. >>After B is chose, Cat and Dog show up in the child list. Or, I choose D >>from the father list and then Snake and Rabbit show up in the "child" >>list. >> >>Note: This is just an example of how to do this...i mainly just want to >>have control over making the user select a choce form the father list, and >>then haveing a child list enabled with the contents of that child list >>specific to what was chosen in the father list. Anyway to do this would >>be >>fine... >> >>ALSO...VERY IMPORTANT...this application is being developed for use with >>Pocket PC's, which means Internet Explorer CE, which in turn means, NO >>Dynamic functions or DHTML supported...i wish i could use it, but i cant! >>any way to do this??? >> >> >>Thanks in advance for the help. >> >>Dan >> >>__________________________________________________________________________ __ >>_ >> >>Daniel G. Augustine >>Intern >>RLW, Inc. >>(814) 867-5122 >>(717)-314-6052 (mobile) >> >>Pennsylvania State University >>Undergraduate Student >>School of Information Sciences and Technology >>http://ist.psu.edu >> >>_______________________________________________ >>Javascript mailing list >>Javascript at LaTech.edu >>https://lists.LaTech.edu/mailman/listinfo/javascript > > >_________________________________________________________________ >Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript ==================================== Trey: tutwabee at hotmail.com Get free JavaScripts at the Blue Dragon! Just go to: http://www.websiter.biz ==================================== Make money by being online: http://www.degoo.com/index.php?refid=tutwabee =================================== Earn free traffic for your website easily: http://tools.addme.com/servlet/popview?id=52260 ==================================== _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com -------------- next part -------------- A non-text attachment was scrubbed... Name: box2.asp Type: application/octet-stream Size: 1869 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: box.asp Type: application/octet-stream Size: 2317 bytes Desc: not available URL: From realjumper at hotmail.com Tue Apr 16 23:28:44 2002 From: realjumper at hotmail.com (Real Jumper) Date: Wed, 17 Apr 2002 04:28:44 +0000 Subject: [Javascript] Learner question Message-ID: Hello all, I have a framed site with the navigation in the left frame and the content in the right. There is a link in the main frame with TARGET="blank" to get a new window to open. The navigation in the left frame is by way of an image rollover button. Everything is fine and dandy until a user who has clicked a link in the main frame, and viewed the new window, then closes the window to return to the frames page. Now the rollover has to download again before it will work, despite being previously pre-loaded and now resides in the browsers cache. I have tried a pre-load script but it doesn't make a difference. Perhaps there is something obvious that I am missing. Any help would be appreciated. Thank you. Here is a sample of the script..... image1 = new Image(); image1.src = "imagesss/topbuton.gif"; ....this all works fine until someone clicks a link on the japan.htm page in the main frame which will open a new window. When the new window is closed and the user rolls over another button in the navigation frame, there is no rollover until the rollover (topbuton.gif)image downloads again. Thanks again, Neil _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. From realjumper at hotmail.com Wed Apr 17 01:50:14 2002 From: realjumper at hotmail.com (Real Jumper) Date: Wed, 17 Apr 2002 06:50:14 +0000 Subject: [Javascript] Re: Learner question Message-ID: I've just noticed that the rollovers perform as they should in Netscape 4.7, but they don't work at all in Opera 6!!!!! Now I really am confused!! :) Neil _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com From phumes1 at rogers.com Wed Apr 17 09:36:01 2002 From: phumes1 at rogers.com (phumes1) Date: Wed, 17 Apr 2002 10:36:01 -0400 Subject: [Javascript] Re: Checkboxes Message-ID: <5.1.0.14.0.20020417102843.00ba1910@pop.wlfdle.phub.net.cable.rogers.com> Hi, I have the following input boxes in my index.htm file. What I would like to happen is if the user checks the box "User must change password at next login" I want the "User cannot change password" and "Password never expires" checkboxes grayed out and possibly the text also so they cannot check those. The only other option to check would be the "Account is disabled" Can this be easilty done with JS? User must change password at next login
User cannot change password
Password never expires
Account is disabled +-----------------------------------------------------------------------------------+ Philip Humeniuk phumes1 at rogers.com phil.humeniuk at rogers.com +------------------------------------------------------------------------------------+ From gassinaumasis at hotmail.com Wed Apr 17 09:38:53 2002 From: gassinaumasis at hotmail.com (Peter-Paul Koch) Date: Wed, 17 Apr 2002 14:38:53 +0000 Subject: [Javascript] Re: Checkboxes Message-ID: >From: phumes1 >Reply-To: javascript at LaTech.edu >To: javascript at LaTech.edu >Subject: [Javascript] Re: Checkboxes >Date: Wed, 17 Apr 2002 10:36:01 -0400 > > >Hi, > >I have the following input boxes in my index.htm file. What I would like to >happen is if the user checks the box "User must change password at next >login" I want the "User cannot change password" and "Password never >expires" checkboxes grayed out and possibly the text also so they cannot >check those. The only other option to check would be the "Account is >disabled" So basically you want only *one* of the checkboxes to be checked at any time. In that case you have to use radio buttons which are meant especially for this purpose. ppk _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx From extstarrfam at cox-internet.com Wed Apr 17 14:50:40 2002 From: extstarrfam at cox-internet.com (Steve) Date: Wed, 17 Apr 2002 14:50:40 -0500 Subject: [Javascript] Object required, Line 0 Message-ID: <000701c1e649$27602ce0$242be942@coxinternet.com> Will someone please help me understand what is needed to eliminate the 'Object required, Line 0' message. If I remove the onChange="process(value)" from the "parent" selection it does not give the message but it is useless then. I have reached a mental impasse and would appreciate some help with this. Here is the code: Parent List to Child List Display Options From swiseman at remax-cahi.com Wed Apr 17 15:07:06 2002 From: swiseman at remax-cahi.com (Scott.Wiseman) Date: Wed, 17 Apr 2002 13:07:06 -0700 Subject: [Javascript] how to break away from a frame. Message-ID: ON the top frame I have a go to main menu button but on the top half of the window goes there I want the whole window to go there.. and know this is simple, I just don't work with frames too much Scott From rodney at aflyingstart.net Wed Apr 17 16:01:40 2002 From: rodney at aflyingstart.net (Rodney Myers) Date: Wed, 17 Apr 2002 22:01:40 +0100 Subject: [Javascript] Object required, Line 0 References: <000701c1e649$27602ce0$242be942@coxinternet.com> Message-ID: <3CBDE2B4.695BA1C8@aflyingstart.net> Steve, I believe that once you re-commence writing to the document that the script objects within the document are no longer available. Also to get the value the selected option of a select from within the select tag you can use this.value - but only if you are working in an MSIE only world. The non browser specific way is this.options[this.selectedIndex].value hth Rodney Steve wrote: > Will someone please help me understand what is needed > to eliminate the 'Object required, Line 0' message. If > I remove the onChange="process(value)" from the > "parent" selection it does not give the message but it > is useless then. I have reached a mental impasse and > would appreciate some help with this. Here is the > code: > Transitional//EN" > "http://www.w3.org/TR/html4/loose.dtd"> > > > > > Parent List to Child List Display > Options > > > > > > > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript From rodney at aflyingstart.net Wed Apr 17 16:02:53 2002 From: rodney at aflyingstart.net (Rodney Myers) Date: Wed, 17 Apr 2002 22:02:53 +0100 Subject: [Javascript] how to break away from a frame. References: Message-ID: <3CBDE2FD.B5DAE423@aflyingstart.net> parent.location.href or top.location.href Rodney "Scott.Wiseman" wrote: > ON the top frame I have a go to main menu button > > onclick="window.location.href='/testing/Transactions/selectstatistic.htm';"> > > but on the top half of the window goes there > > I want the whole window to go there.. > > and know this is simple, I just > don't work with frames too much > > Scott > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript From swiseman at remax-cahi.com Wed Apr 17 16:30:58 2002 From: swiseman at remax-cahi.com (Scott.Wiseman) Date: Wed, 17 Apr 2002 14:30:58 -0700 Subject: [Javascript] how to break away from a frame. Message-ID: thank you very much -----Original Message----- From: Rodney Myers [mailto:rodney at aflyingstart.net] Sent: Wednesday, April 17, 2002 2:03 PM To: javascript at LaTech.edu Subject: Re: [Javascript] how to break away from a frame. parent.location.href or top.location.href Rodney "Scott.Wiseman" wrote: > ON the top frame I have a go to main menu button > > onclick="window.location.href='/testing/Transactions/selectstatistic.htm';"> > > but on the top half of the window goes there > > I want the whole window to go there.. > > and know this is simple, I just > don't work with frames too much > > Scott > _______________________________________________ > 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 phumes1 at rogers.com Thu Apr 18 08:15:35 2002 From: phumes1 at rogers.com (phumes1) Date: Thu, 18 Apr 2002 09:15:35 -0400 Subject: [Javascript] Re: DHTML Menu Message-ID: <5.1.0.14.0.20020418091057.00b49e80@pop.wlfdle.phub.net.cable.rogers.com> Hi, I'm using the DHTML menu (http://www.webreference.com/dhtml/hiermenus/latest/)on my page and would like the popup window to automatically center on the screen. How can I incorporate the "top" and "left" within the code in my "hm_arrays" file? The below code doesn't center the popup window yet I get no JS errors? ["E Message-ID: <3CBED00E.2915CD66@aflyingstart.net> You don't say where the window does position itself, but my guessis that at best it would be too far right and too far down and that the top left corner would be central in the window? From a maths perspective top=(screen.height-h)/2 would make the top of the window half way down, which is different from centring the popup because it takes no account of the height of the popup, so you you would want to adjust by half of that. From a hjavascripting perspective I am by no means certain that math expressions can be used in this context. I would tend to want to compute these in advance and build up the string of window attributes to include the answer rather than expect the window.open method to be able to compute math expressions hth Rodney phumes1 wrote: > I'm using the DHTML menu > (http://www.webreference.com/dhtml/hiermenus/latest/)on my page and would > like the popup window to automatically center on the screen. > > How can I incorporate the "top" and "left" within the code in my > "hm_arrays" file? > > The below code doesn't center the popup window yet I get no JS errors? > > ["E > +-----------------------------------------------------------------------------------+ > > Philip Humeniuk > phumes1 at rogers.com > phil.humeniuk at rogers.com > +------------------------------------------------------------------------------------+ From wolfsong at midcoast.com Sat Apr 20 10:40:19 2002 From: wolfsong at midcoast.com (WolfSong) Date: Sat, 20 Apr 2002 11:40:19 -0400 Subject: [Javascript] Rounding to 2 decimal places References: <20020412170101.8DDC5308F65@LaTech.edu> Message-ID: <000401c1e881$add61c00$5794c3d8@oemcomputer> Hi All, I'm working on a simple mortgage calculator for my CIS class and I've figured out how to round a number, but how to I round the number to 2 decimal places instead of a whole number? I know this is question is very newbie, but I just can't figure it out without getting an error or throwing the correct payments, etc. all out of wack! This is the code I've been working on: function Monthly(i, n, s) { // i = interest rate // n = num. payments // s = loan amt return (s*i/12*Math.pow(i/12+1,n))/(Math.pow(i/12+1,n)-1); } function ShowVal() { var i = eval(document.calc.rate.value); var n = eval(document.calc.time.value); var s = eval(document.calc.amt.value); document.calc.pymt.value=Math.round(Monthly(i, n, s)); document.calc.total.value=Math.round(Monthly(i, n, s)*n); } Thanks, Audra Seigars From Malki.Cymbalista at weizmann.ac.il Sun Apr 21 03:00:38 2002 From: Malki.Cymbalista at weizmann.ac.il (Malka Cymbalista) Date: Sun, 21 Apr 2002 11:00:38 +0300 Subject: [Javascript] help with javascript in a form Message-ID: I am creating a form that essentially has 3 questions where the user must answer either yes or no. So when the form is initially opened, there are 3 questions with radio buttons marked Yes and No. If the user answers yes to any of the questions, then a whole additional section of questions must be answered. I want theses additional sections to open only if the user answers yes. I assume that this can be done using javascript and layers. I am able to get it working in IE and also in netscape 6 but I cannot get it to work properly in netscape 4. If anyone has an example of this or has seen an example of this on the web, I would appreciate any information. Thanks for any help. Malki Cymbalista Webmaster, Weizmann Institute of Science Rehovot, Israel 76100 Internet: Malki.Cymbalista at weizmann.ac.il From extstarrfam at cox-internet.com Sun Apr 21 18:13:54 2002 From: extstarrfam at cox-internet.com (Steve) Date: Sun, 21 Apr 2002 18:13:54 -0500 Subject: [Javascript] Closing a Page with a Button> Message-ID: <000701c1e98a$35429840$242be942@coxinternet.com> What code do you use to close a page using an input button. Steve From andyg at ihug.co.nz Sun Apr 21 18:17:57 2002 From: andyg at ihug.co.nz (Andrew Gibson) Date: Mon, 22 Apr 2002 11:17:57 +1200 Subject: [Javascript] Closing a Page with a Button> References: <000701c1e98a$35429840$242be942@coxinternet.com> Message-ID: <005b01c1e98a$c6cc7010$16caadcb@k1n8i8> isn't it window.close() ? > What code do you use to close a page using an input > button. onClick="???????"> > Steve From Anthonywebster at venda.com Mon Apr 22 03:11:12 2002 From: Anthonywebster at venda.com (Anthony Webster) Date: Mon, 22 Apr 2002 09:11:12 +0100 Subject: [Javascript] Rounding to 2 decimal places Message-ID: <2BA3903C0E9C284F9AA18B2E123CF5ED150517@VENDAC01.uk.venda> hi audra, I havent looked at your code because I'm not really a javascript person, but in theory you should do the following: eg, 1.6897054 1. multiply your number by 100 (so you get 168.97054) 2. round to the nearest whole number - you mentioned you could do this (so you get 168) 3. divide by 100 (so you get 1.68) any good? anthony -----Original Message----- From: WolfSong [mailto:wolfsong at midcoast.com] Sent: 20 April 2002 16:40 To: javascript at LaTech.edu Subject: [Javascript] Rounding to 2 decimal places Hi All, I'm working on a simple mortgage calculator for my CIS class and I've figured out how to round a number, but how to I round the number to 2 decimal places instead of a whole number? I know this is question is very newbie, but I just can't figure it out without getting an error or throwing the correct payments, etc. all out of wack! This is the code I've been working on: function Monthly(i, n, s) { // i = interest rate // n = num. payments // s = loan amt return (s*i/12*Math.pow(i/12+1,n))/(Math.pow(i/12+1,n)-1); } function ShowVal() { var i = eval(document.calc.rate.value); var n = eval(document.calc.time.value); var s = eval(document.calc.amt.value); document.calc.pymt.value=Math.round(Monthly(i, n, s)); document.calc.total.value=Math.round(Monthly(i, n, s)*n); } Thanks, Audra Seigars _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From peter at brunone.com Mon Apr 22 11:15:02 2002 From: peter at brunone.com (Peter Brunone) Date: Mon, 22 Apr 2002 11:15:02 -0500 Subject: [Javascript] help with javascript in a form In-Reply-To: Message-ID: Malki, Take a look at http://dansteinman.com/dynduo, particularly the section on hiding and showing. I did my early cross-browser scripts for IE4/NS4 with help from this site; all his scripts work. Cheers, Peter Brunone |-----Original Message----- |From: javascript-admin at LaTech.edu [mailto:javascript-admin at LaTech.edu]On | |I am creating a form that essentially has 3 questions where the |user must answer either yes or no. So when the form is initially |opened, there are 3 questions with radio buttons marked Yes and No. |If the user answers yes to any of the questions, then a whole |additional section of questions must be answered. I want theses |additional sections to open only if the user answers yes. I assume |that this can be done using javascript and layers. I am able to |get it working in IE and also in netscape 6 but I cannot get it to |work properly in netscape 4. If anyone has an example of this or |has seen an example of this on the web, I would appreciate any information. |Thanks for any help. | |Malki Cymbalista |Webmaster, Weizmann Institute of Science |Rehovot, Israel 76100 |Internet: Malki.Cymbalista at weizmann.ac.il From FERONMA at cic-i.com Mon Apr 22 11:22:59 2002 From: FERONMA at cic-i.com (FERON Matthieu) Date: Mon, 22 Apr 2002 18:22:59 +0200 Subject: [Javascript] locking popups position Message-ID: <8384BC6ECC36EF42A8CAC21C8ECC63463CF745@gcmcina1.cic-na.cm-cic.fr> Hello all, is there a way to open a popup always at the same place ? thanks. Matthieu F?ron mferon at adeuza.fr http://ffwnet.phpnet.org -------------- next part -------------- An HTML attachment was scrubbed... URL: From greg at krieser.com Mon Apr 22 13:42:01 2002 From: greg at krieser.com (Greg Krieser) Date: Mon, 22 Apr 2002 13:42:01 -0500 Subject: [Javascript] locking popups position Message-ID: <200204221842.NAA01005@ppk.siteprotect.com> Are you looking for the left and top commands? See code below. ? The following message was sent by "FERON Matthieu" on Mon, 22 Apr 2002 18:22:59 +0200. > Hello all, > is there a way to open a popup always at the same place ? > thanks. > Matthieu F?ron > mferon at adeuza.fr > http://ffwnet.phpnet.org > > > From rodney at aflyingstart.net Mon Apr 22 14:03:57 2002 From: rodney at aflyingstart.net (Rodney Myers) Date: Mon, 22 Apr 2002 20:03:57 +0100 Subject: [Javascript] locking popups position References: <200204221842.NAA01005@ppk.siteprotect.com> Message-ID: <3CC45E9D.56C657A3@aflyingstart.net> For Netscape you also need screenX and screenY as in top=300,left=300,screenX=300,screenY=300 Rodney Greg Krieser wrote: > Are you looking for the left and top commands? See code below. > > > > > > Hello all, > > is there a way to open a popup always at the same place ? > > thanks. > > Matthieu F?ron > From FERONMA at cic-i.com Tue Apr 23 02:10:39 2002 From: FERONMA at cic-i.com (FERON Matthieu) Date: Tue, 23 Apr 2002 09:10:39 +0200 Subject: [Javascript] locking popups position Message-ID: <8384BC6ECC36EF42A8CAC21C8ECC63463CF746@gcmcina1.cic-na.cm-cic.fr> thanks you all ! and shame on me for such a stupid question ! ;-) -----Message d'origine----- De : Rodney Myers [mailto:rodney at aflyingstart.net] Envoy? : lundi 22 avril 2002 21:04 ? : javascript at LaTech.edu Objet : Re: [Javascript] locking popups position For Netscape you also need screenX and screenY as in top=300,left=300,screenX=300,screenY=300 Rodney Greg Krieser wrote: > Are you looking for the left and top commands? See code below. > > > > > > Hello all, > > is there a way to open a popup always at the same place ? > > thanks. > > Matthieu F?ron > _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From gassinaumasis at hotmail.com Tue Apr 23 03:10:49 2002 From: gassinaumasis at hotmail.com (Peter-Paul Koch) Date: Tue, 23 Apr 2002 08:10:49 +0000 Subject: [Javascript] "var" keyword Message-ID: >I can declare my variables with the "var" keyord, or not. I can delete a >variable with "delete" keyword or not. But what is the real diference and >how should I do? If you declare a variable inside a function by using the 'var' keyword, it becomes a local variable: var theVar = 'global'; function doSomething() { alert (theVar) // gives 'global' var theVar = 'local'; alert (theVar) // gives 'local' } As to delete, I never use it and I seem to remember Flanagan said it's not very important in JavaScript. ppk _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com From rodney at aflyingstart.net Tue Apr 23 05:21:32 2002 From: rodney at aflyingstart.net (Rodney Myers) Date: Tue, 23 Apr 2002 11:21:32 +0100 Subject: [Javascript] "var" keyword References: Message-ID: <3CC535AC.701EDE2E@aflyingstart.net> I agree. I never use delete. Much more important is the discipline of scoping variables globally and locally as PPK suggests. Local variables are in effect "deleted" when control leaves a function. Also, when a page is replaced in a window or frame the variables that belonged to it also disappear. Rodney Peter-Paul Koch wrote: > As to delete, I never use it and I seem to remember Flanagan said it's not > very important in JavaScript. > > ppk From Malki.Cymbalista at weizmann.ac.il Tue Apr 23 06:12:15 2002 From: Malki.Cymbalista at weizmann.ac.il (Malka Cymbalista) Date: Tue, 23 Apr 2002 14:12:15 +0300 Subject: [Javascript] help with javascript in a form Message-ID: Thanks for the pointer. Malki Cymbalista Webmaster, Weizmann Institute of Science Rehovot, Israel 76100 Internet: Malki.Cymbalista at weizmann.ac.il >>> peter at brunone.com 04/22/02 07:15PM >>> Malki, Take a look at http://dansteinman.com/dynduo, particularly the section on hiding and showing. I did my early cross-browser scripts for IE4/NS4 with help from this site; all his scripts work. Cheers, Peter Brunone |-----Original Message----- |From: javascript-admin at LaTech.edu [mailto:javascript-admin at LaTech.edu]On | |I am creating a form that essentially has 3 questions where the |user must answer either yes or no. So when the form is initially |opened, there are 3 questions with radio buttons marked Yes and No. |If the user answers yes to any of the questions, then a whole |additional section of questions must be answered. I want theses |additional sections to open only if the user answers yes. I assume |that this can be done using javascript and layers. I am able to |get it working in IE and also in netscape 6 but I cannot get it to |work properly in netscape 4. If anyone has an example of this or |has seen an example of this on the web, I would appreciate any information. |Thanks for any help. | |Malki Cymbalista |Webmaster, Weizmann Institute of Science |Rehovot, Israel 76100 |Internet: Malki.Cymbalista at weizmann.ac.il _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From lists at imladris.com Tue Apr 23 11:08:45 2002 From: lists at imladris.com (Amanda Birmingham) Date: Tue, 23 Apr 2002 10:08:45 -0600 Subject: [Javascript] Question about best method of creating inheritance in javascript Message-ID: <5.1.0.14.0.20020423095325.0376bdb8@mail.imladris.com> Hello, List, I'm new here, so please forgive any faux pas. I've been gearing up to write a very large OO javascript program, and have therefore been investigating the different merits of possible ways of subclassing in Javascript (yeah, I know "class" is a bit of a misnomer, but you know what I mean :) So far, I've seen these three methods: * make superclass constructor a method of subclass and call it inside the subclass constructor (without the "new"). This takes the subclass object and extends its "this" with the superclass info. * inside the subclass constructor, create a new instance of the superclass. Then extend it and return that extended superclass as the subclass instead of the the "this". * assign a new superclass object to the prototype property of the subclass constructor function. Question 1: when you create an instance of a subclass that inherits some stuff, do all of these methods result in you *also* creating objects of all the classes it inherits from? Question 2: If *so*, what is the advantage of the prototype method (which, as I understand it, is the real, *approved* way of doing inheritance in javascript), since it seems that using prototype has problems of blocking access to methods of the superclass that have the same name as objects of the subclass (unless you use something like Kevin Lindsey's workaround) ? Answers, advice, and/or descriptions of other methods I've overlooked would be gratefully welcomed. Thanks, Amanda Birmingham Web Application Developer From costea.dan at ssi-schaefer.ro Tue Apr 23 12:15:59 2002 From: costea.dan at ssi-schaefer.ro (Dan Costea) Date: Tue, 23 Apr 2002 10:15:59 -0700 Subject: [Javascript] "var" keyword Message-ID: <004301c1eaea$8a027bf0$8ddea8c0@pcdanc> Hello all, I can declare my variables with the "var" keyord, or not. I can delete a variable with "delete" keyword or not. But what is the real diference and how should I do? Interesting (at least for me) example: var x = 1; y = 2; alert (x); alert (y); delete x; alert (x); delete y; alert (y); I am a little confused... I woul appreciate any clarification for you. Thanks, Dan. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at imladris.com Wed Apr 24 10:11:15 2002 From: lists at imladris.com (Amanda Birmingham) Date: Wed, 24 Apr 2002 09:11:15 -0600 Subject: [Javascript] Question about best method of creating inheritance in javascript In-Reply-To: <002301c1ebb4$212380a0$8ddea8c0@pcdanc> References: <5.1.0.14.0.20020423095325.0376bdb8@mail.imladris.com> Message-ID: <5.1.0.14.0.20020424090219.00a81308@mail.imladris.com> Dan, Thank you for the recommendation; could you be more specific about what you feel would be helpful in this chapter? I have read Flanagan's Definitive Guide, and didn't immediately see any extra information in the recommended reading. Perhaps I should have noted that I am familiar with javascript, and have used objects in it before ... my current mission is to try to track down info about the more esoteric aspects of inheritance so that I do it in a performance-friendly way (my new app will have a very large number of heavily-subclassed objects, and I don't want my chosen inheritance mechanism to create any more than are strictly necessary.) Thanks for your time, Amanda Birmingham Web Application Developer At 10:18 AM 4/24/2002 -0700, you wrote: >I recommend you to read the chapter "Working with Objects" of "Client-Side >JavaScript Guide" book: >http://developer.netscape.com/docs/manuals/js/client/jsguide/obj.htm > >Dan. > > >----- Original Message ----- >From: "Amanda Birmingham" >To: >Sent: Tuesday, April 23, 2002 9:08 AM >Subject: [Javascript] Question about best method of creating inheritance in >javascript > > > > Hello, List, > > I'm new here, so please forgive any faux pas. I've been gearing up to > > write a very large OO javascript program, and have therefore been > > investigating the different merits of possible ways of subclassing in > > Javascript (yeah, I know "class" is a bit of a misnomer, but you know what > > I mean :) > > > > So far, I've seen these three methods: > > * make superclass constructor a method of subclass and call it inside the > > subclass constructor (without the "new"). This takes the subclass object > > and extends its "this" with the superclass info. > > > > * inside the subclass constructor, create a new instance of the >superclass. > > Then extend it and return that extended superclass as the subclass instead > > of the the "this". > > > > * assign a new superclass object to the prototype property of the subclass > > constructor function. > > > > Question 1: when you create an instance of a subclass that inherits some > > stuff, do all of these methods result in you *also* creating objects of >all > > the classes it inherits from? > > > > Question 2: If *so*, what is the advantage of the prototype method (which, > > as I understand it, is the real, *approved* way of doing inheritance in > > javascript), since it seems that using prototype has problems of blocking > > access to methods of the superclass that have the same name as objects of > > the subclass (unless you use something like Kevin Lindsey's workaround) ? > > > > Answers, advice, and/or descriptions of other methods I've overlooked >would > > be gratefully welcomed. Thanks, > > > > Amanda Birmingham > > Web Application Developer > > > > _______________________________________________ > > 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 mallard at serv.net Wed Apr 24 11:03:57 2002 From: mallard at serv.net (TomMallard) Date: Wed, 24 Apr 2002 09:03:57 -0700 Subject: [Javascript] Question about best method of creating inheritance in javascript In-Reply-To: <5.1.0.14.0.20020424090219.00a81308@mail.imladris.com> Message-ID: Have you checked out "Javascript Objects" by Nakhimaovsky & Myers from Wrox? It's IE specific...has a lot of great ideas using js for objects. tom mallard seattle -----Original Message----- From: javascript-admin at LaTech.edu [mailto:javascript-admin at LaTech.edu]On Behalf Of Amanda Birmingham Sent: Wednesday, April 24, 2002 8:11 AM To: javascript at LaTech.edu Subject: Re: [Javascript] Question about best method of creating inheritance in javascript Dan, Thank you for the recommendation; could you be more specific about what you feel would be helpful in this chapter? I have read Flanagan's Definitive Guide, and didn't immediately see any extra information in the recommended reading. Perhaps I should have noted that I am familiar with javascript, and have used objects in it before ... my current mission is to try to track down info about the more esoteric aspects of inheritance so that I do it in a performance-friendly way (my new app will have a very large number of heavily-subclassed objects, and I don't want my chosen inheritance mechanism to create any more than are strictly necessary.) Thanks for your time, Amanda Birmingham Web Application Developer From costea.dan at ssi-schaefer.ro Wed Apr 24 12:18:57 2002 From: costea.dan at ssi-schaefer.ro (Dan Costea) Date: Wed, 24 Apr 2002 10:18:57 -0700 Subject: [Javascript] Question about best method of creating inheritance in javascript References: <5.1.0.14.0.20020423095325.0376bdb8@mail.imladris.com> Message-ID: <002301c1ebb4$212380a0$8ddea8c0@pcdanc> I recommend you to read the chapter "Working with Objects" of "Client-Side JavaScript Guide" book: http://developer.netscape.com/docs/manuals/js/client/jsguide/obj.htm Dan. ----- Original Message ----- From: "Amanda Birmingham" To: Sent: Tuesday, April 23, 2002 9:08 AM Subject: [Javascript] Question about best method of creating inheritance in javascript > Hello, List, > I'm new here, so please forgive any faux pas. I've been gearing up to > write a very large OO javascript program, and have therefore been > investigating the different merits of possible ways of subclassing in > Javascript (yeah, I know "class" is a bit of a misnomer, but you know what > I mean :) > > So far, I've seen these three methods: > * make superclass constructor a method of subclass and call it inside the > subclass constructor (without the "new"). This takes the subclass object > and extends its "this" with the superclass info. > > * inside the subclass constructor, create a new instance of the superclass. > Then extend it and return that extended superclass as the subclass instead > of the the "this". > > * assign a new superclass object to the prototype property of the subclass > constructor function. > > Question 1: when you create an instance of a subclass that inherits some > stuff, do all of these methods result in you *also* creating objects of all > the classes it inherits from? > > Question 2: If *so*, what is the advantage of the prototype method (which, > as I understand it, is the real, *approved* way of doing inheritance in > javascript), since it seems that using prototype has problems of blocking > access to methods of the superclass that have the same name as objects of > the subclass (unless you use something like Kevin Lindsey's workaround) ? > > Answers, advice, and/or descriptions of other methods I've overlooked would > be gratefully welcomed. Thanks, > > Amanda Birmingham > Web Application Developer > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript From costea.dan at ssi-schaefer.ro Wed Apr 24 20:43:06 2002 From: costea.dan at ssi-schaefer.ro (Dan Costea) Date: Wed, 24 Apr 2002 18:43:06 -0700 Subject: [Javascript] Question about best method of creating inheritance in javascript References: <5.1.0.14.0.20020423095325.0376bdb8@mail.imladris.com> <5.1.0.14.0.20020424090219.00a81308@mail.imladris.com> Message-ID: <005501c1ebfa$8ca74b90$8ddea8c0@pcdanc> Amanda, when I red this book (Client-Side JavaScript Guide) I made few notes about using objects. I hope these notes can help you. Here they are: /*************************************************************************** ********/ Important observations: - JavaScript is not a class-based language (like JAVA or C++). It is prototype-based language. A prototype-based language has the notion of a prototypical object, an object used as a template from which to get the initial properties for a new object. - JavaScript does not have a class definition separate from the constructor. - Any JavaScript function can be used as a constructor. OBJECTS: // this is a constructor for the "person" object function person (name, age, sex) { // a js object constructor is a function that have the object name and its properties, declared as follwos: this.name = name; this.age = age; this.sex = sex; } // these are few instances of the "person" object Dan = new person ("Dan Costea", 23, "M"); Ion = new person ("Ion Iliescu", 98, "F"); Adelina = new person ("Simona", 21, "F"); // making another object: function car (make, model, color, owner) { this.make = make; this.model = model; this.color = color; this.owner = owner; // defineing a method: (display_car is a function defined bellow) this.fnDisplay_car = fnDisplay_car; } // these are few instances of the "car" object ford = new car ("Ford", "Mondeo", "red", Adelina); mercedes = new car ("Mercedes", "A Classe", "black", Dan); dacia = new car ("Dacia", "Nova", "blue", Ion); // for accesing the mercedes owner age, you have to say: mercedes.owner.age // changeing a property: mercedes.model = "limusine"; // adding a property just for a specific object: mercedes.year = 2001; // adding a property for all "car" object types: car.prototype.country = null; // modifying this new property for mercedes object: mercedes.country = "Gremany"; // a method of the car object (it is written exactly like a normal function, but it is declared in the object constructor) function fnDisplay_car () { alert ("This is a method of the car object." + "\n" + "You selected " + this.make + " car." + "\n" + this.owner.name + " is the owner of this car."); } // function that displays object properties (defined or predefined objects) function fnShow_props (obj, obj_name) { var result = ""; // going through each object property: for (var i in obj) result += obj_name + "." + i + " = " + obj[i] + "\n" return result } INHERITANCE (1): // the top level object type function Employee () { this.name = ""; this.dept = "general"; } // object that inheritance Employee object and adds one new property function Manager () { this.reports = []; } Manager.prototype = new Employee; // object that inheritance Employee object and adds one new property function WorkerBee () { this.projects = []; } WorkerBee.prototype = new Employee; // object that inheritance WorkerBee object, adds one new property (quota) and modifies the value of one already defined property (dept) function SalesPerson () { this.dept = "sales"; this.quota = 100; } SalesPerson.prototype = new WorkerBee; // object that inheritance WorkerBee object, adds one new property (machine) and modifies the value of one already defined property (dept) function Engineer () { this.dept = "engineering"; this.machine = ""; } Engineer.prototype = new WorkerBee; // creating few objects that have WorkerBee as model (we can say that these objects are "instances" of WorkerBee) jim = new Employee; sally = new Manager; mark = new WorkerBee; fred = new SalesPerson; jane = new Engineer; // I think it's obvious what properties each object will have (and how can you change them or add new properties - see creating object example) INHERITANCE (2): // the top level object type function Employee () { this.name = ""; this.dept = "general"; } // object that inheritance Employee object and adds one new property function Manager () { this.reports = []; } Manager.prototype = new Employee; // object that inheritance Employee object and adds one new property function WorkerBee () { this.projects = []; } WorkerBee.prototype = new Employee; // object that inheritance WorkerBee object, adds one new property (quota) and modifies the value of one already defined property (dept) function SalesPerson () { this.dept = "sales"; this.quota = 100; } SalesPerson.prototype = new WorkerBee; // object that inheritance WorkerBee object, adds one new property (machine) and modifies the value of one already defined property (dept) function Engineer () { this.dept = "engineering"; this.machine = ""; } Engineer.prototype = new WorkerBee; // creating few objects that have WorkerBee as model (we can say that these objects are "instances" of WorkerBee) jim = new Employee; sally = new Manager; mark = new WorkerBee; fred = new SalesPerson; jane = new Engineer; // I think it's obvious what properties each object will have (and how can you change them or add new properties - see creating object example) // function that displays object properties (defined or predefined objects) function fnShow_props (obj, obj_name) { var result = ""; // going through each object property: for (var i in obj) result += obj_name + "." + i + " = " + obj[i] + "\n" return result } /*************************************************************************** ********/ ----- Original Message ----- From: "Amanda Birmingham" To: Sent: Wednesday, April 24, 2002 8:11 AM Subject: Re: [Javascript] Question about best method of creating inheritance in javascript > Dan, > Thank you for the recommendation; could you be more specific about what you > feel would be helpful in this chapter? I have read Flanagan's Definitive > Guide, and didn't immediately see any extra information in the recommended > reading. > > Perhaps I should have noted that I am familiar with javascript, and have > used objects in it before ... my current mission is to try to track down > info about the more esoteric aspects of inheritance so that I do it in a > performance-friendly way (my new app will have a very large number of > heavily-subclassed objects, and I don't want my chosen inheritance > mechanism to create any more than are strictly necessary.) > > Thanks for your time, > Amanda Birmingham > Web Application Developer > > At 10:18 AM 4/24/2002 -0700, you wrote: > > >I recommend you to read the chapter "Working with Objects" of "Client-Side > >JavaScript Guide" book: > >http://developer.netscape.com/docs/manuals/js/client/jsguide/obj.htm > > > >Dan. From extstarrfam at cox-internet.com Thu Apr 25 20:02:41 2002 From: extstarrfam at cox-internet.com (Steve) Date: Thu, 25 Apr 2002 20:02:41 -0500 Subject: [Javascript] Internet JavaScript Course? Message-ID: <001101c1ecbe$11504860$242be942@coxinternet.com> Does anyone know of a good internet based JavaScript course? From lau at goldenweb.com.au Fri Apr 26 00:02:18 2002 From: lau at goldenweb.com.au (Lau) Date: Fri, 26 Apr 2002 15:02:18 +1000 Subject: [Javascript] How do I refer to whitespace characters? References: Message-ID: <000701c1ecdf$8ac9d5f0$6a00a8c0@laubox> I want to read a string and remove all the whitespace before a word. How do I refer to tabs and newline characters etc. Can anyone give me a full list of what I should be checking for? while(mystr.length>0 && mystr.charAt(0)==" ") mystr= mystr.substr(1); Peace Lau From extstarrfam at cox-internet.com Fri Apr 26 00:57:50 2002 From: extstarrfam at cox-internet.com (Steve) Date: Fri, 26 Apr 2002 00:57:50 -0500 Subject: [Javascript] Object help Message-ID: <000701c1ece7$4d2d4ee0$242be942@coxinternet.com> I have a main or parent page (a frames page) named 'selections_frames'. There are two frames on this page one is named 'selections_area' and the other is 'mainDisplay'. When the user makes a selection from a list that exists in a table cell on a page that is loaded into the 'selections_area' frame, I want to load a new page in the 'selections_area' frame named 'Rocks Options.html'. I have tried a lot of things to do this. The results have ranged from:'Object required', 'is either Null or not an Object', to 'Undefined'. The code below results in 'Undefined'. If you remove the "var newFrame .......", the result is 'is either Null or not an Object'. On the frames page I used "window.name = selections_frames" to name the page. Will someone please help me find a solution. result = selections_frames is undefined function parentSel(refPage ) { var newFrame = new Object(selections_frames.selections_area) if(refPage==1) newFrame.src="Rocks Options.html"; } or result = selections_frames.selections_area is either null or not an object function parentSel(refPage ) { if(refPage==1) selections_frames.selections_area.src="Rocks Options.html"; } From rodney at aflyingstart.net Fri Apr 26 03:37:01 2002 From: rodney at aflyingstart.net (Rodney Myers) Date: Fri, 26 Apr 2002 09:37:01 +0100 Subject: [Javascript] Object help References: <000701c1ece7$4d2d4ee0$242be942@coxinternet.com> Message-ID: <3CC911AD.ADF02DF2@aflyingstart.net> window.location.href="url" works for me! Since the selection of the new file is being done within the same frame that you want to replace with another file that should about do it, replacing "url" with a suitable string or string valued var. There seems to be no need to be defining new Objects naming frames that are or should be laready named in the HTML of the in the frameset file. And .src is a property that I have never used for the file content of a window. I hesitate to say categorically that it is wrong but I have never seen it used before in such a context and there are more accepted ways of doing it. hth Rodney Steve wrote: > I have a main or parent page (a frames page) named > 'selections_frames'. There are two frames on this page > one is named 'selections_area' and the other is > 'mainDisplay'. When the user makes a selection from a > list that exists in a table cell on a page that is > loaded into the 'selections_area' frame, I want to load > a new page in the 'selections_area' frame named 'Rocks > Options.html'. I have tried a lot of things to do > this. The results have ranged from:'Object required', > 'is either Null or not an Object', to 'Undefined'. The > code below results in 'Undefined'. If you remove the > "var newFrame .......", the result is 'is either Null > or not an Object'. On the frames page I used > "window.name = selections_frames" to name the page. > Will someone please help me find a solution. > > result = selections_frames is undefined > function parentSel(refPage ) { > var newFrame = new > Object(selections_frames.selections_area) > if(refPage==1) newFrame.src="Rocks Options.html"; > } > > or > > result = selections_frames.selections_area is either > null or not an object > function parentSel(refPage ) { > if(refPage==1) > selections_frames.selections_area.src="Rocks > Options.html"; > } > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript From cutterbl at hotmail.com Fri Apr 26 07:10:31 2002 From: cutterbl at hotmail.com (Cutter Bl) Date: Fri, 26 Apr 2002 08:10:31 -0400 Subject: [Javascript] Internet JavaScript Course? Message-ID: Mindleaders offers a fairly decent course. Mindleaders operates through resellers, you can find a link to online training on the Delmarva Online website (http://www.dmv.com) Cutter http://www.falcon-knives.com ----Original Message Follows---- From: "Steve" Reply-To: javascript at LaTech.edu To: Subject: [Javascript] Internet JavaScript Course? Date: Thu, 25 Apr 2002 20:02:41 -0500 Does anyone know of a good internet based JavaScript course? _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com From cutterbl at hotmail.com Fri Apr 26 07:11:27 2002 From: cutterbl at hotmail.com (Cutter Bl) Date: Fri, 26 Apr 2002 08:11:27 -0400 Subject: [Javascript] How do I refer to whitespace characters? Message-ID: How about trim(mystring) Cutter http://www.falcon-knives.com ----Original Message Follows---- From: "Lau" Reply-To: javascript at LaTech.edu To: Subject: [Javascript] How do I refer to whitespace characters? Date: Fri, 26 Apr 2002 15:02:18 +1000 I want to read a string and remove all the whitespace before a word. How do I refer to tabs and newline characters etc. Can anyone give me a full list of what I should be checking for? while(mystr.length>0 && mystr.charAt(0)==" ") mystr= mystr.substr(1); Peace Lau _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com From cutterbl at hotmail.com Fri Apr 26 07:13:52 2002 From: cutterbl at hotmail.com (Cutter Bl) Date: Fri, 26 Apr 2002 08:13:52 -0400 Subject: [Javascript] Object help Message-ID: Here's the Link Cutter http://www.falcon-knives.com ----Original Message Follows---- From: "Steve" Reply-To: javascript at LaTech.edu To: Subject: [Javascript] Object help Date: Fri, 26 Apr 2002 00:57:50 -0500 I have a main or parent page (a frames page) named 'selections_frames'. There are two frames on this page one is named 'selections_area' and the other is 'mainDisplay'. When the user makes a selection from a list that exists in a table cell on a page that is loaded into the 'selections_area' frame, I want to load a new page in the 'selections_area' frame named 'Rocks Options.html'. I have tried a lot of things to do this. The results have ranged from:'Object required', 'is either Null or not an Object', to 'Undefined'. The code below results in 'Undefined'. If you remove the "var newFrame .......", the result is 'is either Null or not an Object'. On the frames page I used "window.name = selections_frames" to name the page. Will someone please help me find a solution. result = selections_frames is undefined function parentSel(refPage ) { var newFrame = new Object(selections_frames.selections_area) if(refPage==1) newFrame.src="Rocks Options.html"; } or result = selections_frames.selections_area is either null or not an object function parentSel(refPage ) { if(refPage==1) selections_frames.selections_area.src="Rocks Options.html"; } _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com From lists at imladris.com Fri Apr 26 11:17:21 2002 From: lists at imladris.com (Amanda Birmingham) Date: Fri, 26 Apr 2002 10:17:21 -0600 Subject: [Javascript] Please help: problem with Javascript 'this' keyword in nested objects! Message-ID: <5.1.0.14.0.20020426101528.0377ce90@mail.imladris.com> Hello, List, I apologize to anyone who has seen this question on the wdvltalk list, but I'm desperate for an answer in short order ... I am having a serious *issue* with the @#$%& 'this' keyword. Basically, I have a setup like this: I have two types of objects defined. Object1 has a constructor that defines some methods for Object1, and these methods use the 'this' keyword to refer to properties of Object1. Object2 has a constructor that creates a new instance of Object1 as one of its properties. The Object2 then attempts to use one of the methods of its new Object1 property by calling "this.Object1.methodName". Which flunks. It flunks because methodName uses the "this" keyword inside it, and expects "this" to refer to an object of type Object1. Unfortunately, for reasons I totally cannot fathom, when I call methodName as described above, the "this" it is using is the "this" for Object2 (the outside one). Of course, Object2 doesn't have a bunch of properties that Object1 does, so methodName flunks. Why the heck is this happening?! (I have verified that it actually *is*). How do I write my methods to access the properties of their immediate "parent", rather than the properties of the object that ultimately invoked them?? (short of using "this.Object1" in place of "this" in methodName, which is not an option because it makes Object1 completely un-reusable.) I hope I've managed to describe the issue in a way that is at least somewhat clear--if not, please let me know and I can send pseudocode. Any suggestions would be REALLY welcome, as this problem is keeping me from getting anything done until I know how to get around it! Thanks as always, Amanda Birmingham Web Application Developer From liuabe99 at hotmail.com Fri Apr 26 12:05:24 2002 From: liuabe99 at hotmail.com (Abraham Liu) Date: Fri, 26 Apr 2002 13:05:24 -0400 Subject: [Javascript] Internet JavaScript Course? Message-ID: Hi Steve, You can try the following sites-they are free -- http://www.dansteinman.com http://www.webmonkey.com If you have js problem, go the following site first, http://www.xs4all.nl/~ppk/js/index.html?browsers.html Good luck. Abe Liu >From: "Steve" >Reply-To: javascript at LaTech.edu >To: >Subject: [Javascript] Internet JavaScript Course? >Date: Thu, 25 Apr 2002 20:02:41 -0500 > >Does anyone know of a good internet based JavaScript >course? > > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com From costea.dan at ssi-schaefer.ro Fri Apr 26 12:52:22 2002 From: costea.dan at ssi-schaefer.ro (Dan Costea) Date: Fri, 26 Apr 2002 10:52:22 -0700 Subject: [Javascript] How do I refer to whitespace characters? References: <000701c1ecdf$8ac9d5f0$6a00a8c0@laubox> Message-ID: <003401c1ed4b$2354e1a0$8ddea8c0@pcdanc> You can use a RegExp (regular expression) like this /\s+/. This will do. Example: var s = " asdf' sadfAS "; alert ("->" + s + "<-\n->" + s.replace (/\s+/, "") + "<-"); Dan. ----- Original Message ----- From: "Lau" To: Sent: Thursday, April 25, 2002 10:02 PM Subject: [Javascript] How do I refer to whitespace characters? > I want to read a string and remove all the whitespace before a word. > How do I refer to tabs and newline characters etc. > Can anyone give me a full list of what I should be checking for? > > > while(mystr.length>0 && mystr.charAt(0)==" ") > mystr= mystr.substr(1); > > > Peace > Lau > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript From costea.dan at ssi-schaefer.ro Fri Apr 26 17:24:27 2002 From: costea.dan at ssi-schaefer.ro (Dan Costea) Date: Fri, 26 Apr 2002 15:24:27 -0700 Subject: [Javascript] How do I refer to whitespace characters? References: Message-ID: <00ef01c1ed71$23b29cc0$8ddea8c0@pcdanc> "trim"? What is trim? who's method? I know the SQL trim (that is clearing just the spaces from the beginning of the string, not all white spaces), but not in js... Can you give us a working example? Dan. ----- Original Message ----- From: "Cutter Bl" To: Sent: Friday, April 26, 2002 5:11 AM Subject: Re: [Javascript] How do I refer to whitespace characters? > How about trim(mystring) > > Cutter > http://www.falcon-knives.com > > ----Original Message Follows---- > From: "Lau" > Reply-To: javascript at LaTech.edu > To: > Subject: [Javascript] How do I refer to whitespace characters? > Date: Fri, 26 Apr 2002 15:02:18 +1000 > > I want to read a string and remove all the whitespace before a word. > How do I refer to tabs and newline characters etc. > Can anyone give me a full list of what I should be checking for? > > > while(mystr.length>0 && mystr.charAt(0)==" ") > mystr= mystr.substr(1); > > > Peace > Lau > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > > > _________________________________________________________________ > Send and receive Hotmail on your mobile device: http://mobile.msn.com > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript From chriz at basken.com Fri Apr 26 17:55:30 2002 From: chriz at basken.com (Christopher Basken) Date: Fri, 26 Apr 2002 18:55:30 -0400 Subject: [Javascript] associative arrays question Message-ID: <5.1.0.14.0.20020426184913.0387f3e8@mail.basken.com> At least, I *think* they're called associative arrays. I created an associative array in the following manner: theirScore = new Array(3); theirScore["Bob"] = 0; theirScore["Fred"] = 0; theirScore["Sue"] = 0; This works fine, in the sense that I can fool around with those numeric values like so (where I pass it 'Sue' as an arg): function boostScore(who) { theirScore[who]++; } ...and so on. The problem I'm running into is at the end, when I want to loop through the theirScore array, I can't seem to get normal indexing to work. theirScore["Sue"] returns the expected incremented value, but theirScore[2] returns 'undefined'. How do you loop through an associative array? From lists at imladris.com Fri Apr 26 18:21:33 2002 From: lists at imladris.com (Amanda Birmingham) Date: Fri, 26 Apr 2002 17:21:33 -0600 Subject: [Javascript] associative arrays question In-Reply-To: <5.1.0.14.0.20020426184913.0387f3e8@mail.basken.com> Message-ID: <5.1.0.14.0.20020426171946.0371c8e8@mail.imladris.com> Use the for ... in construction, like this: for (var strCurrentKey in theirScore) { alert(theirScore[strCurrentKey]); } Also works for looping through object properties :) HTH. Amanda Birmingham Web Application Developer At 06:55 PM 4/26/2002 -0400, you wrote: >At least, I *think* they're called associative arrays. > >I created an associative array in the following manner: > >theirScore = new Array(3); > >theirScore["Bob"] = 0; >theirScore["Fred"] = 0; >theirScore["Sue"] = 0; > >This works fine, in the sense that I can fool around with those numeric >values like so (where I pass it 'Sue' as an arg): > >function boostScore(who) { > theirScore[who]++; >} > >..and so on. The problem I'm running into is at the end, when I want to >loop through the theirScore array, I can't seem to get normal indexing to >work. theirScore["Sue"] returns the expected incremented value, but >theirScore[2] returns 'undefined'. > >How do you loop through an associative array? > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript > > > From chriz at basken.com Sat Apr 27 09:44:05 2002 From: chriz at basken.com (Christopher Basken) Date: Sat, 27 Apr 2002 10:44:05 -0400 Subject: [Javascript] associative arrays question In-Reply-To: <5.1.0.14.0.20020426171946.0371c8e8@mail.imladris.com> References: <5.1.0.14.0.20020426184913.0387f3e8@mail.basken.com> Message-ID: <5.1.0.14.0.20020427104341.00b2bd68@mail.basken.com> At 05:21 PM 4/26/2002 -0600, you wrote: >Use the for ... in construction, like this: > >for (var strCurrentKey in theirScore) { > alert(theirScore[strCurrentKey]); >} > >Also works for looping through object properties :) HTH. > >Amanda Birmingham >Web Application Developer Thanks! That did the trick. From costea.dan at ssi-schaefer.ro Mon Apr 29 11:18:06 2002 From: costea.dan at ssi-schaefer.ro (Dan Costea) Date: Mon, 29 Apr 2002 09:18:06 -0700 Subject: [Javascript] Please help: problem with Javascript 'this' keyword in nested objects! References: <5.1.0.14.0.20020426101528.0377ce90@mail.imladris.com> Message-ID: <004001c1ef99$74cea8e0$8ddea8c0@pcdanc> I'm not sure I understud exactly your problem. I think you should give an example. But, if your problem is that you cannot use objects as attributes of another objects, than here is an example: function Object1 () { this.obj1_attr1 = ""; this.obj1_attr2 = ""; this.obj1_constr = obj1_constr; } function obj1_constr (attr1, attr2) { this.obj1_attr1 = attr1; this.obj1_attr2 = attr2; } function Object2 () { this.obj2_attr1 = ""; this.obj2_attr2 = ""; this.obj2_obj1 = ""; this.obj2_constr = obj2_constr; this.obj2_constr ("object 2; attribute 1", "object 2; attribute 2"); } function obj2_constr (attr1, attr2) { this.obj2_attr1 = attr1; this.obj2_attr2 = attr2; this.obj2_obj1 = new Object1 (); this.obj2_obj1.obj1_constr ("object 1; attribute 1", "object 1; attribute 2"); } function testing () { var testObj = new Object2 (); alert ("testObj.obj2_attr1 =\t\t" + testObj.obj2_attr1 + "\ntestObj.obj2_attr2 =\t\t" + testObj.obj2_attr2 + "\ntestObj.obj2_obj1.obj1_attr1 =\t" + testObj.obj2_obj1.obj1_attr1 + "\ntestObj.obj2_obj1.obj1_attr2 =\t" + testObj.obj2_obj1.obj1_attr2); } Dan ----- Original Message ----- From: "Amanda Birmingham" To: Sent: Friday, April 26, 2002 9:17 AM Subject: [Javascript] Please help: problem with Javascript 'this' keyword in nested objects! > Hello, List, > I apologize to anyone who has seen this question on the wdvltalk list, but > I'm desperate for an answer in short order ... > > I am having a serious *issue* with the @#$%& 'this' keyword. Basically, I > have a setup like this: I have two types of objects defined. Object1 has a > constructor that defines some methods for Object1, and these methods use > the 'this' keyword to refer to properties of Object1. Object2 has a > constructor that creates a new instance of Object1 as one of its > properties. The Object2 then attempts to use one of the methods of its new > Object1 property by calling "this.Object1.methodName". > > Which flunks. It flunks because methodName uses the "this" keyword inside > it, and expects "this" to refer to an object of type > Object1. Unfortunately, for reasons I totally cannot fathom, when I call > methodName as described above, the "this" it is using is the "this" for > Object2 (the outside one). Of course, Object2 doesn't have a bunch of > properties that Object1 does, so methodName flunks. > > Why the heck is this happening?! (I have verified that it actually > *is*). How do I write my methods to access the properties of their > immediate "parent", rather than the properties of the object that > ultimately invoked them?? (short of using "this.Object1" in place of "this" > in methodName, which is not an option because it makes Object1 completely > un-reusable.) > > I hope I've managed to describe the issue in a way that is at least > somewhat clear--if not, please let me know and I can send pseudocode. Any > suggestions would be REALLY welcome, as this problem is keeping me from > getting anything done until I know how to get around it! > > Thanks as always, > > Amanda Birmingham > Web Application Developer > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript From tommy_andries at yahoo.com Mon Apr 29 14:45:26 2002 From: tommy_andries at yahoo.com (Tom Andries) Date: Mon, 29 Apr 2002 12:45:26 -0700 (PDT) Subject: [Javascript] Great scroller script... doesn't work in frames?? Message-ID: <20020429194526.41941.qmail@web13306.mail.yahoo.com> Hi, I found this great java-scriptat dynamicdrive.com... but it doesn't work when I use frames... Can anyone give some tips on how to solve the problem? Here you can find the script: http://www.dynamicdrive.com/dynamicindex2/crosstick.htm Thanks in advance!! Tom From rodney at aflyingstart.net Mon Apr 29 16:33:47 2002 From: rodney at aflyingstart.net (Rodney Myers) Date: Mon, 29 Apr 2002 22:33:47 +0100 Subject: [Javascript] Great scroller script... doesn't work in frames?? References: <20020429194526.41941.qmail@web13306.mail.yahoo.com> Message-ID: <3CCDBC3B.8FB752BD@aflyingstart.net> Tom The script pasted from the URL given worked for me in a frame in both IE6.0 and NN4.7 I have some doubts about a script tag in your version? Any comment?: > > > > > bgColor=&-{scrollerbgcolor}; background=&-{scrollerbackground}; > visibility=hide> > > > > visibility=hide> > > > > > > > ----------------------------------------------------------------------- > Do You Yahoo!? > Yahoo! Tax Center - online filing with TurboTax From andrew at d2k.com.au Tue Apr 30 23:14:56 2002 From: andrew at d2k.com.au (Andrew Dunn) Date: Wed, 1 May 2002 14:14:56 +1000 Subject: [Javascript] color of hyperlink Message-ID: <1D0255E75622D51185DB00D0B7E3FF44057D1F@chimaera.d2k.com.au> Hi, Is it possible to tell whether a hyperlink has been visited? I have a picture that I wish to change whether a hyperlink has been visited. Thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: