From costea.dan at ssi-schaefer.ro Tue Jul 1 09:39:59 2003 From: costea.dan at ssi-schaefer.ro (Dan Costea) Date: Tue, 1 Jul 2003 17:39:59 +0300 Subject: [Javascript] If a string contains many ' and ", how to deal with it injavascript? References: <2D1B4409AA3D70448EAE39C5731E89130D70F1@ntxboimbx01.micron.com> Message-ID: <02d301c33fde$aab31ae0$13051bac@pclsony1> str = "the string can have ' and \" too."; alert (str); If you need more, please be more specific. Regards, Dan. ----- Original Message ----- From: To: Sent: Tuesday, July 01, 2003 6:34 PM Subject: [Javascript] If a string contains many ' and ", how to deal with it injavascript? > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript From thierry at 8p-design.com Tue Jul 1 09:46:31 2003 From: thierry at 8p-design.com (Thierry Lavall=?ISO-8859-1?B?6Q==?=e) Date: Tue, 01 Jul 2003 10:46:31 -0400 Subject: [Javascript] Re-assign URL of swapped image In-Reply-To: Message-ID: Thank you both, :) Here is the result: http://www.8p-design.com/Bummis/New/en/Products/covers/CottonWhisperPant2.ht ml It works on Mac IE, but not on IE PC, where clicking the swapped image returns a DNS problem. Any idea? Thanks! -- Thierry PS: I've removed the 'crapy' Golive JS. Never liked them and prefer to hack my way through to at least understand something. From LMuchacho at twii.net Tue Jul 1 09:55:58 2003 From: LMuchacho at twii.net (Muchacho, Laurent (TWIi London)) Date: Tue, 1 Jul 2003 15:55:58 +0100 Subject: [Javascript] Re-assign URL of swapped image Message-ID: Hi Thierry There is an examples I wrote a while ago for someone in the list http://www.elmuchacho.com/examples/slidde_show/default.asp Ca va peut etre t'aider Laurent -----Original Message----- From: Thierry Lavall?e [mailto:thierry at 8p-design.com] Sent: 01 July 2003 15:47 To: javascript at LaTech.edu Subject: Re: [Javascript] Re-assign URL of swapped image Thank you both, :) Here is the result: http://www.8p-design.com/Bummis/New/en/Products/covers/CottonWhisperPant2.ht ml It works on Mac IE, but not on IE PC, where clicking the swapped image returns a DNS problem. Any idea? Thanks! -- Thierry PS: I've removed the 'crapy' Golive JS. Never liked them and prefer to hack my way through to at least understand something. _______________________________________________ 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 costea.dan at ssi-schaefer.ro Tue Jul 1 10:04:04 2003 From: costea.dan at ssi-schaefer.ro (Dan Costea) Date: Tue, 1 Jul 2003 18:04:04 +0300 Subject: [Javascript] If a string contains many ' and ", how to dealwithit injavascript? References: <2D1B4409AA3D70448EAE39C5731E89130D70F2@ntxboimbx01.micron.com> Message-ID: <02e301c33fe2$071ebe80$13051bac@pclsony1> HELLO?? I told you to be more specific. Your code is WRON! will give you an editbox with "str" written in it! Tell us what you want and you might be helped! if you want to populate an editbox, try this:
If you want something else, BE SPECIFIC. ----- Original Message ----- From: To: Sent: Tuesday, July 01, 2003 6:49 PM Subject: RE: [Javascript] If a string contains many ' and ", how to dealwithit injavascript? > I tried it, seems it can not work quite well in javascript. > for example: > > str = "this is a 'test' and \"double quote\""; > > will just show > this is a 'test' and \ > > Any good idea? > Thanks, > Alex. > > > -----Original Message----- > From: Dan Costea [mailto:costea.dan at ssi-schaefer.ro] > Sent: Tuesday, July 01, 2003 8:40 AM > To: [JavaScript List] > Subject: Re: [Javascript] If a string contains many ' and ", how to deal > withit injavascript? > > > str = "the string can have ' and \" too."; > alert (str); > > If you need more, please be more specific. > > Regards, > Dan. > > > ----- Original Message ----- > From: > To: > Sent: Tuesday, July 01, 2003 6:34 PM > Subject: [Javascript] If a string contains many ' and ", how to deal with it > injavascript? > > > > > > _______________________________________________ > > Javascript mailing list > > Javascript at LaTech.edu > > https://lists.LaTech.edu/mailman/listinfo/javascript > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript From alwang at micron.com Tue Jul 1 10:34:40 2003 From: alwang at micron.com (alwang at micron.com) Date: Tue, 1 Jul 2003 09:34:40 -0600 Subject: [Javascript] If a string contains many ' and ", how to deal with it in javascript? Message-ID: <2D1B4409AA3D70448EAE39C5731E89130D70F1@ntxboimbx01.micron.com> From alwang at micron.com Tue Jul 1 10:49:39 2003 From: alwang at micron.com (alwang at micron.com) Date: Tue, 1 Jul 2003 09:49:39 -0600 Subject: [Javascript] If a string contains many ' and ", how to deal withit injavascript? Message-ID: <2D1B4409AA3D70448EAE39C5731E89130D70F2@ntxboimbx01.micron.com> I tried it, seems it can not work quite well in javascript. for example: str = "this is a 'test' and \"double quote\""; will just show this is a 'test' and \ Any good idea? Thanks, Alex. -----Original Message----- From: Dan Costea [mailto:costea.dan at ssi-schaefer.ro] Sent: Tuesday, July 01, 2003 8:40 AM To: [JavaScript List] Subject: Re: [Javascript] If a string contains many ' and ", how to deal withit injavascript? str = "the string can have ' and \" too."; alert (str); If you need more, please be more specific. Regards, Dan. ----- Original Message ----- From: To: Sent: Tuesday, July 01, 2003 6:34 PM Subject: [Javascript] If a string contains many ' and ", how to deal with it injavascript? > > _______________________________________________ > 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 trojani2000 at hotmail.com Tue Jul 1 12:40:28 2003 From: trojani2000 at hotmail.com (BEKIM BACAJ) Date: Tue, 01 Jul 2003 19:40:28 +0200 Subject: [Javascript] If a string contains many ' and ", how to dealwithit injavascript? Message-ID: You are kidding, wright?! This: will show you nothing but "str" This string : str = "this is a 'test' and \"double quote\""; -is correct! This is how you will show it in your input: str = "this is a 'test' and \"double quote\""; myString.value=str And this is how it will read: this is a 'test' and "double quote" Cheers! >From: alwang at micron.com >Reply-To: "[JavaScript List]" >To: >Subject: RE: [Javascript] If a string contains many ' and ", how to >dealwithit injavascript? >Date: Tue, 1 Jul 2003 09:49:39 -0600 > >I tried it, seems it can not work quite well in javascript. >for example: > >str = "this is a 'test' and \"double quote\""; > >will just show >this is a 'test' and \ > >Any good idea? >Thanks, >Alex. _________________________________________________________________ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus From dlovering at gazos.com Tue Jul 1 12:52:27 2003 From: dlovering at gazos.com (David Lovering) Date: Tue, 1 Jul 2003 11:52:27 -0600 Subject: [Javascript] JavaScript/PHP/HTML parsing engines Message-ID: <001e01c33ff9$8947b350$0600000a@arcana> A lot of the "bugs" and confusion I've seen in the last few weeks/months could have (in theory) been ameliorated somewhat by a good code-checking routine -- either as an on-line service, or as a downloadable utility. I for example use a hodge-podge of JavaScript, PHP, and HTML code which would probably send most simple code-checkers screaming out the door. IE and Netscape/Mozilla are kind enough to let you know when your code is completely whacked, but their notion of line-numbers and originating module names are pretty hilarious -- plus they don't do concordences, and they always crash at the first fatal error -- rather tedious when you have 1,417 of them. Has anyone seen and/or found something that would help us feebs get a grip on our code before harassing the bulletin board with our diverse lack of insight? -- Dave Lovering -------------- next part -------------- An HTML attachment was scrubbed... URL: From CGardner at JohnBurnham.com Tue Jul 1 13:03:24 2003 From: CGardner at JohnBurnham.com (Craig Gardner) Date: Tue, 1 Jul 2003 11:03:24 -0700 Subject: [Javascript] JavaScript/PHP/HTML parsing engines Message-ID: <67B06D59C5D2614B8DFF46A8AF4D6E46E43FEA@Exchange> how about good old debugging messages? put alerts, echos, or just words every once in a while in your code so that you can track where it breaks... -----Original Message----- From: David Lovering [mailto:dlovering at gazos.com] Sent: Tuesday, July 01, 2003 10:52 AM To: javascript at LaTech.edu Subject: [Javascript] JavaScript/PHP/HTML parsing engines A lot of the "bugs" and confusion I've seen in the last few weeks/months could have (in theory) been ameliorated somewhat by a good code-checking routine -- either as an on-line service, or as a downloadable utility. I for example use a hodge-podge of JavaScript, PHP, and HTML code which would probably send most simple code-checkers screaming out the door. IE and Netscape/Mozilla are kind enough to let you know when your code is completely whacked, but their notion of line-numbers and originating module names are pretty hilarious -- plus they don't do concordences, and they always crash at the first fatal error -- rather tedious when you have 1,417 of them. Has anyone seen and/or found something that would help us feebs get a grip on our code before harassing the bulletin board with our diverse lack of insight? -- Dave Lovering -------------- next part -------------- An HTML attachment was scrubbed... URL: From dlovering at gazos.com Tue Jul 1 13:10:28 2003 From: dlovering at gazos.com (David Lovering) Date: Tue, 1 Jul 2003 12:10:28 -0600 Subject: [Javascript] JavaScript/PHP/HTML parsing engines References: <67B06D59C5D2614B8DFF46A8AF4D6E46E43FEA@Exchange> Message-ID: <003f01c33ffc$0dc9bfe0$0600000a@arcana> MessageThat's the method I have been using -- and even then it requires a great deal of insight to know just where to insert the echo, alert, whatever -- and the parameter(s) to track. No, I'm looking for something like the production 'C/C++' code debug utilities, which do variable-tracking, single-stepping, "real" line number flagging, concordences, variable modification path analysis, etc. etc. People are basing their business structures on the quality of our code -- it makes sense that we elevate our quality control beyond the mom-and-pop screendoor and JavaScript-coding methods of yore. Some packages (like PHPEd) apparently do fairly good work on the PHP side, but ignore the nuances of JavaScript, HTML, etc. I don't want much, I just want everything! -- Dave Lovering ----- Original Message ----- From: Craig Gardner To: [JavaScript List] Sent: Tuesday, July 01, 2003 12:03 PM Subject: RE: [Javascript] JavaScript/PHP/HTML parsing engines how about good old debugging messages? put alerts, echos, or just words every once in a while in your code so that you can track where it breaks... -----Original Message----- From: David Lovering [mailto:dlovering at gazos.com] Sent: Tuesday, July 01, 2003 10:52 AM To: javascript at LaTech.edu Subject: [Javascript] JavaScript/PHP/HTML parsing engines A lot of the "bugs" and confusion I've seen in the last few weeks/months could have (in theory) been ameliorated somewhat by a good code-checking routine -- either as an on-line service, or as a downloadable utility. I for example use a hodge-podge of JavaScript, PHP, and HTML code which would probably send most simple code-checkers screaming out the door. IE and Netscape/Mozilla are kind enough to let you know when your code is completely whacked, but their notion of line-numbers and originating module names are pretty hilarious -- plus they don't do concordences, and they always crash at the first fatal error -- rather tedious when you have 1,417 of them. Has anyone seen and/or found something that would help us feebs get a grip on our code before harassing the bulletin board with our diverse lack of insight? -- Dave Lovering ------------------------------------------------------------------------------ _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript -------------- next part -------------- An HTML attachment was scrubbed... URL: From hassan at webtuitive.com Tue Jul 1 13:26:42 2003 From: hassan at webtuitive.com (Hassan Schroeder) Date: Tue, 01 Jul 2003 11:26:42 -0700 Subject: [Javascript] JavaScript/PHP/HTML parsing engines In-Reply-To: <003f01c33ffc$0dc9bfe0$0600000a@arcana> References: <67B06D59C5D2614B8DFF46A8AF4D6E46E43FEA@Exchange> <003f01c33ffc$0dc9bfe0$0600000a@arcana> Message-ID: <3F01D262.2030002@webtuitive.com> David Lovering wrote: > No, I'm looking for something like > the production 'C/C++' code debug utilities, which do variable-tracking, > single-stepping, "real" line number flagging, concordences, variable > modification path analysis, etc. etc. Perhaps not everything you want, but have you used venkman (Mozilla's JavaScript debugger)? -- Hassan Schroeder ----------------------------- hassan at webtuitive.com Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. From thierry at 8p-design.com Tue Jul 1 13:38:18 2003 From: thierry at 8p-design.com (Thierry Lavall=?ISO-8859-1?B?6Q==?=e) Date: Tue, 01 Jul 2003 14:38:18 -0400 Subject: [Javascript] Re-assign URL of swapped image In-Reply-To: Message-ID: I was calling the javascript as blank. Messed it up. Thanks all! it now works as expected. :) -- Thierry From Michael_Dougherty at pbp.com Wed Jul 2 08:12:18 2003 From: Michael_Dougherty at pbp.com (Mike Dougherty) Date: Wed, 2 Jul 2003 09:12:18 -0400 Subject: [Javascript] JavaScript/PHP/HTML parsing engines In-Reply-To: <001e01c33ff9$8947b350$0600000a@arcana> Message-ID: <00b801c3409b$93d452e0$1702010a@IT23> I hope you are writing modular code and testing each piece before you have 1,417 errors to debug at one time... -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of David Lovering Sent: Tuesday, July 01, 2003 12:52 PM To: javascript at LaTech.edu Subject: [Javascript] JavaScript/PHP/HTML parsing engines A lot of the "bugs" and confusion I've seen in the last few weeks/months could have (in theory) been ameliorated somewhat by a good code-checking routine -- either as an on-line service, or as a downloadable utility. I for example use a hodge-podge of JavaScript, PHP, and HTML code which would probably send most simple code-checkers screaming out the door. IE and Netscape/Mozilla are kind enough to let you know when your code is completely whacked, but their notion of line-numbers and originating module names are pretty hilarious -- plus they don't do concordences, and they always crash at the first fatal error -- rather tedious when you have 1,417 of them. Has anyone seen and/or found something that would help us feebs get a grip on our code before harassing the bulletin board with our diverse lack of insight? -- Dave Lovering -------------- next part -------------- An HTML attachment was scrubbed... URL: From thierry at 8p-design.com Wed Jul 2 10:34:31 2003 From: thierry at 8p-design.com (Thierry Lavall=?ISO-8859-1?B?6Q==?=e) Date: Wed, 02 Jul 2003 11:34:31 -0400 Subject: [Javascript] Re-assign URL of swapped image In-Reply-To: Message-ID: Hi all I still have a question concerning this. I would like to do this in a more simple way and drop the URL part. This is current code: if(document['Cover'].src == "http://www.8p-design.com/bummis/images/product/Covers/BummiCotton_Cows_M.jp g") { winURL = "http://www.8p-design.com/Bummis/images/product/Covers/BummiCotton_Cows_L.jp g"; I would like it just verify the name of the image rather than whole path. As in something like: if(document['Cover'].src CONTAINS "BummiCotton_Cows_M.jpg") Is this possible? What should I replace CONTAINS to? Thanks! -- Thierry From rodney at aflyingstart.net Wed Jul 2 11:09:54 2003 From: rodney at aflyingstart.net (Rodney Myers) Date: Wed, 02 Jul 2003 17:09:54 +0100 Subject: [Javascript] Re-assign URL of swapped image References: Message-ID: <3F0303D2.8070100@aflyingstart.net> if(stringA.indexOf(stringB)>-1) THEN stringA CONTAINS stringB hth Rodney Thierry Lavall?e wrote: >Hi all >I still have a question concerning this. >I would like to do this in a more simple way and drop the URL part. > >This is current code: > if(document['Cover'].src == >"http://www.8p-design.com/bummis/images/product/Covers/BummiCotton_Cows_M.jp >g") { > winURL = >"http://www.8p-design.com/Bummis/images/product/Covers/BummiCotton_Cows_L.jp >g"; > >I would like it just verify the name of the image rather than whole path. >As in something like: >if(document['Cover'].src CONTAINS "BummiCotton_Cows_M.jpg") > >Is this possible? >What should I replace CONTAINS to? > >Thanks! > > -- PS. If you have to answer routine email queries from your sites or mailings then you will find the simple-to-use BizAutomator invaluable. http://www.BizAutomator.co.uk From rer at datacompusa.com Wed Jul 2 13:30:20 2003 From: rer at datacompusa.com (Roger Roelofs) Date: Wed, 2 Jul 2003 14:30:20 -0400 Subject: [Javascript] Re-assign URL of swapped image In-Reply-To: Message-ID: <3C3D4137-ACBB-11D7-B077-00306572FCC8@datacompusa.com> Thierry, Another alternative (assuming your image naming convention is consistant, you could just write winURL = document.images['Cover'].src.replace(/_M\.jpg/, "_L.jpg"); On Wednesday, July 2, 2003, at 11:34 AM, Thierry Lavall?e wrote: > Hi all > I still have a question concerning this. > I would like to do this in a more simple way and drop the URL part. From rodney at aflyingstart.net Wed Jul 2 13:59:25 2003 From: rodney at aflyingstart.net (Rodney Myers) Date: Wed, 02 Jul 2003 19:59:25 +0100 Subject: [Javascript] Writing Files to local disk Message-ID: <3F032B8D.2090301@aflyingstart.net> I am editing (OK beginning to edit) files using innerText and/or innerHtml This is being done offline. Imagine frameset with form at top and document below. Click a button and form data goes into document. Can I then, using FileSystemObject grab the whole of that file as it now appears and write it to disk? Help please.... TIA Rodney -- PS. If you have to answer routine email queries from your sites or mailings then you will find the simple-to-use BizAutomator invaluable. http://www.BizAutomator.co.uk From thierry at 8p-design.com Wed Jul 2 13:59:46 2003 From: thierry at 8p-design.com (Thierry Lavall=?ISO-8859-1?B?6Q==?=e) Date: Wed, 02 Jul 2003 14:59:46 -0400 Subject: [Javascript] Re-assign URL of swapped image In-Reply-To: <3C3D4137-ACBB-11D7-B077-00306572FCC8@datacompusa.com> Message-ID: Roger Roelofs, 7/2/03 14:30 : > winURL = document.images['Cover'].src.replace(/_M\.jpg/, "_L.jpg"); They are consistent. And I was just finishing testing when you proposed it. Works perfectly. T'was a lot of google.com search but I finally got it as I wanted it. http://www.8p-design.com/Bummis/New/en/Products/covers/CottonWhisperPant.htm l Very clean now. Thanks all! :) -- Thierry From peter at brunone.com Wed Jul 2 15:19:50 2003 From: peter at brunone.com (Peter Brunone) Date: Wed, 2 Jul 2003 13:19:50 -0700 Subject: [Javascript] Writing Files to local disk Message-ID: <200307021319.AA694485096@brunone.com> Rodney, If the page you're writing resides on the user's machine, then you should be able to use Mappath(relative path/filename) to refer to the file you want to save... but if you want a file to show changes, you'll have to save it somehow first. Have you considered using the FileSystemObject to open the file and make the changes there? Cheers, Peter ---------- Original Message ---------------------------------- From: Rodney Myers Reply-To: "[JavaScript List]" Date: Wed, 02 Jul 2003 19:59:25 +0100 >I am editing (OK beginning to edit) files using innerText and/or innerHtml >This is being done offline. > >Imagine frameset with form at top and document below. >Click a button and form data goes into document. > >Can I then, using FileSystemObject grab the whole of that file as it now >appears and write it to disk? > >Help please.... > >TIA > >Rodney > >-- >PS. If you have to answer routine email queries >from your sites or mailings then you will find >the simple-to-use BizAutomator invaluable. >http://www.BizAutomator.co.uk From rodney at aflyingstart.net Wed Jul 2 16:44:59 2003 From: rodney at aflyingstart.net (Rodney Myers) Date: Wed, 02 Jul 2003 22:44:59 +0100 Subject: [Javascript] Writing Files to local disk References: <200307021319.AA694485096@brunone.com> Message-ID: <3F03525B.9060008@aflyingstart.net> Thanks for the reply Peter. > Have you considered using the FileSystemObject Yes, I could do that. > you should be able to use Mappath(relative path/filename) I am the user btw. and want to run this in file mode. So Mappath will not be required. Guess FileSystemObject is going to be the way. Pity, but workable. Rodney From andy78 at centrin.net.id Thu Jul 3 07:24:57 2003 From: andy78 at centrin.net.id (andy susanto) Date: Thu, 3 Jul 2003 19:24:57 +0700 Subject: [Javascript] page setup References: <20030702170004.4CE733093BA@LaTech.edu> Message-ID: <003501c3415e$1f42ab20$83ff92ca@user> hai, Can i change set header, footer and margin with a script ?, if it is possible can you give an example ? TIA, andy From andy78 at centrin.net.id Thu Jul 3 08:29:41 2003 From: andy78 at centrin.net.id (andy susanto) Date: Thu, 3 Jul 2003 20:29:41 +0700 Subject: [Javascript] how to create input tag on the fly References: <20030702170004.4CE733093BA@LaTech.edu> Message-ID: <001701c34167$4ac0eba0$a4ee92ca@user> hai, i am try to create on the fly input tag, but the input tag always create on a new page. What i want is that input tag on the same page how can i make that possible ? this my script :
From rodney at aflyingstart.net Thu Jul 3 08:59:26 2003 From: rodney at aflyingstart.net (Rodney Myers) Date: Thu, 03 Jul 2003 14:59:26 +0100 Subject: [Javascript] Writing Files to local disk References: <200307021319.AA694485096@brunone.com> <3F03525B.9060008@aflyingstart.net> Message-ID: <3F0436BE.5040607@aflyingstart.net> With inputs and trigger for output in an upper frame and the modified file in a lower frame named out I have a way now to get at the altered output file: 1. Put ID into the starting HTML tag of the file in the "out" frame. Any ID would do, I guess. 2. Alter document using IDs of various table cells e.g. function myFunction(form){ parent.out.document.all.someID.innerText=form.someElement.value; } 3. Get whole document's HTML as string with var fStr=parent.out.document.all.whole.outerHTML; // parent because the trigger is in another frame // out is the name of the output frame 4. Then use FileSystemObject to write fStr to a new file. R Rodney Myers wrote: > Thanks for the reply Peter. > > > Have you considered using the FileSystemObject > > Yes, I could do that. > > > you should be able to use Mappath(relative path/filename) > > I am the user btw. and want to run this in file mode. So Mappath will > not be required. > Guess FileSystemObject is going to be the way. Pity, but workable. > > Rodney > > PS. If you have to answer routine email queries from your sites or mailings then you will find the simple-to-use BizAutomator invaluable. http://www.BizAutomator.co.uk From dlovering at gazos.com Thu Jul 3 10:43:12 2003 From: dlovering at gazos.com (David T. Lovering) Date: Thu, 03 Jul 2003 08:43:12 -0700 Subject: [Javascript] how to create input tag on the fly References: <20030702170004.4CE733093BA@LaTech.edu> <001701c34167$4ac0eba0$a4ee92ca@user> Message-ID: <3F044F08.310B4632@gazos.com> The basic method looks OK, but I think what is biting you is the single-quote placement. Try this instead: document.write(""); objd++; Also (although this is a minor point), most subsidiary object groupings start with "0" as their base index. No reason you should follow this convention, but it is worth thinking about. The other thing you should think about is the precedence of when this new input gets created, and where it gets put on the page. Normally, the get spun while the first run through the body declaration is taking place. Yes, you can add inputs later -- but usually this is done through the "createElement("INPUT")" declaration, where you are spawning it as a child of an object already on-screen as it were. I usually use a table to frame these created objects, and create new rows as well whenever I spin off another new input. I'd try a couple of little short test routines to get familiar with the creation/destruction of new objects using the createElement call -- I think it is your best bet. -- Dave Lovering andy susanto wrote: > > hai, > > i am try to create on the fly input tag, but the input tag always create on > a new page. > > What i want is that input tag on the same page how can i make that possible > ? > > this my script : > >
> > > >
> > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript From kslowers at tampabay.rr.com Sat Jul 5 20:49:52 2003 From: kslowers at tampabay.rr.com (KSLowers) Date: Sat, 5 Jul 2003 21:49:52 -0400 Subject: [Javascript] Validating form elements on an Edit form Message-ID: Hello I trying to learn how to re-validate modified data within an Edit form. Everything works well, as far as the 'asked for' data appearing as it should. But when I modify the data, then resubmit it nothing happens. I'm not sure what I'm missing and/or understanding. I have a sample of the code below, and a copy of the file if you want to see how far I've got. Can someone show me what to do? Kinda burn-out on this one. Thanks in advance for your help. Kevin ==============

PCR NO./PL  >

WEEKDAY  > 

HOURS WORKED   >

-------------- next part -------------- A non-text attachment was scrubbed... Name: htlEdit.asp Type: text/asp Size: 7761 bytes Desc: not available URL: From podakula at hotmail.com Mon Jul 7 14:51:03 2003 From: podakula at hotmail.com (podakula nagaraju) Date: Mon, 07 Jul 2003 19:51:03 +0000 Subject: [Javascript] Validating form elements on an Edit form Message-ID: try adding a "return true" statement at the end of the function. I believe your form is never submitted without this statement. >From: "KSLowers" >Reply-To: "[JavaScript List]" >To: >Subject: [Javascript] Validating form elements on an Edit form >Date: Sat, 5 Jul 2003 21:49:52 -0400 > >Hello > >I trying to learn how to re-validate modified data within an Edit form. >Everything works well, as far as the 'asked for' data appearing as it >should. But when I modify the data, then resubmit it nothing happens. I'm >not sure what I'm missing and/or understanding. I have a sample of the >code >below, and a copy of the file if you want to see how far I've got. Can >someone show me what to do? Kinda burn-out on this one. Thanks in advance >for your help. > > Kevin > >============== > > > > action="http://localhost/Webpages/HoursTrackingLog/HtlEditSe.asp?id=<%=iReco >rdId%>" onSubmit="return Form_Validator(this)" id=form name="myform"> > >

PCR NO./PL  > size=12 name=PcrNo value=<%=rs("Pcr")%>>

> >

WEEKDAY  > >OnClick=ShowDate()>  > width=26 Title="Quick Calendar"> > >

HOURS WORKED   > > value=<%=nHrs%>>

> ><< htlEdit.asp >> >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ Race along with NK. The fastest Indian http://server1.msn.co.in/sp03/tataracing/index.asp Feel the thrill! From kslowers at tampabay.rr.com Mon Jul 7 16:08:01 2003 From: kslowers at tampabay.rr.com (KSLowers) Date: Mon, 7 Jul 2003 17:08:01 -0400 Subject: [Javascript] Validating form elements on an Edit form In-Reply-To: Message-ID: Thanks that worked great! Kev -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu]On Behalf Of podakula nagaraju Sent: Monday, July 07, 2003 3:51 PM To: javascript at LaTech.edu Subject: Re: [Javascript] Validating form elements on an Edit form try adding a "return true" statement at the end of the function. I believe your form is never submitted without this statement. >From: "KSLowers" >Reply-To: "[JavaScript List]" >To: >Subject: [Javascript] Validating form elements on an Edit form >Date: Sat, 5 Jul 2003 21:49:52 -0400 > >Hello > >I trying to learn how to re-validate modified data within an Edit form. >Everything works well, as far as the 'asked for' data appearing as it >should. But when I modify the data, then resubmit it nothing happens. I'm >not sure what I'm missing and/or understanding. I have a sample of the >code >below, and a copy of the file if you want to see how far I've got. Can >someone show me what to do? Kinda burn-out on this one. Thanks in advance >for your help. > > Kevin > >============== > > > > action="http://localhost/Webpages/HoursTrackingLog/HtlEditSe.asp?id=<%=iRec o >rdId%>" onSubmit="return Form_Validator(this)" id=form name="myform"> > >

PCR NO./PL  > size=12 name=PcrNo value=<%=rs("Pcr")%>>

> >

WEEKDAY  > >OnClick=ShowDate()>  > width=26 Title="Quick Calendar"> > >

HOURS WORKED   > > value=<%=nHrs%>>

> ><< htlEdit.asp >> >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ Race along with NK. The fastest Indian http://server1.msn.co.in/sp03/tataracing/index.asp Feel the thrill! _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From andre.duszynski at adelaide.edu.au Tue Jul 8 03:06:27 2003 From: andre.duszynski at adelaide.edu.au (Andre Duszynski) Date: Tue, 08 Jul 2003 17:36:27 +0930 Subject: [Javascript] Dropdown to implement different functions problem Message-ID: <3F0A7B83.FE732164@adelaide.edu.au> Hello all, i'm very much a newbie with regards to JS - please bear with me !! What i'm trying to achieve with the below code, is that if a user selects the gender from the drop down list, and then fills in the values for "age" and "height", the resulting click on the "Compute" button will run either calc_male or calc_female to calculate the values of FEV and FVC which are then updated on the form fields. I am sure that the parent>child inheritance thang is the problem but am unsure of how to go about it. Thankyou, Andre Duszynski. ---------- Asthma Calculator
age in years:
height in metres:
FEV1(L):
FVC(L):
From LMuchacho at twii.net Tue Jul 8 04:43:04 2003 From: LMuchacho at twii.net (Muchacho, Laurent (TWIi London)) Date: Tue, 8 Jul 2003 10:43:04 +0100 Subject: [Javascript] Dropdown to implement different functions proble m Message-ID: Hi Andre First question when I see your code is: Where do you define the value of n in the function process(t)? function process(t) { if(n==0) alert("no choice made"); if(n==1) calc_male(t); if(n==2) calc_female(t); } Sort this out and you will be saved I think Laurent -----Original Message----- From: Andre Duszynski [mailto:andre.duszynski at adelaide.edu.au] Sent: 08 July 2003 09:06 To: javascript at LaTech.edu Subject: [Javascript] Dropdown to implement different functions problem Hello all, i'm very much a newbie with regards to JS - please bear with me !! What i'm trying to achieve with the below code, is that if a user selects the gender from the drop down list, and then fills in the values for "age" and "height", the resulting click on the "Compute" button will run either calc_male or calc_female to calculate the values of FEV and FVC which are then updated on the form fields. I am sure that the parent>child inheritance thang is the problem but am unsure of how to go about it. Thankyou, Andre Duszynski. ---------- Asthma Calculator
age in years:
height in metres:
FEV1(L):
FVC(L):
_______________________________________________ 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 geoff at cpe1.com Tue Jul 8 07:38:57 2003 From: geoff at cpe1.com (Geoff Corriere) Date: Tue, 8 Jul 2003 07:38:57 -0500 Subject: [Javascript] Dropdown to implement different functions problem In-Reply-To: <3F0A7B83.FE732164@adelaide.edu.au> Message-ID: <24839F8E-B141-11D7-B063-003065CCB886@cpe1.com> Try changing the following line That might help the behavior of the form/script From christ at saeweb.com Tue Jul 8 08:28:58 2003 From: christ at saeweb.com (Chris Tifer) Date: Tue, 8 Jul 2003 09:28:58 -0400 Subject: [Javascript] If a string contains many ' and ", how to dealwithit injavascript? References: <2D1B4409AA3D70448EAE39C5731E89130D70F2@ntxboimbx01.micron.com> Message-ID: <096a01c34554$e38e2960$f10110ac@saweb.lcl> That example you're using below is not even JavaScript. ----- Original Message ----- From: To: Sent: Tuesday, July 01, 2003 11:49 AM Subject: RE: [Javascript] If a string contains many ' and ", how to dealwithit injavascript? I tried it, seems it can not work quite well in javascript. for example: str = "this is a 'test' and \"double quote\""; will just show this is a 'test' and \ Any good idea? Thanks, Alex. -----Original Message----- From: Dan Costea [mailto:costea.dan at ssi-schaefer.ro] Sent: Tuesday, July 01, 2003 8:40 AM To: [JavaScript List] Subject: Re: [Javascript] If a string contains many ' and ", how to deal withit injavascript? str = "the string can have ' and \" too."; alert (str); If you need more, please be more specific. Regards, Dan. ----- Original Message ----- From: To: Sent: Tuesday, July 01, 2003 6:34 PM Subject: [Javascript] If a string contains many ' and ", how to deal with it injavascript? > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From andyg at ihug.co.nz Tue Jul 8 18:04:44 2003 From: andyg at ihug.co.nz (Andrew Gibson) Date: Wed, 9 Jul 2003 11:04:44 +1200 Subject: [Javascript] If a string contains many ' and " and \" References: <2D1B4409AA3D70448EAE39C5731E89130D70F2@ntxboimbx01.micron.com> <096a01c34554$e38e2960$f10110ac@saweb.lcl> Message-ID: <008101c345a5$52ce5480$03e7adcb@k1n8i8> As an aside I was stuck with a similar problem, how to deal with the following string str="Try the "following" folder: d:\"this folder " I can replace " with \" for the normal " within the string but to save to d:\" I couldn't just add a \ to make it d:\\" it would only work when I made it d:\\\" Andrew Gibson From christ at saeweb.com Wed Jul 9 07:38:30 2003 From: christ at saeweb.com (Chris Tifer) Date: Wed, 9 Jul 2003 08:38:30 -0400 Subject: [Javascript] If a string contains many ' and " and \" References: <2D1B4409AA3D70448EAE39C5731E89130D70F2@ntxboimbx01.micron.com><096a01c34554$e38e2960$f10110ac@saweb.lcl> <008101c345a5$52ce5480$03e7adcb@k1n8i8> Message-ID: <00fa01c34617$00eb7950$f10110ac@saweb.lcl> Right - you couldn't just add a single \ becuase the first \ you add was for the "\" before the quote. You're really escaping 2 characters here. The \ and the " So look at it like: \\ and \" Which put together is: \\\" Chris Tifer ----- Original Message ----- From: "Andrew Gibson" To: "[JavaScript List]" Sent: Tuesday, July 08, 2003 7:04 PM Subject: Re: [Javascript] If a string contains many ' and " and \" > As an aside I was stuck with a similar problem, how to deal with the > following string > > str="Try the "following" folder: d:\"this folder " > > I can replace " with \" for the normal " within the string but to save to > d:\" I couldn't just add a \ to make it d:\\" it would only work when I > made it d:\\\" > > Andrew Gibson > > > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript From raprolena at yahoo.com Wed Jul 9 15:42:48 2003 From: raprolena at yahoo.com (raprolena joseph) Date: Wed, 9 Jul 2003 13:42:48 -0700 (PDT) Subject: [Javascript] Transfer Data from one HTML page to another HTML page In-Reply-To: <20030709170003.A8891308CDF@LaTech.edu> Message-ID: <20030709204249.59990.qmail@web42004.mail.yahoo.com> Hi How can we transfer data from one control (text box) in a html page to the another control in the next html page using JavaScript. Ralph javascript-request at LaTech.edu wrote: Send Javascript mailing list submissions to javascript at LaTech.edu To subscribe or unsubscribe via the World Wide Web, visit https://lists.LaTech.edu/mailman/listinfo/javascript or, via email, send a message with subject or body 'help' to javascript-request at LaTech.edu You can reach the person managing the list at javascript-owner at LaTech.edu When replying, please edit your Subject line so it is more specific than "Re: Contents of Javascript digest..." Today's Topics: 1. Re: If a string contains many ' and " and \" (Andrew Gibson) 2. Re: If a string contains many ' and " and \" (Chris Tifer) ---------------------------------------------------------------------- Message: 1 Date: Wed, 9 Jul 2003 11:04:44 +1200 From: "Andrew Gibson" Subject: Re: [Javascript] If a string contains many ' and " and \" To: "[JavaScript List]" Message-ID: <008101c345a5$52ce5480$03e7adcb at k1n8i8> Content-Type: text/plain; charset="iso-8859-1" As an aside I was stuck with a similar problem, how to deal with the following string str="Try the "following" folder: d:\"this folder " I can replace " with \" for the normal " within the string but to save to d:\" I couldn't just add a \ to make it d:\\" it would only work when I made it d:\\\" Andrew Gibson ------------------------------ Message: 2 Date: Wed, 9 Jul 2003 08:38:30 -0400 From: "Chris Tifer" Subject: Re: [Javascript] If a string contains many ' and " and \" To: "[JavaScript List]" Message-ID: <00fa01c34617$00eb7950$f10110ac at saweb.lcl> Content-Type: text/plain; charset="iso-8859-1" Right - you couldn't just add a single \ becuase the first \ you add was for the "\" before the quote. You're really escaping 2 characters here. The \ and the " So look at it like: \\ and \" Which put together is: \\\" Chris Tifer ----- Original Message ----- From: "Andrew Gibson" To: "[JavaScript List]" Sent: Tuesday, July 08, 2003 7:04 PM Subject: Re: [Javascript] If a string contains many ' and " and \" > As an aside I was stuck with a similar problem, how to deal with the > following string > > str="Try the "following" folder: d:\"this folder " > > I can replace " with \" for the normal " within the string but to save to > d:\" I couldn't just add a \ to make it d:\\" it would only work when I > made it d:\\\" > > Andrew Gibson > > > > _______________________________________________ > 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 End of Javascript Digest, Vol 5, Issue 7 **************************************** --------------------------------- Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. -------------- next part -------------- An HTML attachment was scrubbed... URL: From christ at saeweb.com Thu Jul 10 07:37:44 2003 From: christ at saeweb.com (Chris Tifer) Date: Thu, 10 Jul 2003 08:37:44 -0400 Subject: [Javascript] Transfer Data from one HTML page to another HTML page References: <20030709204249.59990.qmail@web42004.mail.yahoo.com> Message-ID: <00d201c346e0$0feb3fc0$f10110ac@saweb.lcl> First, use a form to submit the data to the next page, then you can read through the URL's search property (I believe that's the one you're looking for) to view the parameter. I wouldn't use JavaScript for this. Why is that a requirement? Chris Tifer http://emailajoke.com ----- Original Message ----- From: raprolena joseph To: javascript at LaTech.edu Sent: Wednesday, July 09, 2003 4:42 PM Subject: [Javascript] Transfer Data from one HTML page to another HTML page Hi How can we transfer data from one control (text box) in a html page to the another control in the next html page using JavaScript. Ralph javascript-request at LaTech.edu wrote: Send Javascript mailing list submissions to javascript at LaTech.edu To subscribe or unsubscribe via the World Wide Web, visit https://lists.LaTech.edu/mailman/listinfo/javascript or, via email, send a message with subject or body 'help' to javascript-request at LaTech.edu You can reach the person managing the list at javascript-owner at LaTech.edu When replying, please edit your Subject line so it is more specific than "Re: Contents of Javascript digest..." Today's Topics: 1. Re: If a string contains many ' and " and \" (Andrew Gibson) 2. Re: If a string contains many ' and " and \" (Chris Tifer) ---------------------------------------------------------------------- Message: 1 Date: Wed, 9 Jul 2003 11:04:44 +1200 From: "Andrew Gibson" Subject: Re: [Javascript] If a string contains many ' and " and \" To: "[JavaScript List]" Message-ID: <008101c345a5$52ce5480$03e7adcb at k1n8i8> Content-Type: text/plain; charset="iso-8859-1" As an aside I was stuck with a similar problem, how to deal with the following string str="Try the "following" folder: d:\"this folder " I can replace " with \" for the normal " within the string but to save to d:\" I couldn't just add a \ to make it d:\\" it would only work when I made it d:\\\" Andrew Gibson ------------------------------ Message: 2 Date: Wed, 9 Jul 2003 08:38:30 -0400 From: "Chris Tifer" Subject: Re: [Javascript] If a string contains many ' and " and \" To: "[JavaScript List]" Message-ID: <00fa01c34617$00eb7950$f10110ac at saweb.lcl> Content-Type: text/plain; charset="iso-8859-1" Right - you couldn't just add a single \ becuase the first \ you add was for the "\" before the quote. You're really escaping 2 characters here. The \ and the " So look at it like: \\ and \" Which put together is: \\\" Chris Tifer ----- Original Message ----- From: "Andrew Gibson" To: "[JavaScript List]" Sent: Tuesday, July 08, 2003 7:04 PM Subject: Re: [Javascript] If a string contains many ' and " and \" > As an aside I was stuck with a similar problem, how to deal with the > following string > > str="Try the "following" folder: d:\"this folder " > > I can replace " with \" for the normal " within the string but to save to > d:\" I couldn't just add a \ to make it d:\\" it would only work when I > made it d:\\\" > > Andrew Gibson > > > > _______________________________________________ > 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 End of Javascript Digest, Vol 5, Issue 7 **************************************** ------------------------------------------------------------------------------ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. ------------------------------------------------------------------------------ _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript -------------- next part -------------- An HTML attachment was scrubbed... URL: From alan.easton at unn.ac.uk Thu Jul 10 07:59:19 2003 From: alan.easton at unn.ac.uk (Alan Easton) Date: Thu, 10 Jul 2003 13:59:19 +0100 Subject: [Javascript] Transfer Data from one HTML page to another HTML page Message-ID: <61B1A61B4F4AD711B3450008C791F6FA96914F@clearwater.unn.ac.uk> Go here and you will find a good example http://javascript.internet.com/forms/passing-values.html I agree with Chris though, I wouldn't use javascript to pass values from page to page. It all depends if the information you are passing is sensitive or not, but I would a server side language and session variables or something similar. Alan... -----Original Message----- From: Chris Tifer [mailto:christ at saeweb.com] Sent: 10 July 2003 13:38 To: [JavaScript List] Subject: Re: [Javascript] Transfer Data from one HTML page to another HTML page First, use a form to submit the data to the next page, then you can read through the URL's search property (I believe that's the one you're looking for) to view the parameter. I wouldn't use JavaScript for this. Why is that a requirement? Chris Tifer http://emailajoke.com ----- Original Message ----- From: raprolena joseph To: javascript at LaTech.edu Sent: Wednesday, July 09, 2003 4:42 PM Subject: [Javascript] Transfer Data from one HTML page to another HTML page Hi How can we transfer data from one control (text box) in a html page to the another control in the next html page using JavaScript. Ralph javascript-request at LaTech.edu wrote: Send Javascript mailing list submissions to javascript at LaTech.edu To subscribe or unsubscribe via the World Wide Web, visit https://lists.LaTech.edu/mailman/listinfo/javascript or, via email, send a message with subject or body 'help' to javascript-request at LaTech.edu You can reach the person managing the list at javascript-owner at LaTech.edu When replying, please edit your Subject line so it is more specific than "Re: Contents of Javascript digest..." Today's Topics: 1. Re: If a string contains many ' and " and \" (Andrew Gibson) 2. Re: If a string contains many ' and " and \" (Chris Tifer) ---------------------------------------------------------------------- Message: 1 Date: Wed, 9 Jul 2003 11:04:44 +1200 From: "Andrew Gibson" Subject: Re: [Javascript] If a string contains many ' and " and \" To: "[JavaScript List]" Message-ID: <008101c345a5$52ce5480$03e7adcb at k1n8i8> Content-Type: text/plain; charset="iso-8859-1" As an aside I was stuck with a similar problem, how to deal with the following string str="Try the "following" folder: d:\"this folder " I can replace " with \" for the normal " within the string but to save to d:\" I couldn't just add a \ to make it d:\\" it would only work when I made it d:\\\" Andrew Gibson ------------------------------ Message: 2 Date: Wed, 9 Jul 2003 08:38:30 -0400 From: "Chris Tifer" Subject: Re: [Javascript] If a string contains many ' and " and \" To: "[JavaScript List]" Message-ID: <00fa01c34617$00eb7950$f10110ac at saweb.lcl> Content-Type: text/plain; charset="iso-8859-1" Right - you couldn't just add a single \ becuase the first \ you add was for the "\" before the quote. You're really escaping 2 characters here. The \ and the " So look at it like: \\ and \" Which put together is: \\\" Chris Tifer ----- Original Message ----- From: "Andrew Gibson" To: "[JavaScript List]" Sent: Tuesday, July 08, 2003 7:04 PM Subject: Re: [Javascript] If a string contains many ' and " and \" > As an aside I was stuck with a similar problem, how to deal with the > following string > > str="Try the "following" folder: d:\"this folder " > > I can replace " with \" for the normal " within the string but to save to > d:\" I couldn't just add a \ to make it d:\\" it would only work when I > made it d:\\\" > > Andrew Gibson > > > > _______________________________________________ > 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 End of Javascript Digest, Vol 5, Issue 7 **************************************** _____ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. _____ _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript -------------- next part -------------- An HTML attachment was scrubbed... URL: From rhiller at shianet.org Sat Jul 12 09:50:31 2003 From: rhiller at shianet.org (Bob and Sharon Hiller) Date: Sat, 12 Jul 2003 10:50:31 -0400 Subject: [Javascript] downloading javascript Message-ID: <007301c34884$f1b6d540$e747fea9@MAINSYSTEM> Hello, We have hundreds of html pages that are using the same external javascript. We get an error on some of the pages, object not found (from the external javascript). When the first page is sent the external javascript should be in the users cache. but somehow toward the end of the html pages the external javascript can not be found. Can anyone shed some light on this problem? Why is the javascript not in the users cache at this point. If the javascript is not found it seems like it would be getting the code from the webserver? could the html on the page be so small that the javascript does not have time to download from the server? Questions: 1. Why wouldn't the javascript still be in the user cache? 2. If the javascript is not found, why isn't the script found on the webserver? 3. Could the html be so small that the javascript does not have time to download? The javascript is 9kb. 4. How is a page loaded? ie starts with the html and as soon as external import is found, downloads the javascript? when the end html is found does all downloads stop? Thanks for your help! -------------- next part -------------- An HTML attachment was scrubbed... URL: From lgoffin at wonderweb.net Sun Jul 13 04:22:51 2003 From: lgoffin at wonderweb.net (Laurent Goffin) Date: Sun, 13 Jul 2003 11:22:51 +0200 Subject: [Javascript] downloading javascript References: <007301c34884$f1b6d540$e747fea9@MAINSYSTEM> Message-ID: <012401c34920$56fa4810$0202a8c0@emakina.com> >3. Could the html be so small that the javascript does not have time to download? The javascript is 9kb. >4. How is a page loaded? ie starts with the html and as soon as external import is found, downloads the javascript? when the end html is found does all downloads stop? Right, there are chances that ur javascript is not yet loaded when the HTML page call for the functions... I dont mean not yet downloaded but when the HTML page is loading, the browser interpret HTML and create a DOM out of this. In the mean time, he is downloading the JS external file and when the file is dlowloaded or present in the cache, the browser is interpreting all functions in order to make them available by the page. For instance, when the BODY of your page is calling on onload event a function in ur external JS, it's possible the JS is already downloaded but the function does not exist yet for the browser. It's the same too when a JS function try to call an HTML object while the page is not fully loaded yet (check onreadystate event for this) A solution to this : when u call the first function and this function does not exist yet, just call instead a function which is a timeout checking if the other function exist. When the function exist, just call it and stop timeout. Thsi require of course the timeout function to be outside of the JS file... Have a nice day L. Goffin -------------- next part -------------- An HTML attachment was scrubbed... URL: From slintz at ez4news.com Sun Jul 13 10:23:09 2003 From: slintz at ez4news.com (Stevel Lintz) Date: Sun, 13 Jul 2003 11:23:09 -0400 Subject: [Javascript] How to test existence of a window BUT NOT create it In-Reply-To: <012401c34920$56fa4810$0202a8c0@emakina.com> Message-ID: <004e01c34952$ab6429c0$6500a8c0@foobar05> Given the (string) name of a window, how can I test if it's open without also causing it to be created (if it's not previously extant)? The only way I know to obtain a reference to a window is by using window.open() - but this will always create the window if it doesn't currently exist, which is what I need to avoid. TIA! -Stevel -------------- next part -------------- An HTML attachment was scrubbed... URL: From dlovering at gazos.com Sun Jul 13 10:32:04 2003 From: dlovering at gazos.com (David T. Lovering) Date: Sun, 13 Jul 2003 08:32:04 -0700 Subject: [Javascript] peculiarity of onselectstart References: <2D1B4409AA3D70448EAE39C5731E89130D70F2@ntxboimbx01.micron.com><096a01c34554$e38e2960$f10110ac@saweb.lcl> <00fa01c34617$00eb7950$f10110ac@saweb.lcl> Message-ID: <3F117B5F.43F35C4C@gazos.com> I just noticed in passing a peculiarity of "onselectstart" which is somewhat annoying. What I want to be able to do is eliminate drag-selection of multiple fields, blank form background, etc. by an inadvertant swipe of the mouse while the select button is depressed, while at the same time still permitting drag-selection of the contents of single fields. Ostensibly this model should work: bogus


Sadly, the 'document.onselectstart' declaration appears to take precedence over all the fields, irrespective of whether they have localized onselectstart declarations of their own. Yes, I've tried using straight 'return true' declarations in lieu of 'enableSelect' function calls. Still no cigar. Anybody have any ideas? This one has me stumped. -- Dave Lovering From dlovering at gazos.com Sun Jul 13 12:30:27 2003 From: dlovering at gazos.com (David T. Lovering) Date: Sun, 13 Jul 2003 10:30:27 -0700 Subject: [JavaScript] peculiarity of onselectstart Message-ID: <3F11970C.9ED8A56B@gazos.com> I just noticed in passing a peculiarity of "onselectstart" which is somewhat annoying. What I want to be able to do is eliminate drag-selection of multiple fields, blank form background, etc. by an inadvertant swipe of the mouse while the select button is depressed, while at the same time still permitting drag-selection of the contents of single fields. Ostensibly this model should work: bogus


Sadly, the 'document.onselectstart' declaration appears to take precedence over all the fields, irrespective of whether they have localized onselectstart declarations of their own. Yes, I've tried using straight 'return true' declarations in lieu of 'enableSelect' function calls. Still no cigar. Anybody have any ideas? This one has me stumped. -- Dave Lovering From sachinz at dpsl.net Sun Jul 13 23:50:58 2003 From: sachinz at dpsl.net (Sachin Zingade) Date: Mon, 14 Jul 2003 10:20:58 +0530 Subject: [Javascript] getting the id of the parent tag References: <3F11970C.9ED8A56B@gazos.com> Message-ID: <036f01c349c3$843545c0$130510ac@enigma> Hi, I need to get the id of the parent tag when i select some text from that tag. Example:

This is test para This is test para This is test para This is test para

So when i select " test para " i should get "209202920290". Next requirement is

This testststst This is test para test para

So when i select " is test para" which is inside the italic tag , i should get "209202920290". If any one can reply it would be great Sachin Z From andyg at ihug.co.nz Sun Jul 13 23:55:50 2003 From: andyg at ihug.co.nz (Andrew Gibson) Date: Mon, 14 Jul 2003 16:55:50 +1200 Subject: [Javascript] getting the id of the parent tag References: <3F11970C.9ED8A56B@gazos.com> <036f01c349c3$843545c0$130510ac@enigma> Message-ID: <007e01c349c4$3331b860$42e8adcb@k1n8i8> Not sure of your question.... Are you selecting and then using a textrange? if so, try textrange.text >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Subject: [Javascript] getting the id of the parent tag Hi, I need to get the id of the parent tag when i select some text from that tag. Example:

This is test para This is test para This is test para This is test para

So when i select " test para " i should get "209202920290". Next requirement is

This testststst This is test para test para

So when i select " is test para" which is inside the italic tag , i should get "209202920290". If any one can reply it would be great Sachin Z _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From dlovering at gazos.com Mon Jul 14 00:40:36 2003 From: dlovering at gazos.com (David T. Lovering) Date: Sun, 13 Jul 2003 22:40:36 -0700 Subject: [Javascript] How to test existence of a window BUT NOT create it References: <004e01c34952$ab6429c0$6500a8c0@foobar05> Message-ID: <3F1241B0.ED8710E7@gazos.com> I may be completely off-base on this, but since a window is an ordinary DOM object, it might be possible to simply do an "if" check, thusly: if (!win) { // do whatever you'd do if the window wasn't there } else { // do whatever you'd do if it was } where "win" is the window ID you presume MIGHT be there. I've used this approach in several code modules, and so far nothing has blown up. [Might you, under JScript the rules for testing window existence are slightly different, so this approach may lack universality]. Also, I believe it is still possible to "walk-the-tree" of the object thread, thereby discovering which window objects are in place -- including ones behind the active pane or placed outside the viewable window space. -- Dave Lovering Stevel Lintz wrote: > > Part 1.1.1 Type: Plain Text (text/plain) > Encoding: quoted-printable > > Part 1.2 Type: Plain Text (text/plain) > Encoding: 7bit Given the (string) name of a window, how can I test if it's open without also causing it to be created (if it's not previously extant)? The only way I know to obtain a reference to a window is by using window.open() - but this will always create the window if it doesn't currently exist, which is what I need to avoid. TIA! -Stevel From antweb76 at yahoo.com Mon Jul 14 04:03:44 2003 From: antweb76 at yahoo.com (Webby) Date: Mon, 14 Jul 2003 02:03:44 -0700 (PDT) Subject: [Javascript] copyright of code Message-ID: <20030714090344.29077.qmail@web41301.mail.yahoo.com> Hi, Is code subject to copyright? If I find a script on a commercial web site (rather than a dedicated resource site) that is useful to me can I repurpose it for my own use? TIA Webby __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com From andyg at ihug.co.nz Mon Jul 14 04:12:24 2003 From: andyg at ihug.co.nz (Andrew Gibson) Date: Mon, 14 Jul 2003 21:12:24 +1200 Subject: [Javascript] copyright of code References: <20030714090344.29077.qmail@web41301.mail.yahoo.com> Message-ID: <00f301c349e8$0a84c6e0$42e8adcb@k1n8i8> I dont think the code itself would be copyright......but the purpose or use it is put to may well be..... >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Subject: [Javascript] copyright of code Hi, Is code subject to copyright? If I find a script on a commercial web site (rather than a dedicated resource site) that is useful to me can I repurpose it for my own use? TIA Webby From christ at saeweb.com Mon Jul 14 07:52:16 2003 From: christ at saeweb.com (Chris Tifer) Date: Mon, 14 Jul 2003 08:52:16 -0400 Subject: [JavaScript] peculiarity of onselectstart References: <3F11970C.9ED8A56B@gazos.com> Message-ID: <028a01c34a06$c16421d0$f10110ac@saweb.lcl> Have you tried cancelling the bubbling of the event? If an event fires on an element, it fires all the way up the chain. You need to stop that event when fired by the correct element. Chris Tifer http://emailajoke.com ----- Original Message ----- From: "David T. Lovering" To: Sent: Sunday, July 13, 2003 1:30 PM Subject: Re: [JavaScript] peculiarity of onselectstart > > I just noticed in passing a peculiarity of "onselectstart" which is somewhat annoying. > > What I want to be able to do is eliminate drag-selection of multiple fields, blank form background, etc. by an > inadvertant swipe of the mouse while the select button is depressed, while at the same time still permitting > drag-selection of the contents of single fields. Ostensibly this model should work: > > > > bogus > > > >
>
>
>
>
>
> > > > Sadly, the 'document.onselectstart' declaration appears to take precedence over all the fields, irrespective of whether they have localized onselectstart declarations of their own. Yes, I've tried using straight 'return true' declarations in lieu of > 'enableSelect' function calls. Still no cigar. > > Anybody have any ideas? This one has me stumped. > > -- Dave Lovering > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript From peter at brunone.com Mon Jul 14 09:32:21 2003 From: peter at brunone.com (Peter Brunone) Date: Mon, 14 Jul 2003 09:32:21 -0500 Subject: [Javascript] getting the id of the parent tag In-Reply-To: <036f01c349c3$843545c0$130510ac@enigma> Message-ID: <014601c34a14$bd0b6db0$0202a8c0@monkeyhouse> Sachin, In IE, I know you can object.parentElement.id property of most tags; this seems to be a standard, or at least close to it, so I'd be surprised if it didn't work in Netscape 6 and 7. Cheers, Peter -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of Sachin Zingade Hi, I need to get the id of the parent tag when i select some text from that tag. Example:

This is test para This is test para This is test para This is test para

So when i select " test para " i should get "209202920290". Next requirement is

This testststst This is test para test para

So when i select " is test para" which is inside the italic tag , i should get "209202920290". If any one can reply it would be great Sachin Z From peter at brunone.com Mon Jul 14 09:59:25 2003 From: peter at brunone.com (Peter Brunone) Date: Mon, 14 Jul 2003 09:59:25 -0500 Subject: [Javascript] getting the id of the parent tag Message-ID: <014a01c34a18$84d18520$0202a8c0@monkeyhouse> Oops. Upon reading your message again, I realized that climbing the DOM wasn't your main problem. Textrange should do it, as already suggested. -----Original Message----- From: Peter Brunone [mailto:peter at brunone.com] Sachin, In IE, I know you can object.parentElement.id property of most tags; this seems to be a standard, or at least close to it, so I'd be surprised if it didn't work in Netscape 6 and 7. Cheers, Peter -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of Sachin Zingade Hi, I need to get the id of the parent tag when i select some text from that tag. Example:

This is test para This is test para This is test para This is test para

So when i select " test para " i should get "209202920290". Next requirement is

This testststst This is test para test para

So when i select " is test para" which is inside the italic tag , i should get "209202920290". If any one can reply it would be great Sachin Z From dlovering at gazos.com Mon Jul 14 10:01:20 2003 From: dlovering at gazos.com (David T. Lovering) Date: Mon, 14 Jul 2003 08:01:20 -0700 Subject: [JavaScript] peculiarity of onselectstart References: <3F11970C.9ED8A56B@gazos.com> <028a01c34a06$c16421d0$f10110ac@saweb.lcl> Message-ID: <3F12C5BB.141A6772@gazos.com> Actually no, I hadn't -- I had presumed that this event handler was "global", and that the bubbling was implicit in the top-level document.onselectstart declaration at the beginning of the app window. Any notions as to the "correct" style/placement of these mid-stream event blocks that won't impair functionality above/below the object under consideration? -- Dave Lovering Chris Tifer wrote: > > Have you tried cancelling the bubbling of the event? If an event > fires on an element, it fires all the way up the chain. You need to > stop that event when fired by the correct element. > > Chris Tifer > http://emailajoke.com > > ----- Original Message ----- > From: "David T. Lovering" > To: > Sent: Sunday, July 13, 2003 1:30 PM > Subject: Re: [JavaScript] peculiarity of onselectstart > > > > > I just noticed in passing a peculiarity of "onselectstart" which is > somewhat annoying. > > > > What I want to be able to do is eliminate drag-selection of multiple > fields, blank form background, etc. by an > > inadvertant swipe of the mouse while the select button is depressed, while > at the same time still permitting > > drag-selection of the contents of single fields. Ostensibly this model > should work: > > > > > > > > bogus > > > > > > > >
> >
> > onselectstart='enableSelect'>
> > onselectstart='enableSelect'>
> >
> >
> > > > > > > > Sadly, the 'document.onselectstart' declaration appears to take precedence > over all the fields, irrespective of whether they have localized > onselectstart declarations of their own. Yes, I've tried using straight > 'return true' declarations in lieu of > > 'enableSelect' function calls. Still no cigar. > > > > Anybody have any ideas? This one has me stumped. > > > > -- Dave Lovering > > _______________________________________________ > > 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 andyg at ihug.co.nz Mon Jul 14 17:35:36 2003 From: andyg at ihug.co.nz (Andrew Gibson) Date: Tue, 15 Jul 2003 10:35:36 +1200 Subject: [Javascript] getting the id of the parent tag References: <014a01c34a18$84d18520$0202a8c0@monkeyhouse> Message-ID: <006601c34a58$3ffd53d0$5ae7adcb@k1n8i8> My trusty Danny Goodman DHTML book gives parentElement() property for the text range object. So, some thing like: var p=myRange.parentElement().id ? But, as far as I know, only a solution for IE 6 Andrew Gibson >>>>>>>>>> Subject: RE: [Javascript] getting the id of the parent tag Oops. Upon reading your message again, I realized that climbing the DOM wasn't your main problem. Textrange should do it, as already suggested. -----Original Message----- From: Peter Brunone [mailto:peter at brunone.com] Sachin, In IE, I know you can object.parentElement.id property of most tags; this seems to be a standard, or at least close to it, so I'd be surprised if it didn't work in Netscape 6 and 7. Cheers, Peter -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of Sachin Zingade Hi, I need to get the id of the parent tag when i select some text from that tag. Example:

This is test para This is test para This is test para This is test para

So when i select " test para " i should get "209202920290". Next requirement is

This testststst This is test para test para

So when i select " is test para" which is inside the italic tag , i should get "209202920290". If any one can reply it would be great Sachin Z From rhiller at shianet.org Mon Jul 14 20:17:24 2003 From: rhiller at shianet.org (Bob and Sharon Hiller) Date: Mon, 14 Jul 2003 21:17:24 -0400 Subject: [Javascript] Re: Javascript Digest, Vol 5, Issue 10 References: <20030713170009.7125730ADC8@LaTech.edu> Message-ID: <005201c34a6e$d9ad3110$e747fea9@MAINSYSTEM> could you give me an example? How would i check to see if the function exists without receiving an error? Maybe set a variable in the external javascript and check to see if the variable is null? ----- Original Message ----- From: To: Sent: Sunday, July 13, 2003 1:00 PM Subject: Javascript Digest, Vol 5, Issue 10 > Send Javascript mailing list submissions to > javascript at LaTech.edu > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.LaTech.edu/mailman/listinfo/javascript > or, via email, send a message with subject or body 'help' to > javascript-request at LaTech.edu > > You can reach the person managing the list at > javascript-owner at LaTech.edu > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Javascript digest..." > > > Today's Topics: > > 1. Re: downloading javascript (Laurent Goffin) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sun, 13 Jul 2003 11:22:51 +0200 > From: "Laurent Goffin" > Subject: Re: [Javascript] downloading javascript > To: "[JavaScript List]" > Message-ID: <012401c34920$56fa4810$0202a8c0 at emakina.com> > Content-Type: text/plain; charset="iso-8859-1" > > >3. Could the html be so small that the javascript does not have time to download? The javascript is 9kb. > >4. How is a page loaded? ie starts with the html and as soon as external import is found, downloads the javascript? when the end html is found does all downloads stop? > > Right, > > there are chances that ur javascript is not yet loaded when the HTML page call for the functions... > I dont mean not yet downloaded but when the HTML page is loading, the browser interpret HTML and create a DOM out of this. In the mean time, he is downloading the JS external file and when the file is dlowloaded or present in the cache, the browser is interpreting all functions in order to make them available by the page. > > For instance, when the BODY of your page is calling on onload event a function in ur external JS, it's possible the JS is already downloaded but the function does not exist yet for the browser. > > It's the same too when a JS function try to call an HTML object while the page is not fully loaded yet (check onreadystate event for this) > > A solution to this : when u call the first function and this function does not exist yet, just call instead a function which is a timeout checking if the other function exist. When the function exist, just call it and stop timeout. > > Thsi require of course the timeout function to be outside of the JS file... > > Have a nice day > > L. Goffin > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: http://lists.LaTech.edu/pipermail/javascript/attachments/20030713/3b2bb0b6/a ttachment-0001.html > > ------------------------------ > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > > > End of Javascript Digest, Vol 5, Issue 10 > ***************************************** > From christ at saeweb.com Tue Jul 15 07:41:51 2003 From: christ at saeweb.com (Chris Tifer) Date: Tue, 15 Jul 2003 08:41:51 -0400 Subject: [Javascript] Re: Javascript Digest, Vol 5, Issue 10 References: <20030713170009.7125730ADC8@LaTech.edu> <005201c34a6e$d9ad3110$e747fea9@MAINSYSTEM> Message-ID: <00b201c34ace$76fe1fb0$f10110ac@saweb.lcl> That's what I would do. Go off of a variable that should let you know whether you're ready to call a function or not. Chris Tifer http://emailajoke.com ----- Original Message ----- From: "Bob and Sharon Hiller" To: Sent: Monday, July 14, 2003 9:17 PM Subject: [Javascript] Re: Javascript Digest, Vol 5, Issue 10 > could you give me an example? > How would i check to see if the function exists without receiving an error? > Maybe set a variable in the external javascript and check to see if the > variable is null? > > ----- Original Message ----- > From: > To: > Sent: Sunday, July 13, 2003 1:00 PM > Subject: Javascript Digest, Vol 5, Issue 10 > > > > Send Javascript mailing list submissions to > > javascript at LaTech.edu > > > > To subscribe or unsubscribe via the World Wide Web, visit > > https://lists.LaTech.edu/mailman/listinfo/javascript > > or, via email, send a message with subject or body 'help' to > > javascript-request at LaTech.edu > > > > You can reach the person managing the list at > > javascript-owner at LaTech.edu > > > > When replying, please edit your Subject line so it is more specific > > than "Re: Contents of Javascript digest..." > > > > > > Today's Topics: > > > > 1. Re: downloading javascript (Laurent Goffin) > > > > > > ---------------------------------------------------------------------- > > > > Message: 1 > > Date: Sun, 13 Jul 2003 11:22:51 +0200 > > From: "Laurent Goffin" > > Subject: Re: [Javascript] downloading javascript > > To: "[JavaScript List]" > > Message-ID: <012401c34920$56fa4810$0202a8c0 at emakina.com> > > Content-Type: text/plain; charset="iso-8859-1" > > > > >3. Could the html be so small that the javascript does not have time to > download? The javascript is 9kb. > > >4. How is a page loaded? ie starts with the html and as soon as external > import is found, downloads the javascript? when the end html is found does > all downloads stop? > > > > Right, > > > > there are chances that ur javascript is not yet loaded when the HTML page > call for the functions... > > I dont mean not yet downloaded but when the HTML page is loading, the > browser interpret HTML and create a DOM out of this. In the mean time, he is > downloading the JS external file and when the file is dlowloaded or present > in the cache, the browser is interpreting all functions in order to make > them available by the page. > > > > For instance, when the BODY of your page is calling on onload event a > function in ur external JS, it's possible the JS is already downloaded but > the function does not exist yet for the browser. > > > > It's the same too when a JS function try to call an HTML object while the > page is not fully loaded yet (check onreadystate event for this) > > > > A solution to this : when u call the first function and this function does > not exist yet, just call instead a function which is a timeout checking if > the other function exist. When the function exist, just call it and stop > timeout. > > > > Thsi require of course the timeout function to be outside of the JS > file... > > > > Have a nice day > > > > L. Goffin > > > > > > -------------- next part -------------- > > An HTML attachment was scrubbed... > > URL: > http://lists.LaTech.edu/pipermail/javascript/attachments/20030713/3b2bb0b6/a > ttachment-0001.html > > > > ------------------------------ > > > > _______________________________________________ > > Javascript mailing list > > Javascript at LaTech.edu > > https://lists.LaTech.edu/mailman/listinfo/javascript > > > > > > End of Javascript Digest, Vol 5, Issue 10 > > ***************************************** > > > > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript From alan.easton at unn.ac.uk Tue Jul 15 07:52:09 2003 From: alan.easton at unn.ac.uk (Alan Easton) Date: Tue, 15 Jul 2003 13:52:09 +0100 Subject: [Javascript] Reading values into an array Message-ID: <61B1A61B4F4AD711B3450008C791F6FA96916E@clearwater.unn.ac.uk> Hello All, I have the results of an ASP recordset that I would like to read into a Javascript array. My recordset only returns 3 records, so I need to end up with a javascript 1D array similar to: var my_values=new Array("photo1.jpg","photo2.jpg","photo3.jpg") Where photo1.jpg, photo2.jpg, photo3.jpg are the 3 records that have been returned in my recordset. Does any one have any idea on how I would go about doing this. I realise it is tricky going from ASP recordsets to 1D javascript arrays, but I need some guidance. Any suggestions or links to further information would be much appreciated. Thanks, Alan... -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/ms-tnef Size: 3513 bytes Desc: not available URL: From rodney at aflyingstart.net Tue Jul 15 08:09:57 2003 From: rodney at aflyingstart.net (Rodney Myers) Date: Tue, 15 Jul 2003 14:09:57 +0100 Subject: [Javascript] Reading values into an array References: <61B1A61B4F4AD711B3450008C791F6FA96916E@clearwater.unn.ac.uk> Message-ID: <3F13FD25.6030404@aflyingstart.net> Alan, It may be easier to first declare the array and then write the data line by line. {pseudo code only for serverside} Client side result: hth Rodney Alan Easton wrote: >Hello All, > >I have the results of an ASP recordset that I would like to read into a >Javascript array. My recordset only returns 3 records, so I need to end up >with a javascript 1D array similar to: > >var my_values=new Array("photo1.jpg","photo2.jpg","photo3.jpg") > >Where photo1.jpg, photo2.jpg, photo3.jpg are the 3 records that have been >returned in my recordset. > >Does any one have any idea on how I would go about doing this. I realise it >is tricky going from ASP recordsets to 1D javascript arrays, but I need some >guidance. > >Any suggestions or links to further information would be much appreciated. > >Thanks, > >Alan... > > >------------------------------------------------------------------------ > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript > > -- PS. If you have to answer routine email queries from your sites or mailings then you will find the simple-to-use BizAutomator invaluable. http://www.BizAutomator.co.uk From javascript at theblades-family.com Tue Jul 15 08:12:31 2003 From: javascript at theblades-family.com (Cutter (JavaScript List)) Date: Tue, 15 Jul 2003 09:12:31 -0400 Subject: [Javascript] Image bar Message-ID: <3F13FDBF.5020600@theblades-family.com> What is the attribute to get rid of IE's image bar when you mouse over an image? Cutter From alan.easton at unn.ac.uk Tue Jul 15 08:19:30 2003 From: alan.easton at unn.ac.uk (Alan Easton) Date: Tue, 15 Jul 2003 14:19:30 +0100 Subject: [Javascript] Reading values into an array Message-ID: <61B1A61B4F4AD711B3450008C791F6FA96916F@clearwater.unn.ac.uk> Thanks Rodney, I'll give that a go........ -----Original Message----- From: Rodney Myers [mailto:rodney at aflyingstart.net] Sent: 15 July 2003 14:10 To: [JavaScript List] Subject: Re: [Javascript] Reading values into an array Alan, It may be easier to first declare the array and then write the data line by line. {pseudo code only for serverside} Client side result: hth Rodney Alan Easton wrote: >Hello All, > >I have the results of an ASP recordset that I would like to read into a >Javascript array. My recordset only returns 3 records, so I need to end up >with a javascript 1D array similar to: > >var my_values=new Array("photo1.jpg","photo2.jpg","photo3.jpg") > >Where photo1.jpg, photo2.jpg, photo3.jpg are the 3 records that have been >returned in my recordset. > >Does any one have any idea on how I would go about doing this. I realise it >is tricky going from ASP recordsets to 1D javascript arrays, but I need some >guidance. > >Any suggestions or links to further information would be much appreciated. > >Thanks, > >Alan... > > >------------------------------------------------------------------------ > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript > > -- PS. If you have to answer routine email queries from your sites or mailings then you will find the simple-to-use BizAutomator invaluable. http://www.BizAutomator.co.uk _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From rodney at aflyingstart.net Tue Jul 15 08:19:54 2003 From: rodney at aflyingstart.net (Rodney Myers) Date: Tue, 15 Jul 2003 14:19:54 +0100 Subject: [Javascript] Image bar References: <3F13FDBF.5020600@theblades-family.com> Message-ID: <3F13FF7A.5020506@aflyingstart.net> http://www.webdevtips.com/webdevtips/developer/imagebar.shtml hth Rodney Cutter (JavaScript List) wrote: > What is the attribute to get rid of IE's image bar when you mouse over > an image? > > Cutter > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > -- PS. If you have to answer routine email queries from your sites or mailings then you will find the simple-to-use BizAutomator invaluable. http://www.BizAutomator.co.uk From christ at saeweb.com Tue Jul 15 08:37:23 2003 From: christ at saeweb.com (Chris Tifer) Date: Tue, 15 Jul 2003 09:37:23 -0400 Subject: [Javascript] Reading values into an array References: <61B1A61B4F4AD711B3450008C791F6FA96916E@clearwater.unn.ac.uk> Message-ID: <010c01c34ad6$395626f0$f10110ac@saweb.lcl> It's not tricky at all actually... var my_values = new Array() <% DIM intRow FOR intRow = 0 to UBOUND(arrRecordset, 2) ' assuming you're using GetRows %> my_values[<%=intRow%>] = "<%=arrRecordSet(fieldName, intRow)%>" %< NEXT %> That (or something like that) should produce your array... Chris Tifer http://emailajoke.com ----- Original Message ----- From: "Alan Easton" To: "'Java-List'" Sent: Tuesday, July 15, 2003 8:52 AM Subject: [Javascript] Reading values into an array > Hello All, > > I have the results of an ASP recordset that I would like to read into a > Javascript array. My recordset only returns 3 records, so I need to end up > with a javascript 1D array similar to: > > var my_values=new Array("photo1.jpg","photo2.jpg","photo3.jpg") > > Where photo1.jpg, photo2.jpg, photo3.jpg are the 3 records that have been > returned in my recordset. > > Does any one have any idea on how I would go about doing this. I realise it > is tricky going from ASP recordsets to 1D javascript arrays, but I need some > guidance. > > Any suggestions or links to further information would be much appreciated. > > Thanks, > > Alan... > ---------------------------------------------------------------------------- ---- > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > From alan.easton at unn.ac.uk Tue Jul 15 08:54:58 2003 From: alan.easton at unn.ac.uk (Alan Easton) Date: Tue, 15 Jul 2003 14:54:58 +0100 Subject: [Javascript] Reading values into an array Message-ID: <61B1A61B4F4AD711B3450008C791F6FA969171@clearwater.unn.ac.uk> Hi Chris, Thanks for that. I have tried something ike that, using Getrows(). But I have trouble cross referenceing between vbscript and javascript. The piece of code you sent writes the values out onto the page. How would I get them back into the javascript array....??? Let me know if I am missing something obvious here....thanks.... Alan... -----Original Message----- From: Chris Tifer [mailto:christ at saeweb.com] Sent: 15 July 2003 14:37 To: [JavaScript List] Subject: Re: [Javascript] Reading values into an array It's not tricky at all actually... var my_values = new Array() <% DIM intRow FOR intRow = 0 to UBOUND(arrRecordset, 2) ' assuming you're using GetRows %> my_values[<%=intRow%>] = "<%=arrRecordSet(fieldName, intRow)%>" %< NEXT %> That (or something like that) should produce your array... Chris Tifer http://emailajoke.com ----- Original Message ----- From: "Alan Easton" To: "'Java-List'" Sent: Tuesday, July 15, 2003 8:52 AM Subject: [Javascript] Reading values into an array > Hello All, > > I have the results of an ASP recordset that I would like to read into a > Javascript array. My recordset only returns 3 records, so I need to end up > with a javascript 1D array similar to: > > var my_values=new Array("photo1.jpg","photo2.jpg","photo3.jpg") > > Where photo1.jpg, photo2.jpg, photo3.jpg are the 3 records that have been > returned in my recordset. > > Does any one have any idea on how I would go about doing this. I realise it > is tricky going from ASP recordsets to 1D javascript arrays, but I need some > guidance. > > Any suggestions or links to further information would be much appreciated. > > Thanks, > > Alan... > ---------------------------------------------------------------------------- ---- > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From christ at saeweb.com Tue Jul 15 09:04:06 2003 From: christ at saeweb.com (Chris Tifer) Date: Tue, 15 Jul 2003 10:04:06 -0400 Subject: [Javascript] Reading values into an array References: <61B1A61B4F4AD711B3450008C791F6FA969171@clearwater.unn.ac.uk> Message-ID: <013201c34ad9$f4dc9000$f10110ac@saweb.lcl> > But I have trouble cross referenceing between vbscript and javascript. The > piece of code you sent writes the values out onto the page. How would I get > them back into the javascript array....??? Ummmm, wrap them with a Or am I totally misunderstanding your question? Chris Tifer http://emailajoke.com From alan.easton at unn.ac.uk Tue Jul 15 09:09:02 2003 From: alan.easton at unn.ac.uk (Alan Easton) Date: Tue, 15 Jul 2003 15:09:02 +0100 Subject: [Javascript] Reading values into an array Message-ID: <61B1A61B4F4AD711B3450008C791F6FA969172@clearwater.unn.ac.uk> Hi Chris, I have figured it out, I have done just that. You were right Chris, it was not has hard as I was trying to make it. Thanks for all your help, Alan... -----Original Message----- From: Chris Tifer [mailto:christ at saeweb.com] Sent: 15 July 2003 15:04 To: [JavaScript List] Subject: Re: [Javascript] Reading values into an array > But I have trouble cross referenceing between vbscript and javascript. The > piece of code you sent writes the values out onto the page. How would I get > them back into the javascript array....??? Ummmm, wrap them with a Or am I totally misunderstanding your question? Chris Tifer http://emailajoke.com _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From christ at saeweb.com Tue Jul 15 09:13:45 2003 From: christ at saeweb.com (Chris Tifer) Date: Tue, 15 Jul 2003 10:13:45 -0400 Subject: [Javascript] Reading values into an array References: <61B1A61B4F4AD711B3450008C791F6FA969172@clearwater.unn.ac.uk> Message-ID: <014201c34adb$4d9aa6e0$f10110ac@saweb.lcl> No problem. I use JS arrays for a lot of things, so I have a lot of experience doing this sort of thing. Everyone's confused the first time, but it really is so simple. Chris Tifer http://emailajoke.com ----- Original Message ----- From: "Alan Easton" To: "'[JavaScript List]'" Sent: Tuesday, July 15, 2003 10:09 AM Subject: RE: [Javascript] Reading values into an array > Hi Chris, > > I have figured it out, I have done just that. > > You were right Chris, it was not has hard as I was trying to make it. > > Thanks for all your help, > > Alan... > > -----Original Message----- > From: Chris Tifer [mailto:christ at saeweb.com] > Sent: 15 July 2003 15:04 > To: [JavaScript List] > Subject: Re: [Javascript] Reading values into an array > > > > But I have trouble cross referenceing between vbscript and javascript. The > > piece of code you sent writes the values out onto the page. How would I > get > > them back into the javascript array....??? > > Ummmm, wrap them with a > > Or am I totally misunderstanding your question? > > Chris Tifer > http://emailajoke.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 From alan.easton at unn.ac.uk Tue Jul 15 09:20:42 2003 From: alan.easton at unn.ac.uk (Alan Easton) Date: Tue, 15 Jul 2003 15:20:42 +0100 Subject: [Javascript] Reading values into an array Message-ID: <61B1A61B4F4AD711B3450008C791F6FA969173@clearwater.unn.ac.uk> I was initially trying to read it into a 1D vbscript array, then from there convert it to a 1D JS array.........that was proving difficult. I didn't actully try just wrapping a JS blcok around code snippets of ASP. It works the way I want it, Cheers Chris. -----Original Message----- From: Chris Tifer [mailto:christ at saeweb.com] Sent: 15 July 2003 15:14 To: [JavaScript List] Subject: Re: [Javascript] Reading values into an array No problem. I use JS arrays for a lot of things, so I have a lot of experience doing this sort of thing. Everyone's confused the first time, but it really is so simple. Chris Tifer http://emailajoke.com ----- Original Message ----- From: "Alan Easton" To: "'[JavaScript List]'" Sent: Tuesday, July 15, 2003 10:09 AM Subject: RE: [Javascript] Reading values into an array > Hi Chris, > > I have figured it out, I have done just that. > > You were right Chris, it was not has hard as I was trying to make it. > > Thanks for all your help, > > Alan... > > -----Original Message----- > From: Chris Tifer [mailto:christ at saeweb.com] > Sent: 15 July 2003 15:04 > To: [JavaScript List] > Subject: Re: [Javascript] Reading values into an array > > > > But I have trouble cross referenceing between vbscript and javascript. The > > piece of code you sent writes the values out onto the page. How would I > get > > them back into the javascript array....??? > > Ummmm, wrap them with a > > Or am I totally misunderstanding your question? > > Chris Tifer > http://emailajoke.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 _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From romaniuc at klais.com.br Tue Jul 15 13:37:03 2003 From: romaniuc at klais.com.br (Alan Roberto Romaniuc) Date: Tue, 15 Jul 2003 15:37:03 -0300 Subject: [Javascript] getting input elements Message-ID: <3F1449CF.3040600@klais.com.br> Hi, I have a page with a lot of input elements, but without a form. How can I get, p.g., only the checkbox inputs to build a request url? Tanhks From dagda1 at hotmail.com Tue Jul 15 14:26:04 2003 From: dagda1 at hotmail.com (Paul Cowan) Date: Tue, 15 Jul 2003 19:26:04 +0000 Subject: [Javascript] getting input elements Message-ID: Alan, Use the DOM to get the various elements. e.g. ie5: var myElement = document.all.myElement; ie 5.5+ var myElment = document.getElementByID('myElement'); Check google Paul dagda1 at hotmail.com >From: Alan Roberto Romaniuc >Reply-To: "[JavaScript List]" >To: "[JavaScript List]" >Subject: [Javascript] getting input elements >Date: Tue, 15 Jul 2003 15:37:03 -0300 > > >Hi, > > I have a page with a lot of input elements, but without a form. How >can I get, p.g., only the checkbox inputs to build a request url? > >Tanhks > > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ Hotmail messages direct to your mobile phone http://www.msn.co.uk/msnmobile From mdougherty at pbp.com Tue Jul 15 14:34:41 2003 From: mdougherty at pbp.com (Mike Dougherty) Date: Tue, 15 Jul 2003 15:34:41 -0400 Subject: [Javascript] getting input elements In-Reply-To: Message-ID: <02c801c34b08$29970310$1702010a@IT23> Considering the amount of code required to traverse the checkboxes, build a suitable Querystring and redirect the browser to the new page based on some user action - I'm wondering why it isn't easier to just put
tag around the checkboxes... -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of Paul Cowan Sent: Tuesday, July 15, 2003 2:26 PM To: javascript at LaTech.edu Subject: Re: [Javascript] getting input elements *This message was transferred with a trial version of CommuniGate(tm) Pro* Alan, Use the DOM to get the various elements. e.g. ie5: var myElement = document.all.myElement; ie 5.5+ var myElment = document.getElementByID('myElement'); Check google Paul dagda1 at hotmail.com >From: Alan Roberto Romaniuc >Reply-To: "[JavaScript List]" >To: "[JavaScript List]" >Subject: [Javascript] getting input elements >Date: Tue, 15 Jul 2003 15:37:03 -0300 > > >Hi, > > I have a page with a lot of input elements, but without a form. How >can I get, p.g., only the checkbox inputs to build a request url? > >Tanhks > > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ Hotmail messages direct to your mobile phone http://www.msn.co.uk/msnmobile _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From rhiller at shianet.org Tue Jul 15 19:24:23 2003 From: rhiller at shianet.org (Bob and Sharon Hiller) Date: Tue, 15 Jul 2003 20:24:23 -0400 Subject: [Javascript] Re: Javascript Digest, Vol 5, Issue 10 References: <20030713170009.7125730ADC8@LaTech.edu> Message-ID: <001f01c34b30$9c994670$e747fea9@MAINSYSTEM> I found this script on the web: Like this: However, onreadystatechange is undefined. Is there a different command I can use? or perhaps I am not using the correct syntac? Thanks for your help, this problem is driving me crazy!!!! Sharon ----- Original Message ----- From: To: Sent: Sunday, July 13, 2003 1:00 PM Subject: Javascript Digest, Vol 5, Issue 10 > Send Javascript mailing list submissions to > javascript at LaTech.edu > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.LaTech.edu/mailman/listinfo/javascript > or, via email, send a message with subject or body 'help' to > javascript-request at LaTech.edu > > You can reach the person managing the list at > javascript-owner at LaTech.edu > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Javascript digest..." > > > Today's Topics: > > 1. Re: downloading javascript (Laurent Goffin) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sun, 13 Jul 2003 11:22:51 +0200 > From: "Laurent Goffin" > Subject: Re: [Javascript] downloading javascript > To: "[JavaScript List]" > Message-ID: <012401c34920$56fa4810$0202a8c0 at emakina.com> > Content-Type: text/plain; charset="iso-8859-1" > > >3. Could the html be so small that the javascript does not have time to download? The javascript is 9kb. > >4. How is a page loaded? ie starts with the html and as soon as external import is found, downloads the javascript? when the end html is found does all downloads stop? > > Right, > > there are chances that ur javascript is not yet loaded when the HTML page call for the functions... > I dont mean not yet downloaded but when the HTML page is loading, the browser interpret HTML and create a DOM out of this. In the mean time, he is downloading the JS external file and when the file is dlowloaded or present in the cache, the browser is interpreting all functions in order to make them available by the page. > > For instance, when the BODY of your page is calling on onload event a function in ur external JS, it's possible the JS is already downloaded but the function does not exist yet for the browser. > > It's the same too when a JS function try to call an HTML object while the page is not fully loaded yet (check onreadystate event for this) > > A solution to this : when u call the first function and this function does not exist yet, just call instead a function which is a timeout checking if the other function exist. When the function exist, just call it and stop timeout. > > Thsi require of course the timeout function to be outside of the JS file... > > Have a nice day > > L. Goffin > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: http://lists.LaTech.edu/pipermail/javascript/attachments/20030713/3b2bb0b6/a ttachment-0001.html > > ------------------------------ > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > > > End of Javascript Digest, Vol 5, Issue 10 > ***************************************** > From kslowers at tampabay.rr.com Tue Jul 15 19:45:49 2003 From: kslowers at tampabay.rr.com (KSLowers) Date: Tue, 15 Jul 2003 20:45:49 -0400 Subject: [Javascript] Make dates display in short format. Message-ID: Hello With the code below I'm trying to learn to make the date in the short format like -- 7/15/2003. Can someone show me how to do this in code. Thanks in advance. Kev var oneday = 1000*60*60*24; // length of one day in millisecs var today = new Date(); // setup todays object today.setTime(now.getTime() + (oneday*13)); alert(today); From walter at torres.ws Tue Jul 15 22:30:39 2003 From: walter at torres.ws (Walter Torres) Date: Tue, 15 Jul 2003 22:30:39 -0500 Subject: [Javascript] Make dates display in short format. In-Reply-To: Message-ID: > -----Original Message----- > From: javascript-bounces at LaTech.edu > [mailto:javascript-bounces at LaTech.edu]On Behalf Of KSLowers > Sent: Tuesday, July 15, 2003 7:46 PM > To: Javascript List > Subject: [Javascript] Make dates display in short format. > > > Hello > > With the code below I'm trying to learn to make the date in the > short format > like -- 7/15/2003. Can someone show me how to do this in code. > Thanks in advance. > I have a "complete" date method library. It will help you do this. www.torres.ws/dev Hope it helps you. walter ====================================================================== Common mistake, sir. - Data, "Star Trek: The Next Generation, (The Naked Now)" From trojani2000 at hotmail.com Wed Jul 16 09:31:36 2003 From: trojani2000 at hotmail.com (BEKIM BACAJ) Date: Wed, 16 Jul 2003 16:31:36 +0200 Subject: [Javascript] downloading javascript Message-ID: casse1:It is possible that the jscript file is not loading at all in these pages, may happen that you've moved these pages to another folder after you've tested them?! In this casse, the script file is ot of the target and can not be found. Even if the script resides in the browser chache, the browser always checks for it in the server, so if any updated changes are made it will downlad the newer version. If the file is not found there, the script from the chache will not read at all. casse2:The script TAG is placed at the end of the HTML, and the HTML is lot shorter than the external script it will fail to initiate, but this may happen to all external scripts because of asyncronity. No error will ocure if the function is not called emediately after the onload event. But sometimes it depends explicitely on the nature of the script and what's the function call! >From: "Bob and Sharon Hiller" >Reply-To: "[JavaScript List]" >To: >Subject: [Javascript] downloading javascript >Date: Sat, 12 Jul 2003 10:50:31 -0400 > >Hello, > >We have hundreds of html pages that are using the same external javascript. >We get an error on some of the pages, object not found (from the external >javascript). > >When the first page is sent the external javascript should be in the users >cache. but somehow toward the end of the html pages the external javascript >can not be found. Can anyone shed some light on this problem? Why is the >javascript not in the users cache at this point. If the javascript is not >found it seems like it would be getting the code from the webserver? could >the html on the page be so small that the javascript does not have time to >download from the server? > >Questions: >1. Why wouldn't the javascript still be in the user cache? >2. If the javascript is not found, why isn't the script found on the >webserver? >3. Could the html be so small that the javascript does not have time to >download? The javascript is 9kb. >4. How is a page loaded? ie starts with the html and as soon as external >import is found, downloads the javascript? when the end html is found does >all downloads stop? > > >Thanks for your help! >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus From trojani2000 at hotmail.com Wed Jul 16 09:47:31 2003 From: trojani2000 at hotmail.com (BEKIM BACAJ) Date: Wed, 16 Jul 2003 16:47:31 +0200 Subject: [Javascript] copyright of code Message-ID: Not script solutions are copywrighted unless stated in the headder. But once you come up with the original solution script of your own, you will begin wishing that it was. >From: Webby >Reply-To: "[JavaScript List]" >To: javascript at LaTech.edu >Subject: [Javascript] copyright of code >Date: Mon, 14 Jul 2003 02:03:44 -0700 (PDT) > >Hi, > >Is code subject to copyright? > >If I find a script on a commercial web site (rather >than a dedicated resource site) that is useful to me >can I repurpose it for my own use? > >TIA > >Webby > >__________________________________ >Do you Yahoo!? >SBC Yahoo! DSL - Now only $29.95 per month! >http://sbc.yahoo.com >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus From trojani2000 at hotmail.com Wed Jul 16 12:54:57 2003 From: trojani2000 at hotmail.com (BEKIM BACAJ) Date: Wed, 16 Jul 2003 19:54:57 +0200 Subject: [Javascript] peculiarity of onselectstart Message-ID: Well, you owe me this one! the onselectstart turned false disables all the content from being selected, no matter what you do after this will not help so wei will filter unwanted items like this: Trojani


Had some hard time with undefined items but it is solved now, Cheers! >From: "David T. Lovering" >Reply-To: "[JavaScript List]" >To: "[JavaScript List]" >Subject: [Javascript] peculiarity of onselectstart >Date: Sun, 13 Jul 2003 08:32:04 -0700 > > >I just noticed in passing a peculiarity of "onselectstart" which is >somewhat annoying. > >What I want to be able to do is eliminate drag-selection of multiple >fields, blank form background, etc. by an >inadvertant swipe of the mouse while the select button is depressed, while >at the same time still permitting >drag-selection of the contents of single fields. Ostensibly this model >should work: > > > > bogus > > > >
>
> onselectstart='enableSelect'>
> onselectstart='enableSelect'>
>
>
> > > >Sadly, the 'document.onselectstart' declaration appears to take precedence >over all the fields, irrespective of whether they have localized >onselectstart declarations of their own. Yes, I've tried using straight >'return true' declarations in lieu of >'enableSelect' function calls. Still no cigar. > >Anybody have any ideas? This one has me stumped. > >-- Dave Lovering >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail From trojani2000 at hotmail.com Wed Jul 16 13:01:28 2003 From: trojani2000 at hotmail.com (BEKIM BACAJ) Date: Wed, 16 Jul 2003 20:01:28 +0200 Subject: [Javascript] peculiarity of onselectstart/script viewable Message-ID: >From: "BEKIM BACAJ" >Reply-To: "[JavaScript List]" >To: javascript at LaTech.edu >Subject: Re: [Javascript] peculiarity of onselectstart >Date: Wed, 16 Jul 2003 19:54:57 +0200 > >Well, you owe me this one! > >the onselectstart turned false disables all the content from being >selected, no matter what you do after this will not help so wei will filter >unwanted items like this: > > > > Trojani > > > > >
>
> >
>
> >
>
> > > > >Had some hard time with undefined items but it is solved now, >Cheers! > >>From: "David T. Lovering" >>Reply-To: "[JavaScript List]" >>To: "[JavaScript List]" >>Subject: [Javascript] peculiarity of onselectstart >>Date: Sun, 13 Jul 2003 08:32:04 -0700 >> >> >>I just noticed in passing a peculiarity of "onselectstart" which is >>somewhat annoying. >> >>What I want to be able to do is eliminate drag-selection of multiple >>fields, blank form background, etc. by an >>inadvertant swipe of the mouse while the select button is depressed, while >>at the same time still permitting >>drag-selection of the contents of single fields. Ostensibly this model >>should work: >> >> >> >> bogus >> >> >> >>
>>
>> >onselectstart='enableSelect'>
>> >onselectstart='enableSelect'>
>>
>>
>> >> >> >>Sadly, the 'document.onselectstart' declaration appears to take precedence >>over all the fields, irrespective of whether they have localized >>onselectstart declarations of their own. Yes, I've tried using straight >>'return true' declarations in lieu of >>'enableSelect' function calls. Still no cigar. >> >>Anybody have any ideas? This one has me stumped. >> >>-- Dave Lovering >>_______________________________________________ >>Javascript mailing list >>Javascript at LaTech.edu >>https://lists.LaTech.edu/mailman/listinfo/javascript > >_________________________________________________________________ >Add photos to your e-mail with MSN 8. Get 2 months FREE*. >http://join.msn.com/?page=features/featuredemail > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail From trojani2000 at hotmail.com Wed Jul 16 13:12:05 2003 From: trojani2000 at hotmail.com (BEKIM BACAJ) Date: Wed, 16 Jul 2003 20:12:05 +0200 Subject: [Javascript] peculiarity of onselectstart/third Message-ID: An HTML attachment was scrubbed... URL: From dlovering at gazos.com Wed Jul 16 15:33:23 2003 From: dlovering at gazos.com (David T. Lovering) Date: Wed, 16 Jul 2003 13:33:23 -0700 Subject: [Javascript] peculiarity of onselectstart/third References: Message-ID: <3F15B65E.C1B9E138@gazos.com> Way cool! This goes way beyond the "standard" treatment of onselectstart given in the books. Handling this at the event level does provide the needed descrimination though, without the "poisoning" effect of simply launching it with { return false; } at the document level from the very start. Somebody earned their browny points on this one! Kudos to you... -- Dave Lovering BEKIM BACAJ wrote: > > Well, you owe me this one! > the onselectstart turned false disables all the content from being > selected, no matter what you do after this will not help so wei will > filter unwanted items like this: > > > > Trojani > > > > >
>
> >
>
> >
>
> > > > > > Had some hard time with undefined items but it is solved now, > Cheers! > > > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > Protect your PC - Click here for McAfee.com VirusScan Online > > Part 1.2 Type: Plain Text (text/plain) > Encoding: 7bit From dlovering at gazos.com Wed Jul 16 15:50:25 2003 From: dlovering at gazos.com (David Lovering) Date: Wed, 16 Jul 2003 13:50:25 -0700 Subject: [Javascript] peculiarity of onselectstart/third References: Message-ID: <001e01c34bdb$e1fc3870$0600000a@toshibauser> Just to wrap up this discussion, I polished Bekim's code to "full workability" and am including it below. Rather than prescribing naming conventions for active fields (who wants all their active inputs to be called "field-XXX"?), I modified the routine to work off the nodeName and type, thusly: function handleSelectStart(evt) { evt = (evt) ? evt : (window.event) ? window.event : ""; if (evt) { var inputType = evt.srcElement.type; var inputNodeName = evt.srcElement.nodeName; if (inputNodeName == "INPUT") { return true; } if (inputNodeName == "TEXTAREA") { return true; } if (inputType == "undefined") { return false; } return false; } } // handleSelectStart() document.onselectstart = handleSelectStart; Note -- certain older versions of Netscape may have issues with the handler name, as they generally prefer all lower-case for such things. Anyway, this method worked like a champ on the four or five browser types I had time to check. Thanks Bekim! Now if only someone could explain to me why the various major browser-writing bodies didn't build this into their engines at the get-go, I'd be a happy man. -- Dave Lovering ----- Original Message ----- From: BEKIM BACAJ To: javascript at LaTech.edu Sent: Wednesday, July 16, 2003 11:12 AM Subject: Re: [Javascript] peculiarity of onselectstart/third Well, you owe me this one! the onselectstart turned false disables all the content from being selected, no matter what you do after this will not help so wei will filter unwanted items like this: Trojani


Had some hard time with undefined items but it is solved now, Cheers! ------------------------------------------------------------------------------ Protect your PC - Click here for McAfee.com VirusScan Online ------------------------------------------------------------------------------ _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript -------------- next part -------------- An HTML attachment was scrubbed... URL: From dlovering at gazos.com Wed Jul 16 15:55:58 2003 From: dlovering at gazos.com (David T. Lovering) Date: Wed, 16 Jul 2003 13:55:58 -0700 Subject: [Javascript] getting input elements References: <3F1449CF.3040600@klais.com.br> Message-ID: <3F15BBA5.5E756F68@gazos.com> Hmmm... let me take a stab at this... First off, most "input elements" don't work outside of a form, as the code behind the form is intended to be the premier method of encoding the data conveyed by them to some means of processing them. Mind you, I don't use forms for this purpose (too insecure for the manic, anal-retentive crowd I hang with), but I get along with those that do... and even I still use forms as "wrappers" for data elements (like inputs), simply to avoid all the nasty IE errors when the code rolls through my browser when I don't. The answer then, is use a neutered form as a wrapper...
...
The second part of your question "How can I get ... only the checkbox inputs" is solved by the use of the getElementsByTagName and the ".type" declarator: var myInputArray = document.forms[0].getElementsByTagName("INPUT"); for (var i=0; i > Hi, > > I have a page with a lot of input elements, but without a form. > How can I get, p.g., only the checkbox inputs to build a request url? > > Tanhks > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript From david at amsresponse.com Fri Jul 18 14:17:38 2003 From: david at amsresponse.com (David Yee) Date: Fri, 18 Jul 2003 12:17:38 -0700 Subject: [Javascript] Set all list box drop downs to a single value Message-ID: Hi- how can I set all the drop downs on my form to a single value with the click of a button? I've seen ways to do it with checkboxes but I'm not sure how to do it with drop downs. The names of the select box variables are in a number sequence e.g. Thanks for any help! David From peter at brunone.com Fri Jul 18 15:19:08 2003 From: peter at brunone.com (Peter Brunone) Date: Fri, 18 Jul 2003 15:19:08 -0500 Subject: [Javascript] Set all list box drop downs to a single value In-Reply-To: Message-ID: <000801c34d69$d88cb230$0502a8c0@monkeyhouse> David, If you know the names of the checkboxes (BTW, it's a good idea not to start object names with integers, because it can confuse the scripting engine), you can just go through a loop like this: for (i=10001;i<=10003;i++) { var newCheckBox = eval("document.formName." + i + "[status]"); // selectedIndex is the index of the current option (in a zero-based array) newCheckBox.selectedIndex = 3; } This should get you started; let us know if you have more questions. Cheers, Peter -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of David Yee Hi- how can I set all the drop downs on my form to a single value with the click of a button? I've seen ways to do it with checkboxes but I'm not sure how to do it with drop downs. The names of the select box variables are in a number sequence e.g. Thanks for any help! David From hassan at webtuitive.com Fri Jul 18 15:34:18 2003 From: hassan at webtuitive.com (Hassan Schroeder) Date: Fri, 18 Jul 2003 13:34:18 -0700 Subject: [Javascript] Set all list box drop downs to a single value In-Reply-To: <000801c34d69$d88cb230$0502a8c0@monkeyhouse> References: <000801c34d69$d88cb230$0502a8c0@monkeyhouse> Message-ID: <3F1859CA.6010802@webtuitive.com> Peter Brunone wrote: > If you know the names of the checkboxes (BTW, it's a good idea > not to start object names with integers, because it can confuse the > scripting engine), Erm, it's actually a violation of the spec -- ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods ("."). And Murphy's Law dictates that it'll work fine anyway -- until you *really* need it to, and don't have time to change them all :-) FWIW! -- Hassan Schroeder ----------------------------- hassan at webtuitive.com Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. From david at amsresponse.com Fri Jul 18 18:26:22 2003 From: david at amsresponse.com (David Yee) Date: Fri, 18 Jul 2003 16:26:22 -0700 Subject: [Javascript] Set all list box drop downs to a single value Message-ID: Thanks Peter- that should work. -----Original Message----- From: Peter Brunone [mailto:peter at brunone.com] Sent: Friday, July 18, 2003 1:19 PM To: '[JavaScript List]' Subject: RE: [Javascript] Set all list box drop downs to a single value David, If you know the names of the checkboxes (BTW, it's a good idea not to start object names with integers, because it can confuse the scripting engine), you can just go through a loop like this: for (i=10001;i<=10003;i++) { var newCheckBox = eval("document.formName." + i + "[status]"); // selectedIndex is the index of the current option (in a zero-based array) newCheckBox.selectedIndex = 3; } This should get you started; let us know if you have more questions. Cheers, Peter -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of David Yee Hi- how can I set all the drop downs on my form to a single value with the click of a button? I've seen ways to do it with checkboxes but I'm not sure how to do it with drop downs. The names of the select box variables are in a number sequence e.g. Thanks for any help! David _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From mdougherty at pbp.com Mon Jul 21 07:24:49 2003 From: mdougherty at pbp.com (Mike Dougherty) Date: Mon, 21 Jul 2003 08:24:49 -0400 Subject: [Javascript] Set all list box drop downs to a single value In-Reply-To: Message-ID: <000701c34f83$1785ca60$1702010a@IT23> If you DON'T know the names, and you really do want ALL checkboxes do something like: var loCollection = document.getElementsByTagName("input") for (loItem in loCollection) { if ( loItem.type == "checkbox" ) { loItem.selectedIndex = 3; /* if there aren't 4 items, the first option is selected */ } } Note: I haven't tested this code, so your mileage my vary... -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of David Yee Sent: Friday, July 18, 2003 6:26 PM To: '[JavaScript List]' Subject: RE: [Javascript] Set all list box drop downs to a single value *This message was transferred with a trial version of CommuniGate(tm) Pro* Thanks Peter- that should work. -----Original Message----- From: Peter Brunone [mailto:peter at brunone.com] Sent: Friday, July 18, 2003 1:19 PM To: '[JavaScript List]' Subject: RE: [Javascript] Set all list box drop downs to a single value David, If you know the names of the checkboxes (BTW, it's a good idea not to start object names with integers, because it can confuse the scripting engine), you can just go through a loop like this: for (i=10001;i<=10003;i++) { var newCheckBox = eval("document.formName." + i + "[status]"); // selectedIndex is the index of the current option (in a zero-based array) newCheckBox.selectedIndex = 3; } This should get you started; let us know if you have more questions. Cheers, Peter -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of David Yee Hi- how can I set all the drop downs on my form to a single value with the click of a button? I've seen ways to do it with checkboxes but I'm not sure how to do it with drop downs. The names of the select box variables are in a number sequence e.g. Thanks for any help! David _______________________________________________ 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 dlovering at gazos.com Mon Jul 21 09:22:25 2003 From: dlovering at gazos.com (David Lovering) Date: Mon, 21 Jul 2003 07:22:25 -0700 Subject: [Javascript] Timing Issues References: <000701c34f83$1785ca60$1702010a@IT23> Message-ID: <000401c34f93$828050a0$0600000a@elohim> One of the apps I'm working on now is a database engine for a web-site which occassionally requires humongous tables to appear on the remote (client-side) screen. Since I'm using a combination of server-side PHP/SQL and client-side JavaScript to paint this, there are timing issues involved on both sides. Aside from indexing, caching, hash-codes, compression, etc. (which I'm investigating), one obvious way to appease the user on the client window is to paint the screen record-by-record as the data comes in, rather than waiting until the entire table is completed before updating the aforesaid window. What is the best way to do this? Are there any JavaScript/DOM directives that will force intermediate updates rather than waiting for the object load to complete? Should I use the createElement directive to build each as a separate object? Does anybody have any feel for this? -- Dave Lovering From mdougherty at pbp.com Mon Jul 21 09:47:38 2003 From: mdougherty at pbp.com (Mike Dougherty) Date: Mon, 21 Jul 2003 10:47:38 -0400 Subject: [Javascript] Timing Issues In-Reply-To: <000401c34f93$828050a0$0600000a@elohim> Message-ID: <000901c34f97$0b340380$1702010a@IT23> Are you issueing the data request from the client? If yes, you could request data in smaller chunks, and write the data in whatever chunk size you want. Probably no, because that approach opens other security related issues (and would lead to allowing cross-domain scripting/requests) I don't know about PHP, but the ASP model uses buffering to cache the whole HTML page before submitting it to the browser - but you can also flush the buffer periodically during the page composition steps - which would give the look and feel of an updating page (as long as the results can adequately be expressed in a stepwise manner) Another idea would be to cache the resultset of your query on the server, then show smaller pages - of course, that would require a paging scheme which can become complicated or cumbersome. The benefit of server side caching is that you might never have to send all the data across the internet to the client, which could be a significant load-time performance increase. The downside is that there could be a large number of round-trips from the user to the server requesting pages, as well as the complexity involved with implementing the cache and paging routines. If the purpose is more of an analytic nature, it might be better to suffer the long download of data then manipulate a local cache in some format (like XML) Usually the answer to this type of problem revolves around your answer to the question, "Why does the client really need such a humongous recordset? If we provide a decent filter mechanism, would it be possible to have the user request less data in the first place?" In the cases I've seen, the marketing department (for example) requests 2 million records because they 'want everything' so they can pick out the 10-20k records of interest. There's no way they can eyeball that much data, so they are filtering what IT delivers anyway... Or did I miss the point altogether? -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of David Lovering Sent: Monday, July 21, 2003 9:22 AM To: [JavaScript List] Subject: [Javascript] Timing Issues *This message was transferred with a trial version of CommuniGate(tm) Pro* One of the apps I'm working on now is a database engine for a web-site which occassionally requires humongous tables to appear on the remote (client-side) screen. Since I'm using a combination of server-side PHP/SQL and client-side JavaScript to paint this, there are timing issues involved on both sides. Aside from indexing, caching, hash-codes, compression, etc. (which I'm investigating), one obvious way to appease the user on the client window is to paint the screen record-by-record as the data comes in, rather than waiting until the entire table is completed before updating the aforesaid window. What is the best way to do this? Are there any JavaScript/DOM directives that will force intermediate updates rather than waiting for the object load to complete? Should I use the createElement directive to build each as a separate object? Does anybody have any feel for this? -- Dave Lovering _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From christ at saeweb.com Mon Jul 21 10:05:38 2003 From: christ at saeweb.com (Chris Tifer) Date: Mon, 21 Jul 2003 11:05:38 -0400 Subject: [Javascript] Timing Issues References: <000701c34f83$1785ca60$1702010a@IT23> <000401c34f93$828050a0$0600000a@elohim> Message-ID: <004e01c34f99$8bfb2af0$f10110ac@saweb.lcl> First, the obvious thing would be to page your results so that there's not so much info in one shot unless it's absolutely neccessary (in most cases, it is NOT neccessary to give them all the info on one page). If that's not an option, a table won't render until it's complete, so your best best (although it will tremendously increase HTML file size) would be to put each individual record in it's own table so that way by the time the next record was being written out, the previous table would be complete. Now I don't know about PHP, but in ASP, you can set buffering on code and if you have that turned on, nothing will be sent to the client until the entire bit has been run. To send the processed HTML to the client, I would use: response.flush Hope that might help a little. Chris Tifer http://emailajoke.com ----- Original Message ----- From: "David Lovering" To: "[JavaScript List]" Sent: Monday, July 21, 2003 10:22 AM Subject: [Javascript] Timing Issues > One of the apps I'm working on now is a database engine for a web-site which > occassionally requires humongous tables to appear on the remote > (client-side) screen. Since I'm using a combination of server-side PHP/SQL > and client-side JavaScript to paint this, there are timing issues involved > on both sides. > > Aside from indexing, caching, hash-codes, compression, etc. (which I'm > investigating), one obvious way to appease the user on the client window is > to paint the screen record-by-record as the data comes in, rather than > waiting until the entire table is completed before updating the aforesaid > window. What is the best way to do this? Are there any JavaScript/DOM > directives that will force intermediate updates rather than waiting for the > object load to complete? Should I use the createElement directive to build > each as a separate object? Does anybody have any feel for this? > > -- Dave Lovering > > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript From dlovering at gazos.com Mon Jul 21 12:10:08 2003 From: dlovering at gazos.com (David Lovering) Date: Mon, 21 Jul 2003 10:10:08 -0700 Subject: [Javascript] Timing Issues References: <000701c34f83$1785ca60$1702010a@IT23><000401c34f93$828050a0$0600000a@elohim> <004e01c34f99$8bfb2af0$f10110ac@saweb.lcl> Message-ID: <000e01c34faa$f3279cc0$0600000a@elohim> Dear Chris: All good ideas. Unfortunately, in the former iteration I did have paging -- and got complaints from folks who wanted to print entire tables for reports without segmentation issues getting in the way of the layout. Business majors -- go figure. Although I'm certain the 'table per row' solution would work, the overhead would be extremely gruesome, and I'll hold that trick in reserve until I've exhausted everything else in the bag. Have you any experience with createElement to "grow" an already displayed table? How does this affect the background latency to load the whole table? The 'response.flush' feature might indeed work, particularly if I can force the event handler to act on it after the "build" of each record. Of course, since the screen geometry is set by "worst-case" TD widths/heights, the whole screen will jitter like a hornytoad on a hotplate as differing field lengths come pouring in. Hmmm... some testing is in order. -- Dave Lovering ----- Original Message ----- From: "Chris Tifer" To: "[JavaScript List]" Sent: Monday, July 21, 2003 8:05 AM Subject: Re: [Javascript] Timing Issues > First, the obvious thing would be to page your results so that there's not > so much info in one shot unless it's absolutely neccessary (in most cases, > it > is NOT neccessary to give them all the info on one page). > > If that's not an option, a table won't render until it's complete, so your > best best > (although it will tremendously increase HTML file size) would be to put each > individual record in it's own table so that way by the time the next record > was being written out, the previous table would be complete. > > Now I don't know about PHP, but in ASP, you can set buffering on code > and if you have that turned on, nothing will be sent to the client until the > entire > bit has been run. > > To send the processed HTML to the client, I would use: > > response.flush > > Hope that might help a little. > > Chris Tifer > http://emailajoke.com > > ----- Original Message ----- > From: "David Lovering" > To: "[JavaScript List]" > Sent: Monday, July 21, 2003 10:22 AM > Subject: [Javascript] Timing Issues > > > > One of the apps I'm working on now is a database engine for a web-site > which > > occassionally requires humongous tables to appear on the remote > > (client-side) screen. Since I'm using a combination of server-side > PHP/SQL > > and client-side JavaScript to paint this, there are timing issues involved > > on both sides. > > > > Aside from indexing, caching, hash-codes, compression, etc. (which I'm > > investigating), one obvious way to appease the user on the client window > is > > to paint the screen record-by-record as the data comes in, rather than > > waiting until the entire table is completed before updating the aforesaid > > window. What is the best way to do this? Are there any JavaScript/DOM > > directives that will force intermediate updates rather than waiting for > the > > object load to complete? Should I use the createElement directive to > build > > each as a separate object? Does anybody have any feel for this? > > > > -- Dave Lovering > > > > > > _______________________________________________ > > 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 rer at datacompusa.com Mon Jul 21 12:21:04 2003 From: rer at datacompusa.com (Roger Roelofs) Date: Mon, 21 Jul 2003 13:21:04 -0400 Subject: [Javascript] Timing Issues In-Reply-To: <000e01c34faa$f3279cc0$0600000a@elohim> Message-ID: Dave, How about creating a separate link to allow the user to download the data to an xml or text file. If they want to do reporting I'm betting they are pasting/importing into a spreadsheet or reporting tool anyway. Roger, On Monday, July 21, 2003, at 01:10 PM, David Lovering wrote: > Dear Chris: > > All good ideas. Unfortunately, in the former iteration I did have > paging -- > and got complaints from folks who wanted to print entire tables for > reports > without segmentation issues getting in the way of the layout. Business > majors -- go figure. > > Although I'm certain the 'table per row' solution would work, the > overhead > would be extremely gruesome, and I'll hold that trick in reserve until > I've > exhausted everything else in the bag. > > Have you any experience with createElement to "grow" an already > displayed > table? How does this affect the background latency to load the whole > table? > > The 'response.flush' feature might indeed work, particularly if I can > force > the event handler to act on it after the "build" of each record. > Of course, since the screen geometry is set by "worst-case" TD > widths/heights, the whole screen will jitter like a hornytoad on a > hotplate > as differing field lengths come pouring in. Hmmm... some testing is in > order. > > -- Dave Lovering From dlovering at gazos.com Mon Jul 21 12:56:13 2003 From: dlovering at gazos.com (David Lovering) Date: Mon, 21 Jul 2003 10:56:13 -0700 Subject: [Javascript] Timing Issues References: Message-ID: <001c01c34fb1$6054ed10$0600000a@elohim> Excellent notion. However, I'm also betting that people want to "see" the output before they commit it to a table for reporting to the CEO. I'll be sure to make the 'table-storage' download feature very prominent, in hopes it takes some of the heat off the other bits... -- Dave Lovering ----- Original Message ----- From: "Roger Roelofs" To: "[JavaScript List]" Sent: Monday, July 21, 2003 10:21 AM Subject: Re: [Javascript] Timing Issues > Dave, > > How about creating a separate link to allow the user to download the > data to an xml or text file. If they want to do reporting I'm betting > they are pasting/importing into a spreadsheet or reporting tool anyway. > > Roger, > > > On Monday, July 21, 2003, at 01:10 PM, David Lovering wrote: > > > Dear Chris: > > > > All good ideas. Unfortunately, in the former iteration I did have > > paging -- > > and got complaints from folks who wanted to print entire tables for > > reports > > without segmentation issues getting in the way of the layout. Business > > majors -- go figure. > > > > Although I'm certain the 'table per row' solution would work, the > > overhead > > would be extremely gruesome, and I'll hold that trick in reserve until > > I've > > exhausted everything else in the bag. > > > > Have you any experience with createElement to "grow" an already > > displayed > > table? How does this affect the background latency to load the whole > > table? > > > > The 'response.flush' feature might indeed work, particularly if I can > > force > > the event handler to act on it after the "build" of each record. > > Of course, since the screen geometry is set by "worst-case" TD > > widths/heights, the whole screen will jitter like a hornytoad on a > > hotplate > > as differing field lengths come pouring in. Hmmm... some testing is in > > order. > > > > -- Dave Lovering > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript > > From dlovering at gazos.com Mon Jul 21 13:03:14 2003 From: dlovering at gazos.com (David Lovering) Date: Mon, 21 Jul 2003 11:03:14 -0700 Subject: [Javascript] Timing Issues References: <000901c34f97$0b340380$1702010a@IT23> Message-ID: <002101c34fb2$5ae69620$0600000a@elohim> I'm afraid even though the data selection is made from the client side, the data upload is server-side driven, and it only knows what is in the query that was submitted to it. If a gazillion cells result from the query, the server is obliged to squirt them all upstream as fast as it is able. [Customer specs are a real pain, aren't they?] If we think the "flush" method might move the already constructed blocks onto the screen, I'm perfectly willing to try doing a flush after every record. That would certainly improve the appearance of the throughput, even though the total build time would be almost exactly the same. Just for kicks, does one do the refresh on the record, the table, or the window? (Or some baroque combination of all of them)... -- Dave Lovering ----- Original Message ----- From: "Mike Dougherty" To: "'[JavaScript List]'" Sent: Monday, July 21, 2003 7:47 AM Subject: RE: [Javascript] Timing Issues > Are you issueing the data request from the client? If yes, you could > request data in smaller chunks, and write the data in whatever chunk > size you want. Probably no, because that approach opens other security > related issues (and would lead to allowing cross-domain > scripting/requests) > > I don't know about PHP, but the ASP model uses buffering to cache the > whole HTML page before submitting it to the browser - but you can also > flush the buffer periodically during the page composition steps - which > would give the look and feel of an updating page (as long as the results > can adequately be expressed in a stepwise manner) > > Another idea would be to cache the resultset of your query on the > server, then show smaller pages - of course, that would require a paging > scheme which can become complicated or cumbersome. The benefit of > server side caching is that you might never have to send all the data > across the internet to the client, which could be a significant > load-time performance increase. The downside is that there could be a > large number of round-trips from the user to the server requesting > pages, as well as the complexity involved with implementing the cache > and paging routines. > > If the purpose is more of an analytic nature, it might be better to > suffer the long download of data then manipulate a local cache in some > format (like XML) > > Usually the answer to this type of problem revolves around your answer > to the question, "Why does the client really need such a humongous > recordset? If we provide a decent filter mechanism, would it be > possible to have the user request less data in the first place?" In the > cases I've seen, the marketing department (for example) requests 2 > million records because they 'want everything' so they can pick out the > 10-20k records of interest. There's no way they can eyeball that much > data, so they are filtering what IT delivers anyway... > > Or did I miss the point altogether? > > -----Original Message----- > From: javascript-bounces at LaTech.edu > [mailto:javascript-bounces at LaTech.edu] On Behalf Of David Lovering > Sent: Monday, July 21, 2003 9:22 AM > To: [JavaScript List] > Subject: [Javascript] Timing Issues > > > *This message was transferred with a trial version of CommuniGate(tm) > Pro* > One of the apps I'm working on now is a database engine for a web-site > which > occassionally requires humongous tables to appear on the remote > (client-side) screen. Since I'm using a combination of server-side > PHP/SQL > and client-side JavaScript to paint this, there are timing issues > involved > on both sides. > > Aside from indexing, caching, hash-codes, compression, etc. (which I'm > investigating), one obvious way to appease the user on the client window > is > to paint the screen record-by-record as the data comes in, rather than > waiting until the entire table is completed before updating the > aforesaid > window. What is the best way to do this? Are there any JavaScript/DOM > directives that will force intermediate updates rather than waiting for > the > object load to complete? Should I use the createElement directive to > build > each as a separate object? Does anybody have any feel for this? > > -- Dave Lovering > > > _______________________________________________ > 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 mdougherty at pbp.com Mon Jul 21 13:06:33 2003 From: mdougherty at pbp.com (Mike Dougherty) Date: Mon, 21 Jul 2003 14:06:33 -0400 Subject: [Javascript] Timing Issues In-Reply-To: <001c01c34fb1$6054ed10$0600000a@elohim> Message-ID: <000e01c34fb2$d4fd5110$1702010a@IT23> Our intranet uses a server-side cache to store the results that could take up to 15 minutes to retrieve from the SQL server. The data is presented in user-defined pages from 1 to 500 records at a time, with first/previous/next/last and direct record number addressing. Once the eyeballing is done online, the user can click the export button to retrieve a TAB delimited text file for easy import into Excel for use in a pivot table or other analytic tool. (why reinvent the pivot table, when Excel does such a good job already?) For the management types who just want to print a report, we serve Crystal reports over the intranet via the crystal web control - this solution does the number crunching on the server, allows paging/drill-down/etc. and prints exactly as IT-serviced crystal reports (rather than the ugly HTML print IE gives you) For really serious number crunching analytics, consider giving your user(s) a real database management package. -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of David Lovering Sent: Monday, July 21, 2003 12:56 PM To: [JavaScript List] Subject: Re: [Javascript] Timing Issues *This message was transferred with a trial version of CommuniGate(tm) Pro* Excellent notion. However, I'm also betting that people want to "see" the output before they commit it to a table for reporting to the CEO. I'll be sure to make the 'table-storage' download feature very prominent, in hopes it takes some of the heat off the other bits... -- Dave Lovering ----- Original Message ----- From: "Roger Roelofs" To: "[JavaScript List]" Sent: Monday, July 21, 2003 10:21 AM Subject: Re: [Javascript] Timing Issues > Dave, > > How about creating a separate link to allow the user to download the > data to an xml or text file. If they want to do reporting I'm betting > they are pasting/importing into a spreadsheet or reporting tool anyway. > > Roger, > > > On Monday, July 21, 2003, at 01:10 PM, David Lovering wrote: > > > Dear Chris: > > > > All good ideas. Unfortunately, in the former iteration I did have > > paging -- > > and got complaints from folks who wanted to print entire tables for > > reports > > without segmentation issues getting in the way of the layout. Business > > majors -- go figure. > > > > Although I'm certain the 'table per row' solution would work, the > > overhead > > would be extremely gruesome, and I'll hold that trick in reserve until > > I've > > exhausted everything else in the bag. > > > > Have you any experience with createElement to "grow" an already > > displayed > > table? How does this affect the background latency to load the whole > > table? > > > > The 'response.flush' feature might indeed work, particularly if I can > > force > > the event handler to act on it after the "build" of each record. > > Of course, since the screen geometry is set by "worst-case" TD > > widths/heights, the whole screen will jitter like a hornytoad on a > > hotplate > > as differing field lengths come pouring in. Hmmm... some testing is in > > order. > > > > -- Dave Lovering > > _______________________________________________ > 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 mdougherty at pbp.com Mon Jul 21 13:15:39 2003 From: mdougherty at pbp.com (Mike Dougherty) Date: Mon, 21 Jul 2003 14:15:39 -0400 Subject: [Javascript] Timing Issues In-Reply-To: <002101c34fb2$5ae69620$0600000a@elohim> Message-ID: <001101c34fb4$17973940$1702010a@IT23> Here's another idea: If the user is only looking at a few key fields in the browser, then only present those fields during the initial display. When they confirm the result set is what they really want, THEN compose the download for a bulk transfer. (like writing a data file, then redirecting the browser to an FTP download) The "look and feel" stage would be improved in relation to the amount of fields cut from the viewing process, and then the user is just going to have to learn that half a million records takes a while to send over the wire. (maybe they'll learn to write better queries) I'm not sure how PHP does buffering at the server, but in the ASP model there is a .flush method that causes the buffer to be sent to the browser each time it is executed. -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of David Lovering Sent: Monday, July 21, 2003 1:03 PM To: [JavaScript List] Subject: Re: [Javascript] Timing Issues *This message was transferred with a trial version of CommuniGate(tm) Pro* I'm afraid even though the data selection is made from the client side, the data upload is server-side driven, and it only knows what is in the query that was submitted to it. If a gazillion cells result from the query, the server is obliged to squirt them all upstream as fast as it is able. [Customer specs are a real pain, aren't they?] If we think the "flush" method might move the already constructed blocks onto the screen, I'm perfectly willing to try doing a flush after every record. That would certainly improve the appearance of the throughput, even though the total build time would be almost exactly the same. Just for kicks, does one do the refresh on the record, the table, or the window? (Or some baroque combination of all of them)... From david at amsresponse.com Mon Jul 21 14:17:05 2003 From: david at amsresponse.com (David Yee) Date: Mon, 21 Jul 2003 12:17:05 -0700 Subject: [Javascript] Set all list box drop downs to a single value Message-ID: Thanks Mike- this didn't work- it seems that loItem is not an object? -----Original Message----- From: Mike Dougherty [mailto:mdougherty at pbp.com] Sent: Monday, July 21, 2003 5:25 AM To: '[JavaScript List]' Subject: RE: [Javascript] Set all list box drop downs to a single value If you DON'T know the names, and you really do want ALL checkboxes do something like: var loCollection = document.getElementsByTagName("input") for (loItem in loCollection) { if ( loItem.type == "checkbox" ) { loItem.selectedIndex = 3; /* if there aren't 4 items, the first option is selected */ } } Note: I haven't tested this code, so your mileage my vary... -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of David Yee Sent: Friday, July 18, 2003 6:26 PM To: '[JavaScript List]' Subject: RE: [Javascript] Set all list box drop downs to a single value *This message was transferred with a trial version of CommuniGate(tm) Pro* Thanks Peter- that should work. -----Original Message----- From: Peter Brunone [mailto:peter at brunone.com] Sent: Friday, July 18, 2003 1:19 PM To: '[JavaScript List]' Subject: RE: [Javascript] Set all list box drop downs to a single value David, If you know the names of the checkboxes (BTW, it's a good idea not to start object names with integers, because it can confuse the scripting engine), you can just go through a loop like this: for (i=10001;i<=10003;i++) { var newCheckBox = eval("document.formName." + i + "[status]"); // selectedIndex is the index of the current option (in a zero-based array) newCheckBox.selectedIndex = 3; } This should get you started; let us know if you have more questions. Cheers, Peter -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of David Yee Hi- how can I set all the drop downs on my form to a single value with the click of a button? I've seen ways to do it with checkboxes but I'm not sure how to do it with drop downs. The names of the select box variables are in a number sequence e.g. Thanks for any help! David _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From costea.dan at ssi-schaefer.ro Thu Jul 24 09:09:31 2003 From: costea.dan at ssi-schaefer.ro (Dan Costea) Date: Thu, 24 Jul 2003 17:09:31 +0300 Subject: [Javascript] RegExp Message-ID: <015201c351ed$34ea86b0$addea8c0@pcdco> Hi, I have the regular expresion that is matching a positiv float number: var oReg = /^((\d+(\,\d*)?)|((\d*\,)?\d+))$/; How should I modify it to match a positiv float between 0 and 999? (for example, to match: 125 or 251,9 or 5). Thanks in advance, Dan Costea -------------- next part -------------- An HTML attachment was scrubbed... URL: From hassan at webtuitive.com Thu Jul 24 09:28:26 2003 From: hassan at webtuitive.com (Hassan Schroeder) Date: Thu, 24 Jul 2003 07:28:26 -0700 Subject: [Javascript] RegExp In-Reply-To: <015201c351ed$34ea86b0$addea8c0@pcdco> References: <015201c351ed$34ea86b0$addea8c0@pcdco> Message-ID: <3F1FED0A.9020509@webtuitive.com> Dan Costea wrote: > I have the regular expresion that is matching a positiv float number: > > var oReg = /^((\d+(\,\d*)?)|((\d*\,)?\d+))$/; > > How should I modify it to match a positiv float between 0 and 999? (for > example, to match: 125 or 251,9 or 5). var oReg = /^\d{1,3}$/; HTH -- though it feels wrong to be using a regexp on a number :-) -- Hassan Schroeder ----------------------------- hassan at webtuitive.com Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. From costea.dan at ssi-schaefer.ro Thu Jul 24 09:34:49 2003 From: costea.dan at ssi-schaefer.ro (Dan Costea) Date: Thu, 24 Jul 2003 17:34:49 +0300 Subject: [Javascript] RegExp References: <015201c351ed$34ea86b0$addea8c0@pcdco> <3F1FED0A.9020509@webtuitive.com> Message-ID: <016101c351f0$bcd93be0$addea8c0@pcdco> /^\d{1,3}$/ doesn't match 251,9 but I added (\,\d*)?), resulting: var oReg = /^(\d{1,3}(\,\d*)?)$/ and now it works OK! Thank you! ----- Original Message ----- From: "Hassan Schroeder" To: "[JavaScript List]" Sent: Thursday, July 24, 2003 5:28 PM Subject: Re: [Javascript] RegExp > Dan Costea wrote: > > > I have the regular expresion that is matching a positiv float number: > > > > var oReg = /^((\d+(\,\d*)?)|((\d*\,)?\d+))$/; > > > > How should I modify it to match a positiv float between 0 and 999? (for > > example, to match: 125 or 251,9 or 5). > > var oReg = /^\d{1,3}$/; > > HTH -- though it feels wrong to be using a regexp on a number :-) > -- > Hassan Schroeder ----------------------------- hassan at webtuitive.com > Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com > > dream. code. > > > > _______________________________________________ > Javascript mailing list > Javascript at LaTech.edu > https://lists.LaTech.edu/mailman/listinfo/javascript From hassan at webtuitive.com Thu Jul 24 09:41:52 2003 From: hassan at webtuitive.com (Hassan Schroeder) Date: Thu, 24 Jul 2003 07:41:52 -0700 Subject: [Javascript] RegExp In-Reply-To: <016101c351f0$bcd93be0$addea8c0@pcdco> References: <015201c351ed$34ea86b0$addea8c0@pcdco> <3F1FED0A.9020509@webtuitive.com> <016101c351f0$bcd93be0$addea8c0@pcdco> Message-ID: <3F1FF030.5040306@webtuitive.com> Dan Costea wrote: > /^\d{1,3}$/ doesn't match 251,9 but I added (\,\d*)?), resulting: var oReg > = /^(\d{1,3}(\,\d*)?)$/ and now it works OK! >>>How should I modify it to match a positiv float between 0 and 999? (for >>>example, to match: 125 or 251,9 or 5). ? Sorry, I read that as `125 or 251 or 9 or 5` -- how is "251,9" a float between 0 and 999? Disclaimer: I am no mathematician :-) -- Hassan Schroeder ----------------------------- hassan at webtuitive.com Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. From hassan at webtuitive.com Thu Jul 24 10:17:08 2003 From: hassan at webtuitive.com (Hassan Schroeder) Date: Thu, 24 Jul 2003 08:17:08 -0700 Subject: [Javascript] RegExp In-Reply-To: <3F1FF030.5040306@webtuitive.com> References: <015201c351ed$34ea86b0$addea8c0@pcdco> <3F1FED0A.9020509@webtuitive.com> <016101c351f0$bcd93be0$addea8c0@pcdco> <3F1FF030.5040306@webtuitive.com> Message-ID: <3F1FF874.3000804@webtuitive.com> Before the coffee fully took effect, I wrote: > ? Sorry, I read that as `125 or 251 or 9 or 5` -- how is "251,9" a > float between 0 and 999? float, not integer, OK, yeah -- sorry 'bout that :-) Sigh. I'd still think that something like var thisNum = parseFloat(targetString); if (( thisNum <= 999 ) && ( thisNum >= 0 )) { // do something } would be preferable, if only to eliminate locale issues like using "," instead of "." ... FWIW! -- Hassan Schroeder ----------------------------- hassan at webtuitive.com Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com dream. code. From mark.brand at elegalpublishing.com Sun Jul 27 20:47:41 2003 From: mark.brand at elegalpublishing.com (Mark Brand) Date: Mon, 28 Jul 2003 11:47:41 +1000 Subject: [Javascript] Widget Library Message-ID: <009501c354aa$3c5b8470$05e058cb@osiris> Hi: Does anyone have any recommendations for a GUI javascript library. That is, a library of widgets (tree, nav stuff, tabbed windows etc.) with a consistent look and feel. it can be either a commercial or open-source product. much appreciated, thanks mark brand From freshflavour at chello.se Mon Jul 28 15:09:18 2003 From: freshflavour at chello.se (LJ) Date: Mon, 28 Jul 2003 22:09:18 +0200 Subject: [Javascript] Submitting contents of form to file Message-ID: <5.2.1.1.0.20030728220858.00d55450@pop.chello.se> How do I go about making a script that will allow the visitor to submit the contents of an HTML form to a file? Regards, L Johansson From listuser at wjponline.com Mon Jul 28 20:55:02 2003 From: listuser at wjponline.com (J.R. Pitts) Date: Mon, 28 Jul 2003 21:55:02 -0400 Subject: [Javascript] Submitting contents of form to file In-Reply-To: <5.2.1.1.0.20030728220858.00d55450@pop.chello.se> Message-ID: To a file on the browser's hard drive? Can't be done using javascript. (Security) To a file on the server's hard drive? Need a server technology, such as ASP or Perl/CGI. Check one of the server tech newsgroups, or search for ASP or Perl or CGI. J.R. Pitts http://www.wjponline.com -----Original Message----- From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu]On Behalf Of LJ Sent: Monday, July 28, 2003 4:09 PM To: javascript at latech.edu Subject: [Javascript] Submitting contents of form to file How do I go about making a script that will allow the visitor to submit the contents of an HTML form to a file? Regards, L Johansson _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From nazirwa at sakinfotech.co.in Tue Jul 29 07:38:37 2003 From: nazirwa at sakinfotech.co.in (Nazir Wasim Ahmed) Date: Tue, 29 Jul 2003 18:08:37 +0530 Subject: [Javascript] Hiding select element In-Reply-To: <3F1FF874.3000804@webtuitive.com> Message-ID: Hello, I am Nazir. I am new to JavaScript. I would be grateful if any of the gurus cn help me out in this.
Thanx, Nazir From LMuchacho at twii.net Tue Jul 29 08:14:38 2003 From: LMuchacho at twii.net (Muchacho, Laurent (TWIi London)) Date: Tue, 29 Jul 2003 14:14:38 +0100 Subject: [Javascript] Hiding select element Message-ID: Hi Nazir try this http://www.elmuchacho.com/examples/hideSelect.htm I wrote this a while ago this might put you on the right direction. Laurent -----Original Message----- From: Nazir Wasim Ahmed [mailto:nazirwa at sakinfotech.co.in] Sent: 29 July 2003 13:39 To: [JavaScript List] Subject: [Javascript] Hiding select element Hello, I am Nazir. I am new to JavaScript. I would be grateful if any of the gurus cn help me out in this. Thanx, Nazir _______________________________________________ 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 freshflavour at chello.se Tue Jul 29 09:08:27 2003 From: freshflavour at chello.se (LJ) Date: Tue, 29 Jul 2003 16:08:27 +0200 Subject: [Javascript] Display results of form on new page Message-ID: <5.2.1.1.0.20030729160526.00cdfb20@pop.chello.se> I was afraid of that. Can I post the contents of a form to a new page? Then the user can choose to print it from there by himself/herself. Help!? Lars > >---------- > >To a file on the browser's hard drive? Can't be done using javascript. >(Security) > >To a file on the server's hard drive? Need a server technology, such as ASP >or Perl/CGI. Check one of the server tech newsgroups, or search for ASP or >Perl or CGI. > >J.R. Pitts >http://www.wjponline.com > >-----Original Message----- >Sent: Monday, July 28, 2003 4:09 PM >To: javascript at >latech.edu >Subject: [Javascript] Submitting contents of form to file > > >How do I go about making a script that will allow the visitor to submit the >contents of an HTML >form to a file? > >Regards, >L Johansson > From alan.easton at unn.ac.uk Tue Jul 29 09:52:16 2003 From: alan.easton at unn.ac.uk (Alan Easton) Date: Tue, 29 Jul 2003 15:52:16 +0100 Subject: [Javascript] Display results of form on new page Message-ID: <61B1A61B4F4AD711B3450008C791F6FA9691F1@clearwater.unn.ac.uk> You can use asp to do what you want to do. Look for help on ASP File System Object.....also, this page may help http://www.4guysfromrolla.com/webtech/040699-1.shtml You can also use JS to take the value of a form element from one page to another. I would personally use ASP, but JS might do you for now. Visit http://www.htmlgoodies.com/beyond/jspass.html for some guidance on how to do this. If you are going to start passing variables across many pages, and looking at more complex things, I would look at a server side language. Hope this helps, Alan... -----Original Message----- From: LJ [mailto:freshflavour at chello.se] Sent: 29 July 2003 15:08 To: javascript at latech.edu Subject: [Javascript] Display results of form on new page I was afraid of that. Can I post the contents of a form to a new page? Then the user can choose to print it from there by himself/herself. Help!? Lars > >---------- > >To a file on the browser's hard drive? Can't be done using javascript. >(Security) > >To a file on the server's hard drive? Need a server technology, such as ASP >or Perl/CGI. Check one of the server tech newsgroups, or search for ASP or >Perl or CGI. > >J.R. Pitts >http://www.wjponline.com > >-----Original Message----- >Sent: Monday, July 28, 2003 4:09 PM >To: javascript at >latech.edu >Subject: [Javascript] Submitting contents of form to file > > >How do I go about making a script that will allow the visitor to submit the >contents of an HTML >form to a file? > >Regards, >L Johansson > _______________________________________________ Javascript mailing list Javascript at LaTech.edu https://lists.LaTech.edu/mailman/listinfo/javascript From chriz at basken.com Thu Jul 31 15:37:50 2003 From: chriz at basken.com (Chris Basken) Date: Thu, 31 Jul 2003 16:37:50 -0400 Subject: [Javascript] printing blocks of text In-Reply-To: <61B1A61B4F4AD711B3450008C791F6FA9691F1@clearwater.unn.ac.u k> Message-ID: <5.2.0.9.0.20030731163424.0213d2e0@pop.avaloninteractive.com> Hey all, In Perl, you can do things like: print qq* BUNCH OF PLAIN TEXT HERE *; Is there a way to do something similar in JS? If I have line after line of HTML I want to write, I've usually just done lots of document.writes, but that involves escaping quotes and whatnot. Is there a better way? From javascriptlist at dandemutande.org Thu Jul 31 18:04:27 2003 From: javascriptlist at dandemutande.org (Paul) Date: Thu, 31 Jul 2003 16:04:27 -0700 Subject: [Javascript] Read/write html tag contents with Netscape Message-ID: <3.0.6.32.20030731160427.010f5bc0@mail.netidea.com> I need to read & write the text contained by named html tags. With recent Internet Explorers one can use innerText, i.e.: The desired text to read & write ... function ReadWriteText(argTagName){ alert(argTagName + ' contains ' + document.all.item(argTagName).innerText); document.all.item(argTagName).innerText = "New contents"; } How can I do this with Netscape? Is there more than one method, depending on Netscape/Javscript version? Thanks! Paul From andyg at ihug.co.nz Thu Jul 31 18:09:15 2003 From: andyg at ihug.co.nz (Andrew Gibson) Date: Fri, 1 Aug 2003 11:09:15 +1200 Subject: [Javascript] Read/write html tag contents with Netscape References: <3.0.6.32.20030731160427.010f5bc0@mail.netidea.com> Message-ID: <011201c357b8$c3bcdfc0$56e8adcb@k1n8i8> So far as I know document.getElementById(tagName).innerHTML would work, but not .innerText in Netscape.... Andrew Gibson ----- Original Message ----- From: Paul To: javascript at LaTech.edu Sent: Friday, August 01, 2003 11:04 AM Subject: [Javascript] Read/write html tag contents with Netscape I need to read & write the text contained by named html tags. With recent Internet Explorers one can use innerText, i.e.: The desired text to read & write ... function ReadWriteText(argTagName){ alert(argTagName + ' contains ' + document.all.item(argTagName).innerText); document.all.item(argTagName).innerText = "New contents"; } How can I do this with Netscape? Is there more than one method, depending on Netscape/Javscript version? Thanks! Paul From andyg at ihug.co.nz Thu Jul 31 18:10:37 2003 From: andyg at ihug.co.nz (Andrew Gibson) Date: Fri, 1 Aug 2003 11:10:37 +1200 Subject: [Javascript] Read/write html tag contents with Netscape References: <3.0.6.32.20030731160427.010f5bc0@mail.netidea.com> Message-ID: <011a01c357b8$f51ea0d0$56e8adcb@k1n8i8> I suppose you could do some fancy regular expression to strip away the tag, and so get your innerText eg var txt=element.innerHTML // get rid of tags ----- Original Message ----- From: Paul To: javascript at LaTech.edu Sent: Friday, August 01, 2003 11:04 AM Subject: [Javascript] Read/write html tag contents with Netscape I need to read & write the text contained by named html tags. With recent Internet Explorers one can use innerText, i.e.: The desired text to read & write ... function ReadWriteText(argTagName){ alert(argTagName + ' contains ' + document.all.item(argTagName).innerText); document.all.item(argTagName).innerText = "New contents"; } How can I do this with Netscape? Is there more than one method, depending on Netscape/Javscript version? Thanks! Paul From javascriptlist at dandemutande.org Thu Jul 31 21:28:42 2003 From: javascriptlist at dandemutande.org (Paul) Date: Thu, 31 Jul 2003 19:28:42 -0700 Subject: [Javascript] Read/write html tag contents with Netscape In-Reply-To: <011201c357b8$c3bcdfc0$56e8adcb@k1n8i8> References: <3.0.6.32.20030731160427.010f5bc0@mail.netidea.com> Message-ID: <3.0.6.32.20030731192842.00fc8890@mail.netidea.com> Thanks, Andrew. Unfortunately, I haven't been able to get your method to work with Netscape 4. This is as far as I've gotten; it works with IE 6 & Netscape 6 but fails on Netscape 4.7:

Old contents

Is there something wrong with the syntax "document.layers[argTagName].document"? What technique can I use with Netscape 4? Thanks! Paul At 11:09 AM 8/1/2003 +1200, you wrote: >So far as I know document.getElementById(tagName).innerHTML would work, but >not .innerText in Netscape.... > >Andrew Gibson > >----- Original Message ----- >From: Paul >To: javascript at LaTech.edu >Sent: Friday, August 01, 2003 11:04 AM >Subject: [Javascript] Read/write html tag contents with Netscape > > >I need to read & write the text contained by named html tags. > >With recent Internet Explorers one can use innerText, i.e.: > >The desired text to read & write >... >function ReadWriteText(argTagName){ >alert(argTagName + ' contains ' + document.all.item(argTagName).innerText); >document.all.item(argTagName).innerText = "New contents"; >} > >How can I do this with Netscape? Is there more than one method, depending >on Netscape/Javscript version? > >Thanks! >Paul > > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript > From webmaster at bizmaxsoftware.com Thu Jul 31 22:45:05 2003 From: webmaster at bizmaxsoftware.com (Rick Warren) Date: Thu, 31 Jul 2003 23:45:05 -0400 Subject: [Javascript] Changing INPUT values in forms after submit is pushed Message-ID: I have a form that uses an onsubmit to validate the data and calculate options selected in the form. I need to pass the calculated value back to an INPUT tag's value to be sent to a CGI script. I use something similar to f.tag.value = calc_value where calc_value is the calculated value my validation/ calculation script generates. When the data makes it over to my cgi program, the tag value is null. What's wrong??? -------------- next part -------------- An HTML attachment was scrubbed... URL: From andyg at ihug.co.nz Thu Jul 31 22:47:30 2003 From: andyg at ihug.co.nz (Andrew Gibson) Date: Fri, 1 Aug 2003 15:47:30 +1200 Subject: [Javascript] Read/write html tag contents with Netscape References: <3.0.6.32.20030731160427.010f5bc0@mail.netidea.com> <3.0.6.32.20030731192842.00fc8890@mail.netidea.com> Message-ID: <003a01c357df$a33fd960$25e7adcb@k1n8i8> as far as I know, .innerHTML def doesn't work below NS6 ----- Original Message ----- From: Paul To: [JavaScript List] Sent: Friday, August 01, 2003 2:28 PM Subject: Re: [Javascript] Read/write html tag contents with Netscape Thanks, Andrew. Unfortunately, I haven't been able to get your method to work with Netscape 4. This is as far as I've gotten; it works with IE 6 & Netscape 6 but fails on Netscape 4.7:

Old contents

Is there something wrong with the syntax "document.layers[argTagName].document"? What technique can I use with Netscape 4? Thanks! Paul At 11:09 AM 8/1/2003 +1200, you wrote: >So far as I know document.getElementById(tagName).innerHTML would work, but >not .innerText in Netscape.... > >Andrew Gibson > >----- Original Message ----- >From: Paul >To: javascript at LaTech.edu >Sent: Friday, August 01, 2003 11:04 AM >Subject: [Javascript] Read/write html tag contents with Netscape > > >I need to read & write the text contained by named html tags. > >With recent Internet Explorers one can use innerText, i.e.: > >The desired text to read & write >... >function ReadWriteText(argTagName){ >alert(argTagName + ' contains ' + document.all.item(argTagName).innerText); >document.all.item(argTagName).innerText = "New contents"; >} > >How can I do this with Netscape? Is there more than one method, depending >on Netscape/Javscript version? > >Thanks! >Paul > > >_______________________________________________ >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