From harvester at lists.evolt.org Mon Apr 3 00:00:23 2006 From: harvester at lists.evolt.org (harvester at lists.evolt.org) Date: 3 Apr 2006 00:00:23 -0500 Subject: [thelist] Tip Harvest for the Week of Monday Mar 27, 2006 Message-ID: <20060403050023.26309.qmail@tempest.evolt.org> The tip harvest for the Week of Monday Mar 27, 2006 has been added to the lists.evolt.org site. Get it at: http://lists.evolt.org/harvest/show.cgi?w=20060327 Week at a glance listing at: http://lists.evolt.org/harvest/week.cgi?w=20060327 Harvest Summary --------------- Number of messages: 206 Number of tips : 4 Tip Authors ----------- bird (1) Christian Heilmann (1) John Brooking (1) kasimir-k (1) Tip Types --------- example domain names (1) Isolating code bugs (1) JavaScript (1) photoshop (1) ------------------------------------------------------------------------------ What: Tips are how a list subscriber "pays" for making an off-topic post to the list (see List Info for more information). Of course, this does not make off-topic posts acceptable. :) How : You include a tip in your posting by using the [tip]...[/tip] tag (replace the square brackets with angle brackets). The tip tag takes the optional attributes of 'type' and 'author'. From lee.kowalkowski at googlemail.com Mon Apr 3 03:07:10 2006 From: lee.kowalkowski at googlemail.com (Lee kowalkowski) Date: Mon, 3 Apr 2006 09:07:10 +0100 Subject: [thelist] hidden span breaks form value? In-Reply-To: References: Message-ID: <610592c90604030107y55b9fbe8y5468d8a86631f405@mail.gmail.com> On 01/04/06, Canfield, Joel wrote: > > value="Data_Entry_Error" onclick="toggleVis('deerror',this);" /> Well, what does the toggleVis function do exactly? On the other radio buttons, you're passing it a string, but this time, your passing it the whole input element. -- LK From codepo8 at gmail.com Mon Apr 3 04:37:17 2006 From: codepo8 at gmail.com (Christian Heilmann) Date: Mon, 3 Apr 2006 10:37:17 +0100 Subject: [thelist] Script for M$IE only, or not In-Reply-To: References: <442EF509.9060205@ij.net> <200604020022.55554.richard.bennett@skynet.be> <442F941E.6000403@zstudio.co.uk> Message-ID: <30bd6ffd0604030237q4d37bb1dkc3b314b14091f4d8@mail.gmail.com> > > if (document.all) { > > Rumor has it that new versions of Firefox support document.all syntax. > Though I'm not sure. > Anyway, why should you write vendor-specific css since most of the modern > browsers display almost identical if you treat them good enough. document.all is supported by Mozilla but only in part: http://weblogs.asp.net/jgalloway/archive/2005/08/07/421798.aspx http://mozillanews.org/?article_date=2004-07-23+18-06-59 (aahhhrghh animated favicon!!!) The only bullet proof way seems to be conditional comments: and then check for isIE if(isIE){alert('CSS transition filters, coloured scrollbars, tigers, elephants, yay!');} Dirty mixing of structure and behaviour though. The other suggestion of picking one of the more obscure MSIE only objects makes more sense, but then again browser sniffing doesn't make much sense anyways. HTH Chris -- Chris Heilmann Blog: http://www.wait-till-i.com Writing: http://icant.co.uk/ Binaries: http://www.onlinetools.org/ From richard.bennett at skynet.be Mon Apr 3 04:38:19 2006 From: richard.bennett at skynet.be (Richard Bennett) Date: Mon, 3 Apr 2006 11:38:19 +0200 Subject: [thelist] client to post video In-Reply-To: <005b01c656ae$2f37c480$2002a8c0@2GHZDADSXP> References: <029c01c653fe$83f5cb00$6400a8c0@nnepacorp.com> <98C4FC06-76D9-49E3-8B3A-8B7AB235D0E2@loudjoy.com> <005b01c656ae$2f37c480$2002a8c0@2GHZDADSXP> Message-ID: <200604031138.19921.richard.bennett@skynet.be> On Monday 03 April 2006 01:35, Daryl Brown wrote: > benefits: 95% install on web connected PC's around the world, no > proprietary player required, Firstly, Flash IS proprietary software that you are requiring. Secondly, I don't know how they find 95% Flash 7 players on a survey... or 89% Java penetration in the same survey - that's plain crazy. Anyone dealing with customers knows that you have to ask them whether they click a blue 'i' to open their internet program because they have no idea at all what they are using, and don't even know what a browser is. So I figure the second question on the flash penetration survey: http://www.macromedia.com/software/flash/survey/npd_survey/2_info.html is pretty sure to weed-out any non-technical users. I have about 10 computers I manage here, each have 2 or 3 browsers in use, being Opera, Firefox and Konqueror . None of those 25 browsers have Flash 8, and maybe 3 have Flash 7. All of the computers have a stand-alone media player. The reason for that is that it is only Internet Explorer that constantly bugs you with alerts if Flash is not installed - other browsers just display a yellow field where the Flash was embedded. So this means much less irritating advertising on the internet. OK, I'm probably that 5% left over in the survey. I guess that is why they don't claim 100% penetration. Anyway, I'm not saying you should not use your embedded flash players, by all means do, but don't suppose that everyone has chosen to install or upgrade to that particular plugin, and can actually see the content. You can simply offer a link under the flash movie pointing to the mpeg file "Open in stand alone player". That way people can also download the movie, and they have a choice of which viewer they would like to use. Ok, rant over. Richard. Need to do remote user administration often, from different locations? vnc repeater lets you send the client a small pre-configured file they click to connect to you. You host the repeater on a server,and both client and operator can be behind a nat firewall, without configuring anything. http://ultravnc.sourceforge.net/addons/repeater.html From rich at richpoints.com Mon Apr 3 07:43:42 2006 From: rich at richpoints.com (Rich Points) Date: Mon, 03 Apr 2006 06:43:42 -0600 Subject: [thelist] Browser wants to download pages rather than browse them Message-ID: <4431187E.3050207@richpoints.com> Hi, I just moved this site to a new host, http://clubsauce.com . When I browse the site I keep getting asked if I want to download and save the pages I'm browsing to. I don't know why this is happening. I'm using SSI on this site and have the .htaccess file configured as follows AddType text/html .html .htm AddType text/x-server-parsed-html .shtml .sht How can I fix this? thanks Rich From ian at zstudio.co.uk Mon Apr 3 08:06:57 2006 From: ian at zstudio.co.uk (Ian Anderson) Date: Mon, 03 Apr 2006 14:06:57 +0100 Subject: [thelist] Script for M$IE only, or not In-Reply-To: <30bd6ffd0604030237q4d37bb1dkc3b314b14091f4d8@mail.gmail.com> References: <442EF509.9060205@ij.net> <200604020022.55554.richard.bennett@skynet.be> <442F941E.6000403@zstudio.co.uk> <30bd6ffd0604030237q4d37bb1dkc3b314b14091f4d8@mail.gmail.com> Message-ID: <44311DF1.6050703@zstudio.co.uk> Christian Heilmann wrote: > document.all is supported by Mozilla but only in part: > http://weblogs.asp.net/jgalloway/archive/2005/08/07/421798.aspx > http://mozillanews.org/?article_date=2004-07-23+18-06-59 (aahhhrghh > animated favicon!!!) Holy cow. Luckily, "So Firefox supports document.all, but says it doesn't. That means it can evaluate document.all['elementName'], but alert(document.all) shows false." Sweet mother of moses, what a palaver. Cheers Ian -- _________________________________________________ zStudio - Web development and accessibility http://zStudio.co.uk Snippetz.net - Online code library File, manage and re-use your code snippets & links http://snippetz.net From dan at virtuawebtech.co.uk Mon Apr 3 08:09:28 2006 From: dan at virtuawebtech.co.uk (Dan Parry) Date: Mon, 3 Apr 2006 14:09:28 +0100 Subject: [thelist] Browser wants to download pages rather than browse them In-Reply-To: <4431187E.3050207@richpoints.com> Message-ID: <20060403130931.50ECF56064A@virtuawebtech.co.uk> The file I downloaded doesn't appear to have any extension at all... If this is the case there is the problem :) HTH Dan ----------------------------------------------------- Dan Parry Senior Developer Virtua Webtech Ltd http://www.virtuawebtech.co.uk -----Original Message----- From: thelist-bounces at lists.evolt.org [mailto:thelist-bounces at lists.evolt.org] On Behalf Of Rich Points Sent: 03 April 2006 13:44 To: thelist Subject: [thelist] Browser wants to download pages rather than browse them Hi, I just moved this site to a new host, http://clubsauce.com . When I browse the site I keep getting asked if I want to download and save the pages I'm browsing to. I don't know why this is happening. I'm using SSI on this site and have the .htaccess file configured as follows AddType text/html .html .htm AddType text/x-server-parsed-html .shtml .sht How can I fix this? thanks Rich -- * * Please support the community that supports you. * * http://evolt.org/help_support_evolt/ For unsubscribe and other options, including the Tip Harvester and archives of thelist go to: http://lists.evolt.org Workers of the Web, evolt ! __________ NOD32 1.1454 (20060321) Information __________ This message was checked by NOD32 antivirus system. http://www.eset.com From rich at richpoints.com Mon Apr 3 08:20:18 2006 From: rich at richpoints.com (Rich Points) Date: Mon, 03 Apr 2006 07:20:18 -0600 Subject: [thelist] Browser wants to download pages rather than browse them In-Reply-To: <20060403130931.50ECF56064A@virtuawebtech.co.uk> References: <20060403130931.50ECF56064A@virtuawebtech.co.uk> Message-ID: <44312112.1010701@richpoints.com> It should have a .shtml file extension, you will get the same thing if you go to http://clubsauce.com/index.shtml Also here are all the lines for the SSI in my .htaccess RewriteEngine On RewriteBase / Options +Includes AddType text/html .html .htm AddType text/x-server-parsed-html .shtml .sht Thanks Rich Dan Parry wrote: >The file I downloaded doesn't appear to have any extension at all... If this >is the case there is the problem :) > >HTH > >Dan > >----------------------------------------------------- >Dan Parry >Senior Developer >Virtua Webtech Ltd >http://www.virtuawebtech.co.uk >-----Original Message----- >From: thelist-bounces at lists.evolt.org >[mailto:thelist-bounces at lists.evolt.org] On Behalf Of Rich Points >Sent: 03 April 2006 13:44 >To: thelist >Subject: [thelist] Browser wants to download pages rather than browse them > >Hi, >I just moved this site to a new host, http://clubsauce.com . When I >browse the site I keep getting asked if I want to download and save the >pages I'm browsing to. I don't know why this is happening. > >I'm using SSI on this site and have the .htaccess file configured as follows > >AddType text/html .html .htm >AddType text/x-server-parsed-html .shtml .sht > > >How can I fix this? > >thanks >Rich > > From morrison.ben at gmail.com Mon Apr 3 08:25:25 2006 From: morrison.ben at gmail.com (ben morrison) Date: Mon, 3 Apr 2006 14:25:25 +0100 Subject: [thelist] Browser wants to download pages rather than browse them In-Reply-To: <4431187E.3050207@richpoints.com> References: <4431187E.3050207@richpoints.com> Message-ID: <6073aef90604030625u20225f66v42da6965027be692@mail.gmail.com> On 4/3/06, Rich Points wrote: > Hi, > I just moved this site to a new host, http://clubsauce.com . When I > browse the site I keep getting asked if I want to download and save the > pages I'm browsing to. I don't know why this is happening. > > I'm using SSI on this site and have the .htaccess file configured as follows > > AddType text/html .html .htm > AddType text/x-server-parsed-html .shtml .sht > How can I fix this? So it works in Explorer, but firefox asks for you to save/open it. My guess would be that this is the main problem with using XHTML and IE6 does not support application/xhtml+xml Although i know nothing of server settings. Ben From rich at richpoints.com Mon Apr 3 08:39:16 2006 From: rich at richpoints.com (Rich Points) Date: Mon, 03 Apr 2006 07:39:16 -0600 Subject: [thelist] Browser wants to download pages...SOVED In-Reply-To: <6073aef90604030625u20225f66v42da6965027be692@mail.gmail.com> References: <4431187E.3050207@richpoints.com> <6073aef90604030625u20225f66v42da6965027be692@mail.gmail.com> Message-ID: <44312584.7070103@richpoints.com> I just took those lines out of my .htaccess file and now it's working :-) Thanks to those who looked at it Rich From misterhaan at track7.org Mon Apr 3 08:43:39 2006 From: misterhaan at track7.org (misterhaan) Date: Mon, 03 Apr 2006 08:43:39 -0500 Subject: [thelist] Browser wants to download pages rather than browse them In-Reply-To: <4431187E.3050207@richpoints.com> References: <4431187E.3050207@richpoints.com> Message-ID: <4431268B.3010000@track7.org> When I browse to your site with Firefox I get a download window saying the file is a text/x-server-parsed-html, which means that is what the server is sending in the Content-Type header. You might need to bug the host to get them to send something more appropriate (like text/html), unless there's a way to specify the header using SSI. Rich Points wrote: > Hi, > I just moved this site to a new host, http://clubsauce.com . When I > browse the site I keep getting asked if I want to download and save the > pages I'm browsing to. From ccollins at loudjoy.com Mon Apr 3 08:50:26 2006 From: ccollins at loudjoy.com (Christy Collins) Date: Mon, 3 Apr 2006 09:50:26 -0400 Subject: [thelist] client to post video In-Reply-To: <200604031138.19921.richard.bennett@skynet.be> References: <029c01c653fe$83f5cb00$6400a8c0@nnepacorp.com> <98C4FC06-76D9-49E3-8B3A-8B7AB235D0E2@loudjoy.com> <005b01c656ae$2f37c480$2002a8c0@2GHZDADSXP> <200604031138.19921.richard.bennett@skynet.be> Message-ID: Is an mpeg file viewable in any stand alone player? Mac or PC? -Christy On Apr 3, 2006, at 5:38 AM, Richard Bennett wrote: > You can simply offer a link under the flash movie pointing to the > mpeg file > "Open in stand alone player". > That way people can also download the movie, and they have a choice > of which > viewer they would like to use. From JCanfield at PacAdvantage.org Mon Apr 3 10:03:49 2006 From: JCanfield at PacAdvantage.org (Canfield, Joel) Date: Mon, 3 Apr 2006 08:03:49 -0700 Subject: [thelist] hidden span breaks form value? Message-ID: > On 01/04/06, Canfield, Joel wrote: > > > value="Data_Entry_Error" onclick="toggleVis('deerror',this);" /> > > Well, what does the toggleVis function do exactly? On the other radio > buttons, you're passing it a string, but this time, your > passing it the whole input element. Here's toggleVis in its entirety: function toggleVis(toggleID,clickedID) { if (clickedID.checked == true) { document.getElementById(toggleID).style.visibility = "visible"; } else { document.getElementById(toggleID).style.visibility = "hidden"; } } This use of toggleVis, just above the one in question, works as expected, using 'this': Problem Request Project

which is why I suspect something about the hidden span, but can't find anything to confirm or explain. thanks joel From mrmazda at ij.net Mon Apr 3 10:07:25 2006 From: mrmazda at ij.net (Felix Miata) Date: Mon, 03 Apr 2006 11:07:25 -0400 Subject: [thelist] Script for M$IE only, or not In-Reply-To: <442EF509.9060205@ij.net> References: <442EF509.9060205@ij.net> Message-ID: <44313A2D.20709@ij.net> On 06/04/01 16:47 Felix Miata apparently typed: > My understanding of JS is next to 0, so every time I want to do the > simplest thing I haven't done before I have to go struggle through some > tutorial, this time at http://www.quirksmode.org/. Again, I'm getting > nowhere with something that seems it should be simple. I just want to > throw an alert based upon whether the browser is really IE or any other > browser. It seems object detection is the way to go, but I'm not finding > a suitable object to detect. Someone suggested window.ActiveXControl but > NAICT it seems that that is an option that can be disabled and so > wouldn't be suitable. Can anyone help? FWIW, the URL in my .sig below is the page for which I asked. Opening it with IE should make evident why I only want the event to occur if the visitor is really using IE and not some impostor like Opera. The current possibly too simple solution actually came from a discussion on irc://moznet/js and will most likely need revision when IE7 goes GA, and that presumes I won't change my mind about the whole idea before that happens. Comments welcome, particularly if you have ideas about who you think the target audience for the page is. What actually triggered my idea for it in the first place is the core of http://mrmazda.no-ip.com/css/colstyle.css which as yet I use only on 4 pages. -- "Have nothing to do with the fruitless deeds of darkness, but rather expose them." Ephesians 5:11 NIV Team OS/2 ** Reg. Linux User #211409 Felix Miata *** http://mrmazda.no-ip.com/auth/auth From mwarden at gmail.com Mon Apr 3 10:39:19 2006 From: mwarden at gmail.com (Matt Warden) Date: Mon, 03 Apr 2006 11:39:19 -0400 Subject: [thelist] hidden span breaks form value? In-Reply-To: References: Message-ID: <443141A7.1000809@gmail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Canfield, Joel wrote: >>On 01/04/06, Canfield, Joel wrote: >> >>> >>value="Data_Entry_Error" onclick="toggleVis('deerror',this);" /> >> >>Well, what does the toggleVis function do exactly? On the other radio >>buttons, you're passing it a string, but this time, your >>passing it the whole input element. > > > Here's toggleVis in its entirety: > > function toggleVis(toggleID,clickedID) > { > if (clickedID.checked == true) clickedID is a string. This should be: if (document.getElementById(clickedID) && document.getElementById(clickedID).checked == true) > class="rdospace" onclick="toggleVis('impactdiv',this);" /> Project

Well, in this one you are passing the object. All the other times you're calling toggleVis you're passing the ID. I don't remember your original issue, but could that be causing it? - -- Matt Warden Miami University Oxford, OH, USA http://mattwarden.com This email proudly and graciously contributes to entropy. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFEMUGnrI3LObhzHRMRAu6NAJ4+h+1EL9eJB530QuXsbG4M7FNiNACgjJ6v Vcke87HKyJpOvkwiY8PyCTY= =3363 -----END PGP SIGNATURE----- From JCanfield at PacAdvantage.org Mon Apr 3 10:44:31 2006 From: JCanfield at PacAdvantage.org (Canfield, Joel) Date: Mon, 3 Apr 2006 08:44:31 -0700 Subject: [thelist] hidden span breaks form value? Message-ID: > > value="Project" > > class="rdospace" onclick="toggleVis('impactdiv',this);" /> > Project

> > Well, in this one you are passing the object. All the other > times you're > calling toggleVis you're passing the ID. I don't remember > your original > issue, but could that be causing it? This is the instance that's working. Another instance, followed by a hidden span, is failing. I'll investigate the difference between handling the object vs. passing a string, but I still suspect it's where they're different that it's breaking. joel From richard.bennett at skynet.be Mon Apr 3 10:45:23 2006 From: richard.bennett at skynet.be (Richard Bennett) Date: Mon, 3 Apr 2006 17:45:23 +0200 Subject: [thelist] client to post video In-Reply-To: References: <029c01c653fe$83f5cb00$6400a8c0@nnepacorp.com> <200604031138.19921.richard.bennett@skynet.be> Message-ID: <200604031745.23177.richard.bennett@skynet.be> On Monday 03 April 2006 15:50, Christy Collins wrote: > Is an mpeg file viewable in any stand alone player? ?Mac or PC? Not sure about 'any', but i have always been able to play them without problems, which I cannot say for .mov, .avi, .wmv, .swf and others. The main difference is that mpeg videos are downloaded, and then played (this sometimes happens in the browser if you have a plugin installed) while other formats will stream (they start playing when part of the file has been buffered), but are not so portable, across platforms or browsers. http://www.w3schools.com/media/media_videoformats.asp If you can, I would use whatever format you prefer, and then offer mpeg as an additional option for users to download if your solution doesn't work for them. Cheers, Richard. From codepo8 at gmail.com Mon Apr 3 11:09:35 2006 From: codepo8 at gmail.com (Christian Heilmann) Date: Mon, 3 Apr 2006 17:09:35 +0100 Subject: [thelist] Script for M$IE only, or not In-Reply-To: <44313A2D.20709@ij.net> References: <442EF509.9060205@ij.net> <44313A2D.20709@ij.net> Message-ID: <30bd6ffd0604030909hcfba133l3afb25d045b3c3a@mail.gmail.com> > FWIW, the URL in my .sig below is the page for which I asked. Opening it > with IE should make evident why I only want the event to occur if the > visitor is really using IE and not some impostor like Opera. http://mrmazda.no-ip.com/js/iebad.js is soo 1990ies. What about users who cannot change their browser as their company dictates the IT environment? A practice like this is as arrogant and obtrusive as a "only for MSIE and 1024x768 resolution" message. From Conleyj at kubota-kma.com Mon Apr 3 11:15:10 2006 From: Conleyj at kubota-kma.com (James Conley) Date: Mon, 3 Apr 2006 12:15:10 -0400 Subject: [thelist] Script for M$IE only, or not Message-ID: As it currently stands you could just as well write the words "I hate IE. If you are using IE then go away" and it would be no less IE friendly. While I understand the reasoning for your message a pop-up box worded as such is less than friendly. Perhaps some header text would be more appropriate. Another thought - what if a user is using Firefox but is planning on implementing something that needs to be IE friendly. James c. -----Original Message----- From: thelist-bounces at lists.evolt.org [mailto:thelist-bounces at lists.evolt.org] On Behalf Of Felix Miata Sent: Monday, April 03, 2006 11:07 AM To: thelist at lists.evolt.org Subject: Re: [thelist] Script for M$IE only, or not On 06/04/01 16:47 Felix Miata apparently typed: > My understanding of JS is next to 0, so every time I want to do the > simplest thing I haven't done before I have to go struggle through > some tutorial, this time at http://www.quirksmode.org/. Again, I'm > getting nowhere with something that seems it should be simple. I just > want to throw an alert based upon whether the browser is really IE or > any other browser. It seems object detection is the way to go, but I'm > not finding a suitable object to detect. Someone suggested > window.ActiveXControl but NAICT it seems that that is an option that > can be disabled and so wouldn't be suitable. Can anyone help? FWIW, the URL in my .sig below is the page for which I asked. Opening it with IE should make evident why I only want the event to occur if the visitor is really using IE and not some impostor like Opera. The current possibly too simple solution actually came from a discussion on irc://moznet/js and will most likely need revision when IE7 goes GA, and that presumes I won't change my mind about the whole idea before that happens. Comments welcome, particularly if you have ideas about who you think the target audience for the page is. What actually triggered my idea for it in the first place is the core of http://mrmazda.no-ip.com/css/colstyle.css which as yet I use only on 4 pages. -- "Have nothing to do with the fruitless deeds of darkness, but rather expose them." Ephesians 5:11 NIV Team OS/2 ** Reg. Linux User #211409 Felix Miata *** http://mrmazda.no-ip.com/auth/auth From Conleyj at kubota-kma.com Mon Apr 3 11:17:49 2006 From: Conleyj at kubota-kma.com (James Conley) Date: Mon, 3 Apr 2006 12:17:49 -0400 Subject: [thelist] Script for M$IE only, or not Message-ID: RE the "only for ...1024x768 resolution" I always hate those. There is no reason other than laziness to design a site that *must* be viewed at 1024x768. James c. -----Original Message----- From: thelist-bounces at lists.evolt.org [mailto:thelist-bounces at lists.evolt.org] On Behalf Of Christian Heilmann Sent: Monday, April 03, 2006 12:10 PM To: thelist at lists.evolt.org Subject: Re: [thelist] Script for M$IE only, or not > FWIW, the URL in my .sig below is the page for which I asked. Opening > it with IE should make evident why I only want the event to occur if > the visitor is really using IE and not some impostor like Opera. http://mrmazda.no-ip.com/js/iebad.js is soo 1990ies. What about users who cannot change their browser as their company dictates the IT environment? A practice like this is as arrogant and obtrusive as a "only for MSIE and 1024x768 resolution" message. -- * * Please support the community that supports you. * * http://evolt.org/help_support_evolt/ For unsubscribe and other options, including the Tip Harvester and archives of thelist go to: http://lists.evolt.org Workers of the Web, evolt ! From codepo8 at gmail.com Mon Apr 3 11:50:47 2006 From: codepo8 at gmail.com (Christian Heilmann) Date: Mon, 3 Apr 2006 17:50:47 +0100 Subject: [thelist] client to post video In-Reply-To: <200604031745.23177.richard.bennett@skynet.be> References: <029c01c653fe$83f5cb00$6400a8c0@nnepacorp.com> <200604031138.19921.richard.bennett@skynet.be> <200604031745.23177.richard.bennett@skynet.be> Message-ID: <30bd6ffd0604030950q942ce13y8e1aa8375095ee49@mail.gmail.com> > > Is an mpeg file viewable in any stand alone player? Mac or PC? There is a significant difference between mpg (MPEG-1) as used in VCDs and MPEG-2 as used in DVDs. Simply renaming the file is not enough. If you don't have a DVD decoder installed on the computer (which is something that comes with DVD player software like WinDVD) then you cannot play MPEG-2 files. A really cool tool for converting DVDs to usable formats - especially for the web and also ipods and other mobile gadget is mpegstreamclip which is available for both PC and Mac: http://www.apple.com/downloads/macosx/video/mpegstreamclip.html A PC only tool that is sickeninly versatile when it comes to conversion formats is SUPER http://www.erightsoft.com/Superdt.html (yes, the site navigation is less than super). Before using streamclip I did all my conversion stuff with XMPEG: http://www.xmpeg.net/website/ Beware that there are 34325435435234123 different conversion programs out there (rough estimate), and that 97.384% are total rubbish (actual fact) and not worth their money. HTH Chris -- Chris Heilmann Blog: http://www.wait-till-i.com Writing: http://icant.co.uk/ Binaries: http://www.onlinetools.org/ From mrmazda at ij.net Mon Apr 3 13:31:30 2006 From: mrmazda at ij.net (Felix Miata) Date: Mon, 03 Apr 2006 14:31:30 -0400 Subject: [thelist] Script for M$IE only, or not In-Reply-To: <30bd6ffd0604030909hcfba133l3afb25d045b3c3a@mail.gmail.com> References: <442EF509.9060205@ij.net> <44313A2D.20709@ij.net> <30bd6ffd0604030909hcfba133l3afb25d045b3c3a@mail.gmail.com> Message-ID: <44316A02.5040901@ij.net> On 06/04/03 12:09 Christian Heilmann apparently typed: > Felix Miata wrote: >> FWIW, the URL in my .sig below is the page for which I asked. Opening it >> with IE should make evident why I only want the event to occur if the >> visitor is really using IE and not some impostor like Opera. > http://mrmazda.no-ip.com/js/iebad.js is soo 1990ies. What about users > who cannot change their browser as their company dictates the IT > environment? A practice like this is as arrogant and obtrusive as a > "only for MSIE and 1024x768 resolution" message. Obtrusive, no doubt. Arrogant, maybe. Might depend on who is expected to see it and when. At least for now, it's only called by one page. Did you even consider my last paragraph? In particular: "particularly if you have ideas about who you think the target audience for the page is." It's not intended for the general web population, but rather, a subset that includes almost entirely site designers and reviewers, particularly n00bs who design first or exclusively in IE instead of a standards-compliant browser. I thought about including a similar message on an about this site page, but I really don't think making it easily accessible to those to whom it isn't relevant is a better option. -- "Have nothing to do with the fruitless deeds of darkness, but rather expose them." Ephesians 5:11 NIV Team OS/2 ** Reg. Linux User #211409 Felix Miata *** http://mrmazda.no-ip.com/auth/auth From mrmazda at ij.net Mon Apr 3 13:27:44 2006 From: mrmazda at ij.net (Felix Miata) Date: Mon, 03 Apr 2006 14:27:44 -0400 Subject: [thelist] Script for M$IE only, or not In-Reply-To: References: Message-ID: <44316920.5040504@ij.net> A: Top-posters who don't trim mailing list footers and .sigs. Q: What's the 2nd most annoying thing on usenet and in e-mail? A: Because it breaks the logical sequence of the discussion. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail? On 06/04/03 12:15 James Conley apparently typed: > From: Felix Miata > Comments welcome, particularly if you have ideas about who you think the > target audience for the page is. What actually triggered my idea for it > in the first place is the core of > http://mrmazda.no-ip.com/css/colstyle.css which as yet I use only on 4 > pages. > While I understand the reasoning for your message a pop-up box worded as > such is less than friendly. Which was the reason for the above, looking for impressions/discussion about the language. > Perhaps some header text would be more > appropriate. You mean something non-M$IE users could easily see with styles turned off or unsupported in their UA? > Another thought - what if a user is using Firefox but is > planning on implementing something that needs to be IE friendly. How might that matter? That alert is not intended to be used site-wide. -- "Have nothing to do with the fruitless deeds of darkness, but rather expose them." Ephesians 5:11 NIV Team OS/2 ** Reg. Linux User #211409 Felix Miata *** http://mrmazda.no-ip.com/auth/auth From jdowdell at adobe.com Mon Apr 3 14:04:29 2006 From: jdowdell at adobe.com (John Dowdell) Date: Mon, 03 Apr 2006 12:04:29 -0700 Subject: [thelist] Convert DVD video to the web In-Reply-To: <4s3lvb$ct90tv@ozemail-mail.icp-qv1-irony1.iinet.net.au> References: <4s3lvb$ct90tv@ozemail-mail.icp-qv1-irony1.iinet.net.au> Message-ID: <443171BD.6000304@adobe.com> Justin Zachan wrote: > ... somehow I need > to convert the DVD files to a format that I can import into Flash... > On the DVD there are a bunch of file types but mostly .VOB files... > So I guess the question is, what is the best method to convert this > movie...??? I haven't tested the various third-party solutions, but searches on both "vob to flv" and "dvd to flv" turn up translation utilities. (I've heard many recommend Riva Video Encoder at rivavx.com, but I don't know if it matches your content's filetypes.) jd -- John Dowdell . Adobe Developer Support . San Francisco CA USA Weblog: http://weblogs.macromedia.com/jd Aggregator: http://weblogs.macromedia.com/mxna Technotes: http://www.macromedia.com/support/ Spam killed my private email -- public record is best, thanks. From Conleyj at kubota-kma.com Mon Apr 3 14:19:00 2006 From: Conleyj at kubota-kma.com (James Conley) Date: Mon, 3 Apr 2006 15:19:00 -0400 Subject: [thelist] Script for M$IE only, or not Message-ID: >> While I understand the reasoning for your message a pop-up box worded >> as such is less than friendly. >Which was the reason for the above, looking for impressions/discussion about the language. In that case my suggestion is to avoid pop-up boxes like the plague. >> Perhaps some header text would be more appropriate. >You mean something non-M$IE users could easily see with styles turned off or unsupported in their UA? Something that ALL web users could easily see regardless of their browser. >> Another thought - what if a user is using Firefox but is planning on >> implementing something that needs to be IE friendly. >How might that matter? That alert is not intended to be used site-wide. I obviously misunderstood the context of your material. I thought your site listed resources for website designers/ coders/etc. If so then a simple note to the effect of "Note: not all of these resources with with IE, in fact most of them do not work with IE. You will have to use a different browser if you want to use these resources." From jdowdell at adobe.com Mon Apr 3 15:01:27 2006 From: jdowdell at adobe.com (John Dowdell) Date: Mon, 03 Apr 2006 13:01:27 -0700 Subject: [thelist] client to post video In-Reply-To: <200604031138.19921.richard.bennett@skynet.be> References: <029c01c653fe$83f5cb00$6400a8c0@nnepacorp.com> <98C4FC06-76D9-49E3-8B3A-8B7AB235D0E2@loudjoy.com> <005b01c656ae$2f37c480$2002a8c0@2GHZDADSXP> <200604031138.19921.richard.bennett@skynet.be> Message-ID: <44317F17.4090605@adobe.com> Richard Bennett wrote: > Firstly, Flash IS proprietary software that you are requiring. ?? Is that some type of reasoning, or just an excuse for an existing prejudice, or...? > I don't know how they find 95% Flash 7 players on a survey... or > 89% Java penetration in the same survey - that's plain crazy. Sorry, our bad, I don't see the methodology links on this front page anymore: http://www.macromedia.com/software/player_census/flashplayer/ I've sent out a change-request to get the "who" and the "how" of these ongoing consumer audits more visible on those entry pages: http://www.macromedia.com/software/player_census/npd/ http://www.macromedia.com/software/flash/survey/npd_survey/ Recap: Every three months for the last 7-8 years, NPD/MediaMetrix asks members of their regular consumer focus groups "Can you see this page? this page? how about this page? don't download anything new, but can you see this now? how about this?" and so on. Content from Flash Player 7 was viewable by about 95% of consumers tested in December, not 97%, but that's still more than IE/Win or likely "any modern browser". The truly startling stat in all this was that Flash Player 8, with advanced graphics capabilities, was found on 50% of consumer machines within three months of its release. If you'll allow me to transgress the bounds of good taste for a moment: HALF THE WEB HAD ITS CLIENTSIDE CAPABILITIES UPDATED IN ONLY THREE MONTHS, OMFG THIS IS IMMENSE, IT BLOWS OUT ALL THIS TALK ABOUT AJAX AND XAML AND WHATEVER WEB2.0 TOPIC DU JOUR IS ON THE BOARDS, HALF THE INTERNET UPGRADED IN ONLY THREE MONTHS, WHAT ARE YOU BOTHERING WITH GREASEMONKEY-SIZED AUDIENCES FOR? and so on. Bottom line: Want to use video in a browser-based presentation? Use Flash... makes the most sense. (Yes, .MPG files work too, but you don't know how each audience member will view it... some will call up a new page with QuickTime, some will jump the visitor out to Windows Media Player, whatever. With Flash, video is just another first-class citizen in the HTML content.) -- John Dowdell . Adobe Developer Support . San Francisco CA USA Weblog: http://weblogs.macromedia.com/jd Aggregator: http://weblogs.macromedia.com/mxna Technotes: http://www.macromedia.com/support/ Spam killed my private email -- public record is best, thanks. From junkmail at lostcreektech.com Mon Apr 3 15:02:20 2006 From: junkmail at lostcreektech.com (Anonymous) Date: Mon, 3 Apr 2006 16:02:20 -0400 Subject: [thelist] Image rotator for ASP server In-Reply-To: Message-ID: <001001c65759$867fdbf0$0400a8c0@lostcreek01> Greetings all, We're currently working on a website for a client and they are using Windows servers. Are there any relatively simple, easy apps/scripts/whatever out there to display a random image each time a page is reloaded? We have generally used rotator.php but it isn't working on their Windows servers. On digest, so CCs to me would be much appreciated. Thanks much, Joseph From junkmail at lostcreektech.com Mon Apr 3 15:54:21 2006 From: junkmail at lostcreektech.com (Anonymous) Date: Mon, 3 Apr 2006 16:54:21 -0400 Subject: [thelist] Image rotator for ASP server In-Reply-To: <002401c6575c$f1a09ac0$0300000a@CJMLTP01> Message-ID: <001701c65760$c8901300$0400a8c0@lostcreek01> Am well aware of using search engines to find things on the net. If I wanted to waste my time searching through dozens (or even hundreds) of products that may or may not work or be what I am looking for, I would do a search. Not all of us have time to sit and wade through the many results of a search. However, it is usually much quicker and the results are better when the search is narrowed down by recommendations of others familiar with the desired product/services/etc. -----Original Message----- From: Chris Marsh [mailto:thelist at cjmarsh.com] Sent: Monday, 03 April, 2006 16:27 To: junkmail at lostcreektech.com Subject: RE: [thelist] Image rotator for ASP server Joseph > We're currently working on a website for a client and they are using > Windows servers. Are there any relatively simple, easy > apps/scripts/whatever out there to display a random image each time a > page is reloaded? We have generally used rotator.php but it isn't > working on their Windows servers. > > On digest, so CCs to me would be much appreciated. Regards Chris Marsh -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.3.5/300 - Release Date: 03/04/2006 From thelist at cjmarsh.com Mon Apr 3 17:53:20 2006 From: thelist at cjmarsh.com (Chris Marsh) Date: Mon, 3 Apr 2006 23:53:20 +0100 Subject: [thelist] Image rotator for ASP server In-Reply-To: <001701c65760$c8901300$0400a8c0@lostcreek01> Message-ID: <002701c65771$67ebdeb0$0300000a@CJMLTP01> Joseph > Am well aware of using search engines to find things on the > net. If I wanted to waste my time searching through dozens > (or even hundreds) of products that may or may not work or be > what I am looking for, I would do a search. Not all of us > have time to sit and wade through the many results of a > search. However, it is usually much quicker and the results > are better when the search is narrowed down by > recommendations of others familiar with the desired > product/services/etc. Some points for your consideration: 1. You have clearly done no research yourself, nor followed the link that I helpfully provided. If you had, you would realised that you do not require a "product", so much as a few lines of code. Had you followed my link, you would have realised that it would not have taken you much longer than the time it took you to type your response to my email to actually solve your problem. 2. If you think it's a waste of your time for you to do the job that you're paid for, then I don't quite understand why you would think that it's not a waste of other people's time to help you for free. 3. I replied to you privately. I did this because nothing in the email I sent would have benefited the list. It was a friendly nudge in the right direction for someone that exhibited all the signs of a person in need of a spanking with a clue stick. Do not post private correspondance to public lists without the express permission of the author. It exhibits disregard for the author, and disrespect for the list. 4. If you had responded with something along the lines of "thanks for the resource, unfortunately I'm not well versed in ASP - could you suggest any tutorials for beginners?" I would most probably have supplied you with links to tutorials and written you a script that did exactly what you wanted to boot. The moral of the story? If you put in at least some effort, then others are more likely to match it for you. Put in no effort at all, and no one's going to be very interested in your problems. Of course, all of the above are my own opinions; I wouldn't presume to speak on behalf of others. Regards Chris Marsh -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.3.5/300 - Release Date: 03/04/2006 From richard.bennett at skynet.be Mon Apr 3 18:25:34 2006 From: richard.bennett at skynet.be (Richard Bennett) Date: Tue, 4 Apr 2006 01:25:34 +0200 Subject: [thelist] client to post video In-Reply-To: <44317F17.4090605@adobe.com> References: <029c01c653fe$83f5cb00$6400a8c0@nnepacorp.com> <200604031138.19921.richard.bennett@skynet.be> <44317F17.4090605@adobe.com> Message-ID: <200604040125.34908.richard.bennett@skynet.be> On Monday 03 April 2006 22:01, John Dowdell wrote: > Richard Bennett wrote: > > Firstly, Flash IS proprietary software that you are requiring. > > ?? Is that some type of reasoning, Why? there's nothing wrong with Flash being proprietary is there? I mean, you haven't gone open source have you? I think i was just stating the obvious: Proprietary : Private. Proprietary hardware and software are owned and controlled by a single organization or individual. Contrast with open. http://www.answers.com/proprietary&r=67 And you are requiring Flash, so i don't see what was unreasoned in that statement. > or just an excuse for an existing > prejudice, or...? I am only prejudiced against FUD. You might remember we had a discussion when Macromedia launched that blue-print example - I think it was a pet shop - that was supposed to be a best-practice example solving accessibility issues with Flash, but was actually a horribly broken non-validating page using hacks like hidden frames and inaccessible javascript links. That was simply a bad example for beginning developers, and that needed to be pointed out. I have nothing against Flash as such. The same goes for this: > Bottom line: Want to use video in a browser-based presentation? Use > Flash... makes the most sense. I would expect that you would come into contact with US government financed projects, which automatically fall under the 508 accessibility guidelines. When it comes to rich media the message has to be 'offer alternatives' so i don't see how your reply is an improvement on my statement: >>Anyway, I'm not saying you should not use your embedded flash players, >>by all means do, but don't suppose that everyone has chosen to install or >>upgrade to that particular plugin, and can actually see the content. >>You can simply offer a link under the flash movie pointing to the mpeg file >>"Open in stand alone player". >>That way people can also download the movie, and they have a choice of which >>viewer they would like to use. I mean, what are you saying? You SHOULD suppose that everyone can view the content? You SHOULDN'T bother offering alternatives? You SHOULD prevent users from opening the files in a viewer of their choice? How can advising people NOT to offer an alternative be better advice? > > > I don't know how they find 95% Flash 7 players on a survey... or > > 89% Java penetration in the same survey - that's plain crazy. > > Sorry, our bad, I don't see the methodology links on this front page > anymore: > http://www.macromedia.com/software/player_census/flashplayer/ > > I've sent out a change-request to get the "who" and the "how" of these > ongoing consumer audits more visible on those entry pages: > http://www.macromedia.com/software/player_census/npd/ > http://www.macromedia.com/software/flash/survey/npd_survey/ I found them - that is why i posted a link to the survey myself. But are they really still using that survey? they are stuck at MAC OS7 and 8, and Windows 95/98/NT. Maybe you could expand your change-request, what would really help developers is if the whole survey was published each time. That way we could judge whether a representative pool of users was used, and see which platforms and browsers are represented, are the same people used each time, and how pluggin penetration varies across age-groups, location etc etc. > Bottom line: Want to use video in a browser-based presentation? Use > Flash... makes the most sense. > (Yes, .MPG files work too, but you don't know how each audience > member will view it... some will call up a new page with QuickTime, some > will jump the visitor out to Windows Media Player, whatever. With Flash, > video is just another first-class citizen in the HTML content.) That's fine for a personal opinion, but not good advice for a webdeveloper. In the nineties it was all about designers going crazy doing 'cutting-edge' stuff, and simply requiring the users to adapt their software to suite the site. Now it is all about the websites being a service to the public, or the customer. We want to give every visitor access to the data, be they using a pda, an old pc with dialup, an accessibility aid, a corporate locked-down pc or whatever. This means we have to get away from the mindset of 'forcing' the user to do this, and 'forcing' everything to display pixel-perfect, and open our design to give the user choice. You say: > (Yes, .MPG files work too, but you don't know how each audience > member will view it. That is the whole point! Empower the user to use the technology that best suits their setup. Sure, code your fancy embedded player, but give the user a choice. You are designing the page for the user, not for the designer. let me round this mail off with an example: http://rivablog.com/ This is a demo page for a flash movie encoder. You click the play button, and watch the cyclist go. Slower... and slower... and slower... My whole browser starts freezing-up, and the only way to stop the damn film is to hit f5 to refresh the page. So ok, my pc is a few years old, and my flash is v7, but the npd 95% doesn't take into account that the user experience might be crap, so the designer says, ho ho - 95% is enough for me, I'll force all users to watch this embedded in their browser, so they don't break my layout. So how many of that 95% actually have an enjoyable experience? And how many are glad they don't get a chance to open the movie in a player that has a stop button, and that can be scaled to a reasonable size? Maybe someone would like to save it and email it to somebody? Nope... you are part of the 95% so you view it in an icky little part of your browser because the designer prefers it like that. That's the difference between proprietary and open. the first has to push their product exclusively whether or not it is the best solution, and the second can use the best selection of tools for the job, and empower the user to use what they prefer. Regards, Richard Drupal CMS have just released Drupal 4.7.0 RC 1. This is the first release candidate for version 4.7 which offers a lot of improvements over version 4.6. A few more release candidates are likely before v4.7 is finally released, but this version should be stable enough to setup a test site to get the feel for it, and maybe even to submit any bugs you find along the way. From junkmail at lostcreektech.com Mon Apr 3 18:41:05 2006 From: junkmail at lostcreektech.com (Anonymous) Date: Mon, 3 Apr 2006 19:41:05 -0400 Subject: [thelist] Image rotator for ASP server In-Reply-To: <002701c65771$67ebdeb0$0300000a@CJMLTP01> Message-ID: <001801c65778$15ecf2a0$0400a8c0@lostcreek01> 1. I did in fact do a search before posting to the list. Several of the "solutions" did not work. Thus, I asked on the list to see if anyone could recommend a particular solution that worked well for them. Product, snippet of code, solution, service, whatever. It was just a general term. 2. So we should all spend our time reinventing the wheel rather than making use of the list? Why bother having the list then? 3. I posted to the list, I replied to the list. If there was actually something in the response that was incriminating or proprietary, it would have been removed. There wasn't, so I didn't. 4. I didn't need a tutorial. I was simply looking for recommendations. -----Original Message----- From: Chris Marsh [mailto:thelist at cjmarsh.com] Sent: Monday, 03 April, 2006 18:53 To: junkmail at lostcreektech.com Cc: thelist at lists.evolt.org Subject: RE: [thelist] Image rotator for ASP server Joseph > Am well aware of using search engines to find things on the net. If I > wanted to waste my time searching through dozens (or even hundreds) of > products that may or may not work or be what I am looking for, I would > do a search. Not all of us have time to sit and wade through the many > results of a search. However, it is usually much quicker and the > results are better when the search is narrowed down by recommendations > of others familiar with the desired product/services/etc. Some points for your consideration: 1. You have clearly done no research yourself, nor followed the link that I helpfully provided. If you had, you would realised that you do not require a "product", so much as a few lines of code. Had you followed my link, you would have realised that it would not have taken you much longer than the time it took you to type your response to my email to actually solve your problem. 2. If you think it's a waste of your time for you to do the job that you're paid for, then I don't quite understand why you would think that it's not a waste of other people's time to help you for free. 3. I replied to you privately. I did this because nothing in the email I sent would have benefited the list. It was a friendly nudge in the right direction for someone that exhibited all the signs of a person in need of a spanking with a clue stick. Do not post private correspondance to public lists without the express permission of the author. It exhibits disregard for the author, and disrespect for the list. 4. If you had responded with something along the lines of "thanks for the resource, unfortunately I'm not well versed in ASP - could you suggest any tutorials for beginners?" I would most probably have supplied you with links to tutorials and written you a script that did exactly what you wanted to boot. The moral of the story? If you put in at least some effort, then others are more likely to match it for you. Put in no effort at all, and no one's going to be very interested in your problems. Of course, all of the above are my own opinions; I wouldn't presume to speak on behalf of others. Regards Chris Marsh -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.3.5/300 - Release Date: 03/04/2006 From jdowdell at adobe.com Mon Apr 3 18:57:30 2006 From: jdowdell at adobe.com (John Dowdell) Date: Mon, 03 Apr 2006 16:57:30 -0700 Subject: [thelist] client to post video In-Reply-To: <200604040125.34908.richard.bennett@skynet.be> References: <029c01c653fe$83f5cb00$6400a8c0@nnepacorp.com> <200604031138.19921.richard.bennett@skynet.be> <44317F17.4090605@adobe.com> <200604040125.34908.richard.bennett@skynet.be> Message-ID: <4431B66A.6040001@adobe.com> Richard Bennett wrote: > That's the difference between proprietary and open. the first has to push > their product exclusively whether or not it is the best solution, and the > second can use the best selection of tools for the job, and empower the user > to use what they prefer. As before, "??". Maybe this thing I wrote three years ago can help: "Is 'Open' and 'Shut' really open-and-shut?" http://www.macromedia.com/devnet/jd_forum/jd026.html My theme: Using "But it's *proprietary*!" as a reasoning to cut off some of your choices may be doing yourself a disservice. Use what works for the job... no need to get all religious about it. jd -- John Dowdell . Adobe Developer Support . San Francisco CA USA Weblog: http://weblogs.macromedia.com/jd Aggregator: http://weblogs.macromedia.com/mxna Technotes: http://www.macromedia.com/support/ Spam killed my private email -- public record is best, thanks. From jdowdell at adobe.com Mon Apr 3 19:13:50 2006 From: jdowdell at adobe.com (John Dowdell) Date: Mon, 03 Apr 2006 17:13:50 -0700 Subject: [thelist] Getting screenshots to look good in Word (and then PDF) In-Reply-To: References: Message-ID: <4431BA3E.8080703@adobe.com> Rob wrote: > I'm trying to get a screenshot of > a webpage to look decent within a PDF. Taking screenshots, saving as > GIF, inserting into Word to add other guff, then printing to PDF. As > soon as they hit Word they look pretty awful though, and then printing > to PDF the quality is reduced even further (using both PrimoPDF and > CutePDF). Microsoft Word doesn't have as many PDF export options as the real tools do... if you have Adobe Distiller, then this offers the most control over bitmaps in PDFs. But the bigger issue here may be the number of pixels in the image. Computer interfaces and fonts are designed on a pixel-by-pixel basis. If the image is resized even a little bit then those pixels must be averaged together... you'll get JPEG-like artifacts even if you're saving to pixel-accurate GIF or PNG. I don't know of any real way to prettify printed screencaptures, at least not without adding a lot more data to the file... if the screen has 1024 dots by 768 dots, and you're going to a printer with 300 or more dots per inch, then the result will tend to look blocky even if the pixels aren't averaged together at all. But print-res images are large, regardless... there's a hard choice to be made between compact files and interpolating extra pixels into a screencap in case it's printed. Hard either way. jd -- John Dowdell . Adobe Developer Support . San Francisco CA USA Weblog: http://weblogs.macromedia.com/jd Aggregator: http://weblogs.macromedia.com/mxna Technotes: http://www.macromedia.com/support/ Spam killed my private email -- public record is best, thanks. From Ken at adOpenStatic.com Mon Apr 3 19:23:41 2006 From: Ken at adOpenStatic.com (Ken Schaefer) Date: Tue, 4 Apr 2006 10:23:41 +1000 Subject: [thelist] Image rotator for ASP server References: <001801c65778$15ecf2a0$0400a8c0@lostcreek01> Message-ID: <160489103479AB4892187638EE7D1E691F4E79@kjserver1.kjhome.local> Joseph, Before you start asking other people to help you solve *your* problem (for which you are being paid) for free (as in, we are working for you for free), I think you should learn some etiquette. If you are going to persist with this attitude, it just indicates that you think your time is more valuable than mine. Is that really the way you want to come across? Do you really think you'll get your problems solved this way? a) As mentioned by Mark, it is extremely bad form to repost a private, offlist, response back to the public list. If you have something to say to Mark, please respond to him privately. If you wish to repost his private, offlist, response back to the list, you should consult with him first. b) > If I wanted to waste my time searching through dozens (or even hundreds) of > products that may or may not work or be what I am looking for, I would > do a search. Not all of us have time to sit and wade through the many > results of a search. Not all of us have "time to waste" (in your words) helping you solve your work problems for free either. c) > 1. I did in fact do a search before posting to the list. Several of the > "solutions" did not work And where is your evidence of said searching? And why don't you help out by mentioning the products that didn't work, so we don't waste everyone's time re-recommending them? d) > 2. So we should all spend our time reinventing the wheel rather than > making use of the list? Why bother having the list then? I believe you are mistaken about the purpose of this list. The list is here so we can share knowledge, see topical issues, and gain help with complex problems in a collaborative manner. It is not here as a substitute for doing your own due diligence. It is not a substitute for Google. It is not free, personal, support forum. If you post a decent question, that explains what you want and shows that you have put effort into solving your own problem, you will probably get more detailed help from list members. We have better things to do than rekey answers that have been provided before, or are available via Google. You don't like that - tough. Hire someone, and they'll provide detailed answers in a cheerful and comprehensive manner. If you want that some type of information for free, you need to ask questions the smart way, and lose the attitude. You really need to read this: http://www.adopenstatic.com/personal/help.asp and http://www.catb.org/~esr/faqs/smart-questions.html (but somehow I suspect you wont) e) In answer to your question: There are a large number of ways to do this. For example, if you have the file details stored in a database, you can use a simple code snippet (www.adOpenStatic.com/faq/randomrecord.asp) to select a random record from your DB table. Or, you could do this client-side (by having a bit of javascript that chooses a random record from an array). You could even have your ASP write out the javascript arry dynamically. There are lots of options, and since you haven't given us any details about how you want to approach this, or what your existing setup is, there isn't a lot we can do. Cheers Ken : -----Original Message----- : From: thelist-bounces at lists.evolt.org [mailto:thelist- : bounces at lists.evolt.org] On Behalf Of Anonymous : Sent: Tuesday, 4 April 2006 9:41 AM : To: thelist at lists.evolt.org : Subject: Re: [thelist] Image rotator for ASP server : : 1. I did in fact do a search before posting to the list. Several of the : "solutions" did not work. Thus, I asked on the list to see if anyone could : recommend a particular solution that worked well for them. Product, : snippet : of code, solution, service, whatever. It was just a general term. : : 2. So we should all spend our time reinventing the wheel rather than : making : use of the list? Why bother having the list then? : : 3. I posted to the list, I replied to the list. If there was actually : something in the response that was incriminating or proprietary, it would : have been removed. There wasn't, so I didn't. : : 4. I didn't need a tutorial. I was simply looking for recommendations. : : -----Original Message----- : From: Chris Marsh [mailto:thelist at cjmarsh.com] : Sent: Monday, 03 April, 2006 18:53 : To: junkmail at lostcreektech.com : Cc: thelist at lists.evolt.org : Subject: RE: [thelist] Image rotator for ASP server : : Joseph : : > Am well aware of using search engines to find things on the net. If I : > wanted to waste my time searching through dozens (or even hundreds) of : > products that may or may not work or be what I am looking for, I would : > do a search. Not all of us have time to sit and wade through the many : > results of a search. However, it is usually much quicker and the : > results are better when the search is narrowed down by recommendations : > of others familiar with the desired product/services/etc. : : Some points for your consideration: : : 1. You have clearly done no research yourself, nor followed the link that : I : helpfully provided. If you had, you would realised that you do not require : a : "product", so much as a few lines of code. Had you followed my link, you : would have realised that it would not have taken you much longer than the : time it took you to type your response to my email to actually solve your : problem. : : 2. If you think it's a waste of your time for you to do the job that : you're : paid for, then I don't quite understand why you would think that it's not : a : waste of other people's time to help you for free. : : 3. I replied to you privately. I did this because nothing in the email I : sent would have benefited the list. It was a friendly nudge in the right : direction for someone that exhibited all the signs of a person in need of : a : spanking with a clue stick. Do not post private correspondance to public : lists without the express permission of the author. It exhibits disregard : for the author, and disrespect for the list. : : 4. If you had responded with something along the lines of "thanks for the : resource, unfortunately I'm not well versed in ASP - could you suggest any : tutorials for beginners?" I would most probably have supplied you with : links : to tutorials and written you a script that did exactly what you wanted to : boot. The moral of the story? If you put in at least some effort, then : others are more likely to match it for you. Put in no effort at all, and : no : one's going to be very interested in your problems. : : Of course, all of the above are my own opinions; I wouldn't presume to : speak : on behalf of others. : : Regards : : Chris Marsh From ian at zstudio.co.uk Mon Apr 3 19:29:26 2006 From: ian at zstudio.co.uk (Ian Anderson) Date: Tue, 04 Apr 2006 01:29:26 +0100 Subject: [thelist] Getting screenshots to look good in Word (and then PDF) In-Reply-To: <4431BA3E.8080703@adobe.com> References: <4431BA3E.8080703@adobe.com> Message-ID: <4431BDE6.6060701@zstudio.co.uk> John Dowdell wrote: > I don't know of any real way to prettify printed screencaptures, at > least not without adding a lot more data to the file... if the screen > has 1024 dots by 768 dots, and you're going to a printer with 300 or > more dots per inch, then the result will tend to look blocky even if the > pixels aren't averaged together at all. But print-res images are large, > regardless... there's a hard choice to be made between compact files and > interpolating extra pixels into a screencap in case it's printed. Hard > either way. In my experience, you can still get good looking screen shots on desktop laser printers even given the disparity of resolutions. The key is to send all the original dots, irrespective of the physical resolution of the screenshot, and don't allow interpolation or resampling to take place before the printer gets the image. Sometimes it is not easy to stop Acrobat from resampling images. Cheers Ian -- _________________________________________________ zStudio - Web development and accessibility http://zStudio.co.uk Snippetz.net - Online code library File, manage and re-use your code snippets & links http://snippetz.net From richard.bennett at skynet.be Mon Apr 3 20:13:51 2006 From: richard.bennett at skynet.be (Richard Bennett) Date: Tue, 4 Apr 2006 03:13:51 +0200 Subject: [thelist] client to post video In-Reply-To: <4431B66A.6040001@adobe.com> References: <029c01c653fe$83f5cb00$6400a8c0@nnepacorp.com> <200604040125.34908.richard.bennett@skynet.be> <4431B66A.6040001@adobe.com> Message-ID: <200604040313.52428.richard.bennett@skynet.be> On Tuesday 04 April 2006 01:57, John Dowdell wrote: > Richard Bennett wrote: > > That's the difference between proprietary and open. the first has to push > > their product exclusively whether or not it is the best solution, and the > > second can use the best selection of tools for the job, and empower the > > user to use what they prefer. > > As before, "??". I really did my very best to explain it as clearly as I could, and illustrate it with an example. > Maybe this thing I wrote three years ago can help: > "Is 'Open' and 'Shut' really open-and-shut?" > http://www.macromedia.com/devnet/jd_forum/jd026.html It is not a technical question, it is a mindset. Can you advise developers that your product might not be the best solution in some cases? Can you advise them that although your product is great, offering an alternative is a service to the user? Or are you restricted to saying: >>> Bottom line: Want to use video in a browser-based presentation? Use >>> Flash... makes the most sense. as though the rest of the world has no merit whatsoever. > My theme: Using "But it's *proprietary*!" as a reasoning to cut off some > of your choices may be doing yourself a disservice. Use what works for > the job... no need to get all religious about it. You seem to have misunderstood the sentence I wrote: >> That's the difference between proprietary and open. the first has to push >> their product exclusively whether or not it is the best solution, and the >> second can use the best selection of tools for the job, and empower the >> user to use what they prefer. I am not talking about open source as such, but being open-minded. Use Flash, or Mediaplayer, or Quicktime or whatever you want, and then offer the user an alternative in case your preference isn't suitable for them. Simple. Advising developers to develop solely for one technology is simply bad advice. It is nineties-talk. We would put up little badges saying "best viewed with netscape 4", and have anti-rightclick scripts on our shitty pages to stop people stealing our little tricks. Times have changed. Your site should be a service to the user. You should do your very best to put the user in control - let them choose what they want to see, let them get there fast, without splash pages and intros, and offer them the data in several formats. It is just commonsense. Regards. Richard In mysql, if you have a table like this: id??????????????|name 22?????????????|red 12?????????????|red 45?????????????|red 3???????????????|pink 35?????????????|pink and would like to export it to a spreadsheet looking like this: ids |name 22,12,45 |red 3,35 |pink You can use the mysql PROPRIETARY extension GROUP_CONCAT, like this: SELECT GROUP_CONCAT(id), name FROM tablename GROUP BY name From justin at jazzmanagement.com.au Mon Apr 3 22:43:39 2006 From: justin at jazzmanagement.com.au (Justin Zachan) Date: Tue, 4 Apr 2006 13:43:39 +1000 Subject: [thelist] Convert DVD video to the web In-Reply-To: <005101c656aa$478e1240$2002a8c0@2GHZDADSXP> Message-ID: <4sun1b$cl41vv@ozemail-mail.icp-qv1-irony2.iinet.net.au> Hi there... Changing it to mpg and it certainly worked... And I can import it into Flash OK... Thanks... -----Original Message----- From: Daryl Brown [mailto:mail at browncowmedia.com.au] Sent: Monday, 3 April 2006 9:08 AM To: justin at jazzmanagement.com.au; thelist at lists.evolt.org Subject: Re: [thelist] Convert DVD video to the web a VOB file is already an mpg file. Mpeg 2 actually. If you have an mpeg-2 decoder on your machine, just add ".mpg" to the biggest VOB file and it should play - Of course depending on your flash encoding app and whether it can read an mpeg2 file. Costs nothing to find out though!! Daryl Brown Digital Film Maker Brown Cow Media Sydney, Australia www.browncowmedia.com.au www.browncowdvd.com.au > > "First of all, what format are you on (PC or Mac). Second, and > probably most > importantly, is the DVD copyrighted? You may be in violation if you attempt > this > > Todd" > > Answer - I use a PC, and the client has clearance to use the DVD in > this way... Thanks... > From evoltlist at delime.com Mon Apr 3 22:47:46 2006 From: evoltlist at delime.com (M. Seyon) Date: Mon, 03 Apr 2006 23:47:46 -0400 Subject: [thelist] client to post video In-Reply-To: <44317F17.4090605@adobe.com> References: <200604031138.19921.richard.bennett@skynet.be> <029c01c653fe$83f5cb00$6400a8c0@nnepacorp.com> <98C4FC06-76D9-49E3-8B3A-8B7AB235D0E2@loudjoy.com> <005b01c656ae$2f37c480$2002a8c0@2GHZDADSXP> <200604031138.19921.richard.bennett@skynet.be> Message-ID: <4.2.0.58.20060403233903.01e76988@mx.delime.com> Message from John Dowdell (4/3/2006 01:01 PM) >Recap: Every three months for the last 7-8 years, NPD/MediaMetrix asks >members of their regular consumer focus groups >Content from Flash Player 7 was viewable by about 95% of consumers >tested in December, >HALF THE WEB HAD ITS CLIENTSIDE CAPABILITIES UPDATED IN ONLY THREE >MONTHS Sorry, I know this probably goes against all the rules of statistics and data analysis and survey conducting, but I've never bought into the theory of "These are the results we found based on our study of 2000 people therefore it must be valid for the other 6+ billion in the world." A more accurate statement, to me, would have been, "Half of our sample audience had its clientside capabilities..." Also I believe the npd page you link to states clearly at the top of the table with the 97% claim, "Results (US only)". Why don't I pay these US-centric surveys much heed? I'll give you one reason - those genius geographers still haven't figured out that it's not a good idea to lump the Caribbean in with Latin America, because then they're tempted to pre-guess that they're Spanish speaking and push Spanish content at us (VISA's website does just that). All well and good in South America where probably 90+% speak Spanish natively. But for more than half of the Caribbean, this does not hold true. regards. -marc -- Trinidad Carnival in all its photographic glory. Playyuhself.com http://www.playyuhself.com/ From volkan.ozcelik at gmail.com Tue Apr 4 00:14:42 2006 From: volkan.ozcelik at gmail.com (=?ISO-8859-9?Q?VOLKAN_=D6Z=C7EL=DDK?=) Date: Tue, 4 Apr 2006 08:14:42 +0300 Subject: [thelist] Script for M$IE only, or not In-Reply-To: References: Message-ID: >You mean something non-M$IE users could easily see with styles turned off or >unsupported in their UA? Slightly deviating from the subject: Who are going to joing "the first annual webmasters naked day?" Will we be seeing evolt naked? http://www.volkanozcelik.com/cre8/blog/2006/04/i-will-be-naked-for-one-full-day.html Cheers :) -- Volkan Ozcelik +>Yep! I'm blogging! : http://www.volkanozcelik.com/volkanozcelik/blog/ +> My projects/studies/trials/errors : http://www.sarmal.com/ From codepo8 at gmail.com Tue Apr 4 00:47:48 2006 From: codepo8 at gmail.com (Christian Heilmann) Date: Tue, 4 Apr 2006 06:47:48 +0100 Subject: [thelist] Script for M$IE only, or not In-Reply-To: References: Message-ID: <30bd6ffd0604032247w7aa14fb6yde5413c837177b1c@mail.gmail.com> > Slightly deviating from the subject: > Who are going to joing "the first annual webmasters naked day?" > Will we be seeing evolt naked? > > http://www.volkanozcelik.com/cre8/blog/2006/04/i-will-be-naked-for-one-full-day.html What an amazingly fresh and great new idea! I'll be declaring "Celebrate me for being a cool hip web designer day" on April the 12th, to show how amazing web designers are, let's all wear kippers on our heads and jump on one foot all day! 1998 saw greyday that called all web designers to grey out their web site to show what it looked like if all copyright infringement were to be followed up as lawsuits: http://web.archive.org/web/19990224113837/www.greyday.org/main.html The original site is a domain squatter thingy now but this spoof is to the point: http://www.ntk.net/grey.html Techheads also countered with grayday basically telling the design community not to get their knickers in a twist: http://web.archive.org/web/20010415065738/grayday.org/main.html My personal $.02: Can we stop the self indulgence and thinking people really care about our personal blogs and how we achieve some technical stunt and concentrate on what we offer the visitors in terms of information instead of celebrating ourselves? Sorry for sounding grumpy, but putting a lot of time and effort into an idea like http://csstoolshed.com and receiving nearly no submissions whatsoever makes me really angry at memes pointing to personal blogs and wasting our time advocating to the already enlightened. If you want to raise awareness about CSS and semantic markup and that web sites can work without CSS a real web site for the cause, backed up by a body like the W3C or WaSP and acccompanied by press releases in the mainstream press with explanations as to the whys and hows for non-techie people might have some impact, this is just celebrating ourselves and there has certainly not been a lack of that in the past. From volkan.ozcelik at gmail.com Tue Apr 4 01:26:32 2006 From: volkan.ozcelik at gmail.com (=?ISO-8859-9?Q?VOLKAN_=D6Z=C7EL=DDK?=) Date: Tue, 4 Apr 2006 09:26:32 +0300 Subject: [thelist] Script for M$IE only, or not In-Reply-To: <30bd6ffd0604032247w7aa14fb6yde5413c837177b1c@mail.gmail.com> References: <30bd6ffd0604032247w7aa14fb6yde5413c837177b1c@mail.gmail.com> Message-ID: > What an amazingly fresh and great new idea! I truly understand your feelings, Chris. Especially on css toolshed. I was one of those, who promised to do something for it, but was unable to contribute because of lack of time. Shame on me. My personal $.02: Can we stop the self indulgence and thinking people > really care about our personal blogs and how we achieve some technical > stunt and concentrate on what we offer the visitors in terms of > information instead of celebrating ourselves? I see. However, people like me may not have adequate time, because constructing such a site - especially a site with good content and quality to take non-techy-savy users' attention - requires a lot of time and effort. So, imho ymmv etc., making tens of thousands of sited "naked" for one day is a striking way to make people wonder "what the heck is going on the web?". I'm curious about the viral effect it will make. (btw, I'm preparing an MBA thesis on "viral marketing" and its impact on "social networks" -the full problem statement is more elagant but simply that's what the thesis about in plain old english- and this issue is sorta my special interest for the time being) At least some will google "naked day" etc and find some valuable sites explaining why they are "naked" for one day. To sum up, if you have limited time and you want to react somehow, there's nothing easier than renaming your /lib/css folder to /lib/hide-css/ for one day. It will take at most one minute! If you want to raise awareness about CSS and semantic markup and that > web sites can work without CSS a real web site for the cause, backed > up by a body like the W3C or WaSP and acccompanied by press releases > in the mainstream press with explanations If one of my "magic" projects hold and I become prosperous enough so that I may not need to think about how to earn a living; I promise I will devote my time collaborating in those projects as well as creating my own like-minded projects. And I am serious on that. Really. Cheers, -- Volkan Ozcelik +>Yep! I'm blogging! : http://www.volkanozcelik.com/volkanozcelik/blog/ +> My projects/studies/trials/errors : http://www.sarmal.com/ From codepo8 at gmail.com Tue Apr 4 01:55:27 2006 From: codepo8 at gmail.com (Christian Heilmann) Date: Tue, 4 Apr 2006 07:55:27 +0100 Subject: [thelist] Script for M$IE only, or not In-Reply-To: References: <30bd6ffd0604032247w7aa14fb6yde5413c837177b1c@mail.gmail.com> Message-ID: <30bd6ffd0604032355p56107bdlf468e3cc54b76a1c@mail.gmail.com> > My personal $.02: Can we stop the self indulgence and thinking people > > really care about our personal blogs and how we achieve some technical > > stunt and concentrate on what we offer the visitors in terms of > > information instead of celebrating ourselves? > I see. However, people like me may not have adequate time, because > constructing such a site - especially a site with good content and quality > to take non-techy-savy users' attention - requires a lot of time and effort. That is what collaboration is for. The CSS-discuss Wiki is a good example, albeit deteriorating at the moment, too. Could it be because we spend our time writing about how cool we are and recording podcasts talking to other cool web developers about how adding another CSS selector has made our lives complete? > So, imho ymmv etc., making tens of thousands of sited "naked" for one day is > a striking way to make people wonder "what the heck is going on the web?". It might, but I don't see tens of thousands of pages, and I certainly consider the restrictions ridiculous: quote There's not much details about it. This is merely to see if you're up to the challenge to put your website on the line. If you run an e-commerce website, you ought not participate; this is purely for those with personal blogs or for those who run publications or?whatever. All the more props to you if you run a large website! unquote Why not e-commerce web sites? This is the sort of wishy washy commitment I sense a lot with these kind of ideas. Yeah, take part but keep well out of the business arena, lord knows we don't want those guys to get wise on web standards, do we? So all the sites on the list are personal blogs that already dwell in the webesign/webdevelopment arena - and I don't see that many big ones there. I will do the roundabout test and ask in the office later today if anyone in the PM pool or Technical Architects - the people making decisions about what products to use to develop a site heard about the idea :-) > To sum up, if you have limited time and you want to react somehow, there's > nothing easier than renaming your /lib/css folder to /lib/hide-css/ for one > day. It will take at most one minute! So does buying a sandwich at the local off-license and you ensure that it will be there tomorrow, too, instead of a big supermarket chain outlet. Might have more impact. > If one of my "magic" projects hold and I become prosperous enough so that I > may not need to think about how to earn a living; I promise I will devote my > time collaborating in those projects as well as creating my own like-minded > projects. > > And I am serious on that. Really. Nobody asks yous to do anything, you do a tremendous job answering questions here in a well-researched and proper manner, that has a great impact although you may not be aware of it. And either this or an advertising campaign catered at the decision makers OUTSIDE the design/web development community will help raise CSS awareness. However, CSS is a tool, like a shovel is a tool or nailclippers are, it is not a religion or something someone who does not develop or publish on the web really cares about. There is also no need for them to care, IMHO. There is nothing worse than having to deliver a project with some half-knowledged guy trying to show off by pointing out personal web sites or blog entries that show what can be done. "Yes, I know this site has CSS image galleries, however, yours will be maintained in .NET and with a CMS and we cannot create one template for each image". We could though, but that will raise the budget and the development time by 500%. Want me to re-calculate? From codepo8 at gmail.com Tue Apr 4 04:43:33 2006 From: codepo8 at gmail.com (Christian Heilmann) Date: Tue, 4 Apr 2006 10:43:33 +0100 Subject: [thelist] [job] Head of Front end development, London UK Message-ID: <30bd6ffd0604040243s87935b0vc4eaa95293c7629b@mail.gmail.com> Hopefully this is OK with the admins here. We are looking to replace me at the company I am working at the moment as I resigned to move on next week. So if you are - an experienced Lead web developer - can lead a team of 3 developers in the UK and 5 in India - got an expert knowledge in web standard technologies - up to speed on accessibility issues and legal requirements - got experience with integrating several different frameworks (.NET, spring) and different CMS (Tridion, Immediacy, Joomla) And if you want to - work in southwest London (Hammersmith) - work with clients like McDonalds, HP, Visit Britain, Last Minute and lots more - get a competitive wage - are available quickly and looking for a permanent position Drop me a line, and I will give you a buzz. Sorry about this spam, and about it being UK-centric, but it is an opportunity and I rather get someone in place that knows his stuff than lots of agencies sending us CVs to fill up their contact quota. cheers Chris -- Chris Heilmann Blog: http://www.wait-till-i.com Writing: http://icant.co.uk/ Binaries: http://www.onlinetools.org/ From dwayne.conyers at hp.com Tue Apr 4 08:04:12 2006 From: dwayne.conyers at hp.com (Conyers, Dwayne) Date: Tue, 4 Apr 2006 08:04:12 -0500 Subject: [thelist] [job] Head of Front end development, London UK Message-ID: The prospect of going back to London doesn't appeal to me but hopefully you will find the right person(s). Cheers. -- Dwacon www.dwacon.com From bedouglas at earthlink.net Tue Apr 4 10:20:05 2006 From: bedouglas at earthlink.net (bruce) Date: Tue, 4 Apr 2006 08:20:05 -0700 Subject: [thelist] Ad Server/Ad Management Application Message-ID: <102301c657fb$412e29b0$0301a8c0@Mesa.com> Hi, I'm trying to find an app/product that can met my needs. I'd like an app that would allow vendors/advertisers to create ads and have the ads display on a given website(s). I'd like tha app to be able to allow the advertiser to also be charged for the ability to place the ad. I'd also like the ability to be able to provide the advertiser the ability to either place an ad on the site, or to email an add to a given population of users on the site... I've looked at various apps on the net, as well as trying to call Doubelclick, etc... with no real luck. Any thoughts/ideas/comments???? Thanks -Bruce bedouglas at earthlink.net From hut at hockeymail.com Tue Apr 4 11:03:21 2006 From: hut at hockeymail.com (Eduardo) Date: Tue, 04 Apr 2006 12:03:21 -0400 Subject: [thelist] Ad Server/Ad Management Application In-Reply-To: <102301c657fb$412e29b0$0301a8c0@Mesa.com> References: <102301c657fb$412e29b0$0301a8c0@Mesa.com> Message-ID: <443298C9.8010803@hockeymail.com> There's phpAdsNew at http://phpadsnew.com/two/ and also Max Media Manager at https://trac.openads.org/. Both are very good but MMM seems to perform better than the first one. Eduardo bruce wrote: > Hi, > > I'm trying to find an app/product that can met my needs. I'd like an app > that would allow vendors/advertisers to create ads and have the ads display > on a given website(s). I'd like tha app to be able to allow the advertiser > to also be charged for the ability to place the ad. I'd also like the > ability to be able to provide the advertiser the ability to either place an > ad on the site, or to email an add to a given population of users on the > site... > > I've looked at various apps on the net, as well as trying to call > Doubelclick, etc... with no real luck. > > Any thoughts/ideas/comments???? > > Thanks > > -Bruce > bedouglas at earthlink.net > From potatosculptor at gmail.com Tue Apr 4 13:23:12 2006 From: potatosculptor at gmail.com (sam foster) Date: Tue, 4 Apr 2006 13:23:12 -0500 Subject: [thelist] JSON and Client-side classes In-Reply-To: <11DFAB97-BA21-47E8-AF84-C0F41AC58E59@attensa.com> References: <11DFAB97-BA21-47E8-AF84-C0F41AC58E59@attensa.com> Message-ID: <9e3dd260604041123w3564c10du17eef963a88e7433@mail.gmail.com> You could get the data to create your Person instance from a JSON string.. is that what you are asking? PersonObject = function(props) { for(var key in props) { this[key] = props[key]; } } var person1 = new PersonObject( parseJSON(someJsonString) ); which is just a simplistic example. I prefer this model of passing arguments into a construtor anyway. You could support either by switching on the length of arguments, and/or the typeof the first argument. hth Sam On 3/7/06, Mark Baldwin wrote: > Greetings all, > > I've been playing around with JSON and I can't seem to find the > answer to the following: > > Lets say you have a JS include that defines an object such as > > PersonObject = function() { > this.name = ''; > this.age = ''; > } > > Is it possible, via JSON, to eval a string such that it would create > a new instance of a person object? A bonus would be a way of doing it > without creating an incredibly large, and obscene, constructor. > > Thanks in advance, > Mark From jblanchard at pocket.com Tue Apr 4 13:31:31 2006 From: jblanchard at pocket.com (Jay Blanchard) Date: Tue, 4 Apr 2006 13:31:31 -0500 Subject: [thelist] Out with tradition? GET or POST Message-ID: <56608562F6D5D948B22F5615E3F57E6921BD31@YGEX01WAL.onecall.local> I thought this to be unusual; I was validating some pages for an upcoming project and got this as my only error; ------------------------------------------------------------------------ --- Below are the results of checking this document for XML well-formedness and validity. Error Line 15 column 29: value of attribute "method" cannot be "POST"; must be one of "get", "post".
------------------------------------------------------------------------ --- For years we have been told that the method must be in all caps, even though we all found that not to be the case; our forms would act as we wished. But we all wanted to join the 'valid' mark-up community so we all happily typed the words in upper-case. I guess that this is the first time that I have noticed this because I have been more on the web-applications development side for the past few years and we didn't really validate much. [/end introspective rant on nothing really important] Do not forget to "FLUSH PRIVILIEGES" after adding or updating users in MySQL. While you may be able to query the user or changes made to the user there will be no effect (old passwords will still work, etc) until you have performed that query. From evolt at kasimir-k.fi Tue Apr 4 13:58:49 2006 From: evolt at kasimir-k.fi (kasimir-k) Date: Tue, 04 Apr 2006 18:58:49 +0000 Subject: [thelist] Out with tradition? GET or POST In-Reply-To: <56608562F6D5D948B22F5615E3F57E6921BD31@YGEX01WAL.onecall.local> References: <56608562F6D5D948B22F5615E3F57E6921BD31@YGEX01WAL.onecall.local> Message-ID: <4432C1E9.5080504@kasimir-k.fi> Jay Blanchard scribeva in 04/04/2006 18:31: > I thought this to be unusual; Actually it's just a difference between HTML and XHTML specs. > Below are the results of checking this document for XML well-formedness > and validity. > > Error Line 15 column 29: value of attribute "method" cannot be "POST"; > must be one of "get", "post". > "XHTML documents must use lower case for all HTML element and attribute names. This difference is necessary because XML is case-sensitive e.g.
  • and
  • are different tags."[0] > For years we have been told that the method must be in all caps, even > though we all found that not to be the case; our forms would act as we > wished. "This attribute specifies which HTTP method will be used to submit the form data set. Possible (case-insensitive) values are "get" (the default) and "post"."[1] .k [0]http://www.w3.org/TR/xhtml1/#h-4.2 [1]http://www.w3.org/TR/html4/interact/forms.html#adef-method From evolt at markgroen.com Tue Apr 4 14:45:49 2006 From: evolt at markgroen.com (Mark Groen) Date: Tue, 04 Apr 2006 12:45:49 -0700 Subject: [thelist] age old question: how to deal with addressbook export In-Reply-To: <1143903630.9517.2.camel@localhost> References: <160489103479AB4892187638EE7D1E691F4DED@kjserver1.kjhome.local> <1143903630.9517.2.camel@localhost> Message-ID: <1144179950.10265.9.camel@mark> On Sat, 2006-04-01 at 23:00 +0800, ??? wrote: > snip.. > > : ........ The project is done in php. > > : Now the requirement is to export the contact data. I think of CSV. But I > > : am not sure how I will handle language information and/or multiple > > : values of LDAP, e.g. the company have 3 addresses and each of them have > > : 3 languages. Perhaps I should export to some spreadsheet format so that > > : I can use different tabs for different languages. This php application will talk ldap and then export to vcard, don't recall if it does CSV too: http://ugsrv.ug.edu.gh/phpldapadmin/documentation.php?view=changelog Also found this that may interest you: http://www.openldap.org/lists/openldap-software/200506/msg00133.html heading out the door, so haven't checked further, but the post above mentions that openldap.org does what you want so it may be worth investigating too. -- cheers, Mark From mark.baldwin at attensa.com Tue Apr 4 17:50:22 2006 From: mark.baldwin at attensa.com (Mark Baldwin) Date: Tue, 4 Apr 2006 15:50:22 -0700 Subject: [thelist] JSON and Client-side classes In-Reply-To: <9e3dd260604041123w3564c10du17eef963a88e7433@mail.gmail.com> References: <11DFAB97-BA21-47E8-AF84-C0F41AC58E59@attensa.com> <9e3dd260604041123w3564c10du17eef963a88e7433@mail.gmail.com> Message-ID: <0532EBF7-3437-4716-8B47-61E17BD80CD7@attensa.com> Thanks for taking up the cause. What you came up with is what I ended up doing. Turned out to be the only feasible option. What I though would have been slick at the time would to be able to go like this: var newGuy = eval('(' + jsonString + ')'); So with a little foresight (both server and client know about the object to create, security safeguards, etc.) a php script could send down a brand spanking new object to the client without the extra steps of creating a new object and then decorating it with the returned data. Mark On Apr 4, 2006, at 11:23 AM, sam foster wrote: > You could get the data to create your Person instance from a JSON > string.. is that what you are asking? > > PersonObject = function(props) { > for(var key in props) { > this[key] = props[key]; > } > } > > var person1 = new PersonObject( parseJSON(someJsonString) ); > > which is just a simplistic example. I prefer this model of passing > arguments into a construtor anyway. You could support either by > switching on the length of arguments, and/or the typeof the first > argument. > > hth > Sam > > On 3/7/06, Mark Baldwin wrote: >> Greetings all, >> >> I've been playing around with JSON and I can't seem to find the >> answer to the following: >> >> Lets say you have a JS include that defines an object such as >> >> PersonObject = function() { >> this.name = ''; >> this.age = ''; >> } >> >> Is it possible, via JSON, to eval a string such that it would create >> a new instance of a person object? A bonus would be a way of doing it >> without creating an incredibly large, and obscene, constructor. >> >> Thanks in advance, >> Mark > -- > > * * Please support the community that supports you. * * > http://evolt.org/help_support_evolt/ > > For unsubscribe and other options, including the Tip Harvester > and archives of thelist go to: http://lists.evolt.org > Workers of the Web, evolt ! From hershelr at netvision.net.il Wed Apr 5 05:20:01 2006 From: hershelr at netvision.net.il (Hershel Robinson) Date: Wed, 05 Apr 2006 13:20:01 +0300 Subject: [thelist] AJAX Tip Message-ID: <443399D1.4000201@netvision.net> Just saw this today: http://www.huddletogether.com/projects/lightbox2/ provides a very nice method to 'show larger image' right on the page. -- Gallery Robinson Web Services http://web.galleryrobinson.com/ From codepo8 at gmail.com Wed Apr 5 05:33:26 2006 From: codepo8 at gmail.com (Christian Heilmann) Date: Wed, 5 Apr 2006 11:33:26 +0100 Subject: [thelist] AJAX Tip In-Reply-To: <443399D1.4000201@netvision.net> References: <443399D1.4000201@netvision.net> Message-ID: <30bd6ffd0604050333m38bba2a7g51696614081e485a@mail.gmail.com> > > Just saw this today: > > http://www.huddletogether.com/projects/lightbox2/ > > provides a very nice method to 'show larger image' right on the page. > Steady on! Lightbox is a very cool script, no doubt, but it has nothing to do with AJAX, let's not confuse matters. AJAX means using XMLHTTPRequest to talk to the server, all lightbox does is load an image. While Lightbox can work locally and without a server no AJAX solution can (without HTTP). Don't get too excited. And yes, lightbox is not Web2.0 either :-) -- Chris Heilmann Blog: http://www.wait-till-i.com Writing: http://icant.co.uk/ Binaries: http://www.onlinetools.org/ From codepo8 at gmail.com Wed Apr 5 05:47:23 2006 From: codepo8 at gmail.com (Christian Heilmann) Date: Wed, 5 Apr 2006 11:47:23 +0100 Subject: [thelist] AJAX pains - why is Safari being bitchy? Message-ID: <30bd6ffd0604050347y7fd6fe69l3fd4a90af6dac383@mail.gmail.com> I just put an RSS displayer online for you to check out: http://onlinetools.org/tools/feednav/ My issue with it is Safari: 1) Safari doesn't seem to get request.status although I made the request unique with a timestamp: request.open('get',feednavcfg.serverScript+encodeURI(url)+'&t='+now.getTime()); 2) In some feeds Safari does just hangs and does not even trigger the timeOut I defined for bad requests. Any way around that or is it just a given until the next upgrade is out? Cheers Chris -- Chris Heilmann Blog: http://www.wait-till-i.com Writing: http://icant.co.uk/ Binaries: http://www.onlinetools.org/ From discuss at alphanumeric.cz Wed Apr 5 06:14:31 2006 From: discuss at alphanumeric.cz (Jan Brasna) Date: Wed, 05 Apr 2006 13:14:31 +0200 Subject: [thelist] AJAX Tip In-Reply-To: <443399D1.4000201@netvision.net> References: <443399D1.4000201@netvision.net> Message-ID: <4433A697.4000603@alphanumeric.cz> FYI no AJAX in there. Solely DOM. -- Jan Brasna :: www.alphanumeric.cz | www.janbrasna.com | www.wdnews.net From hershelr at netvision.net.il Wed Apr 5 06:19:57 2006 From: hershelr at netvision.net.il (Hershel Robinson) Date: Wed, 05 Apr 2006 14:19:57 +0300 Subject: [thelist] AJAX Tip In-Reply-To: <4433A697.4000603@alphanumeric.cz> References: <443399D1.4000201@netvision.net> <4433A697.4000603@alphanumeric.cz> Message-ID: <4433A7DD.8010601@netvision.net> > FYI no AJAX in there. Solely DOM. > Steady on! Lightbox is a very cool script, no doubt, but it has > nothing to do with AJAX, let's not confuse matters. Well now how do you like that? The author posted a note to another list I am on announcing this tool and clearly indicated it is somehow considered AJAX. I myself didn't look under the hood to see how it works. > And yes, lightbox is not Web2.0 either :-) What precisely does this mean? Thanks. -- Gallery Robinson Web Services http://web.galleryrobinson.com/ From codepo8 at gmail.com Wed Apr 5 06:47:47 2006 From: codepo8 at gmail.com (Christian Heilmann) Date: Wed, 5 Apr 2006 12:47:47 +0100 Subject: [thelist] AJAX Tip In-Reply-To: <4433A7DD.8010601@netvision.net> References: <443399D1.4000201@netvision.net> <4433A697.4000603@alphanumeric.cz> <4433A7DD.8010601@netvision.net> Message-ID: <30bd6ffd0604050447o159c48c9odbebd9bbf69d2388@mail.gmail.com> > > FYI no AJAX in there. Solely DOM. > > > Steady on! Lightbox is a very cool script, no doubt, but it has > > nothing to do with AJAX, let's not confuse matters. > > Well now how do you like that? The author posted a note to another list > I am on announcing this tool and clearly indicated it is somehow > considered AJAX. I myself didn't look under the hood to see how it works. Then tell him it is not true, especially not AJAX as there is no X (which does stand for XML) involved at all. I am not demeaning the script - it is a very good script- but it is just not AJAX, and for a good reason as you'd need to have a server and some server side code to use it were it to be AJAX. My image preview script uses an optional server side component to resize images on the fly, but it is not AJAX either: http://icant.co.uk/articles/imagepreview/ > > And yes, lightbox is not Web2.0 either :-) > > What precisely does this mean? Just preventing another hyped term to be applied to it :-) Defining Web2.0 is tough, but if somebody were to claim something like lightbox is web2.0 you can ask where the community part of it is :) http://en.wikipedia.org/wiki/Web2.0 http://www.oreillynet.com/pub/a/oreilly/tim/news/2005/09/30/what-is-web-20.html -- Chris Heilmann Blog: http://www.wait-till-i.com Writing: http://icant.co.uk/ Binaries: http://www.onlinetools.org/ From bird at koolfish.com Wed Apr 5 07:12:13 2006 From: bird at koolfish.com (Birdie) Date: Wed, 05 Apr 2006 20:12:13 +0800 Subject: [thelist] Hosting :http://www.theplanet.com/ Message-ID: <0IX90071S0KXT2H0@kbsmtao2.starhub.net.sg> Has anyone got any good or bad things to say about the hosting at http://www.theplanet.com/ particularly about the dedicated servers and the response of technical support. Thanks Lisa From colclasure at BATTELLE.ORG Tue Apr 4 12:45:52 2006 From: colclasure at BATTELLE.ORG (Colclasure, Wyett H) Date: Tue, 04 Apr 2006 13:45:52 -0400 Subject: [thelist] Rewrite https:// to http:// ?? Message-ID: We've just been handed this whiz-bang redesigned website that runs on an PHP & Apache server. I need a brain to pick!! I want to convert an https call to an ordinary http call in a couple of places: 1. Reroute a user that typed https://address/file in the address bar to http://address/file 2. I can use rewrite rules to force specified pages to run on https but can't figure out how to get them back down to http outside of bypassing the PHP generated relative links with a hardcoded page TIA --WHC . From grugnog at grugnog.com Wed Apr 5 05:59:39 2006 From: grugnog at grugnog.com (Grugnog) Date: Wed, 05 Apr 2006 11:59:39 +0100 Subject: [thelist] AJAX Tip In-Reply-To: <30bd6ffd0604050333m38bba2a7g51696614081e485a@mail.gmail.com> References: <443399D1.4000201@netvision.net> <30bd6ffd0604050333m38bba2a7g51696614081e485a@mail.gmail.com> Message-ID: <1144234780.9976.69.camel@localhost.localdomain> > And yes, lightbox is not Web2.0 either :-) Ahh, but is it Web 3.11 for Workgroups? From evolt at markgroen.com Wed Apr 5 08:35:00 2006 From: evolt at markgroen.com (Mark Groen) Date: Wed, 05 Apr 2006 06:35:00 -0700 Subject: [thelist] Hosting :http://www.theplanet.com/ In-Reply-To: <0IX90071S0KXT2H0@kbsmtao2.starhub.net.sg> References: <0IX90071S0KXT2H0@kbsmtao2.starhub.net.sg> Message-ID: <1144244100.6912.3.camel@mark> On Wed, 2006-04-05 at 20:12 +0800, Birdie wrote: > Has anyone got any good or bad things to say about the hosting at > http://www.theplanet.com/ particularly about the dedicated servers and the > response of technical support. I've been with them for almost two years now, very good service imho. Another company I know has over 800 U's there and they keep adding more, they must be doing something right. Their connectivity is what sold me actually, it's massive and reliable. -- Warm Regards, Mark Groen Box 57 Bowen Island, BC, V0N 1G0 604-780-6917 www.mgwebservices.ca From jblanchard at pocket.com Wed Apr 5 08:37:10 2006 From: jblanchard at pocket.com (Jay Blanchard) Date: Wed, 5 Apr 2006 08:37:10 -0500 Subject: [thelist] AJAX Tip Message-ID: <56608562F6D5D948B22F5615E3F57E6921BDC8@YGEX01WAL.onecall.local> [snip] > And yes, lightbox is not Web2.0 either :-) Ahh, but is it Web 3.11 for Workgroups? -- [/snip] I thought it was WebXP Home Edition. Caution: tips are owed. To get the number of days in a month use LAST_DAY in your query; SELECT LAST_DAY('2003-02-05'); -> '2003-02-28' SELECT LAST_DAY('2004-02-05'); -> '2004-02-29' SELECT LAST_DAY('2004-01-01 01:01:01'); -> '2004-01-31' SELECT LAST_DAY('2003-03-32'); <---invalid date -> NULL From Brian at hondaswap.com Wed Apr 5 08:40:29 2006 From: Brian at hondaswap.com (Brian Cummiskey) Date: Wed, 05 Apr 2006 09:40:29 -0400 Subject: [thelist] Hosting :http://www.theplanet.com/ In-Reply-To: <1144244100.6912.3.camel@mark> References: <0IX90071S0KXT2H0@kbsmtao2.starhub.net.sg> <1144244100.6912.3.camel@mark> Message-ID: <4433C8CD.6040603@hondaswap.com> >>Has anyone got any good or bad things to say about the hosting at >>http://www.theplanet.com/ particularly about the dedicated servers and the >>response of technical support. I am also on theplanet for about 2.5 years now. No complaints. good service, intelligent technicians. Half the time i have a ticket open before i even know anything is down. From hershelr at netvision.net.il Wed Apr 5 08:50:18 2006 From: hershelr at netvision.net.il (Hershel Robinson) Date: Wed, 05 Apr 2006 16:50:18 +0300 Subject: [thelist] AJAX Tip In-Reply-To: <30bd6ffd0604050447o159c48c9odbebd9bbf69d2388@mail.gmail.com> References: <443399D1.4000201@netvision.net> <4433A697.4000603@alphanumeric.cz> <4433A7DD.8010601@netvision.net> <30bd6ffd0604050447o159c48c9odbebd9bbf69d2388@mail.gmail.com> Message-ID: <4433CB1A.4000209@netvision.net> > My image preview script uses an optional > server side component to resize images on the fly, but it is not AJAX > either: > http://icant.co.uk/articles/imagepreview/ When I click on a camera icon in FF 1.5 Win 2K and then click on the image, a 1 pixel dotted border is left around the camera and where the picture was. -- Gallery Robinson Web Services http://web.galleryrobinson.com/ From bird at koolfish.com Wed Apr 5 08:49:31 2006 From: bird at koolfish.com (Birdie) Date: Wed, 05 Apr 2006 21:49:31 +0800 Subject: [thelist] Hosting :http://www.theplanet.com/ In-Reply-To: <1144244100.6912.3.camel@mark> Message-ID: <0IX900IPA52YPY30@kbsmtao2.starhub.net.sg> Mark wrote: I've been with them for almost two years now, very good service imho. Another company I know has over 800 U's there and they keep adding more, they must be doing something right. Their connectivity is what sold me actually, it's massive and reliable. Thanks, I am a big dreamhost fan and usually host all my sites with them but this time I am in need of a windows dedicated server. I have read many good reviews on this list from people about crystaltech.com but just wanted to check these guys out as well as my subcontractors use them. Thanks for your feedback. Lisa From john_walker2002 at hotmail.com Wed Apr 5 09:11:13 2006 From: john_walker2002 at hotmail.com (John Walker) Date: Wed, 05 Apr 2006 10:11:13 -0400 Subject: [thelist] Floating layer repositioning Message-ID: All - I am trying to add a floating layer to a website. The problem I am having is that when the window is resized, the floating layer doesn't reposition. This is giving me a Left / Right scrollbar. I am trying to figure out how to reposition the layer when the window is resized. Any and all information would be greatly appreciated. From JCanfield at PacAdvantage.org Wed Apr 5 10:01:01 2006 From: JCanfield at PacAdvantage.org (Canfield, Joel) Date: Wed, 5 Apr 2006 08:01:01 -0700 Subject: [thelist] [job] Head of Front end development, London UK Message-ID: > Hopefully this is OK with the admins here. Should post on the site as well, but here is good, too > We are looking to replace me that's not gonna be easy hope 1) you're moving somewhere very cool that'll excercise your little grey cells and 2) you'll still be here on thelist, posting your heart out; thoroughly enjoying the naked-day thread, among others joel From JCanfield at PacAdvantage.org Wed Apr 5 10:29:02 2006 From: JCanfield at PacAdvantage.org (Canfield, Joel) Date: Wed, 5 Apr 2006 08:29:02 -0700 Subject: [thelist] Script for M$IE only, or not Message-ID: > That is what collaboration is for. The CSS-discuss Wiki is a good > example, albeit deteriorating at the moment, too. Could it be because > we spend our time writing about how cool we are and recording podcasts > talking to other cool web developers about how adding another CSS > selector has made our lives complete? all kidding aside (I'll assume you were being a touch sarcastic toward the end there ;) I've noticed lately that I'm finally starting to ramp up my skills again, getting more web work (haven't done it full-time for a few years) and really really needing to update my skills from 1998 so, who knows; maybe another wave of WaSP/MACCAWS-type thinking is coming, and folks like me who really need to catch up will do a better job of learning from folks like you who obviously 'get' CSS, among other things, in a way I only dream of right now. but sometimes it's hard to cram in all this learning around studying for my real estate license update and teaching the band my new songs and the rest of my real life spinhead From mwarden at gmail.com Wed Apr 5 10:31:42 2006 From: mwarden at gmail.com (Matt Warden) Date: Wed, 05 Apr 2006 11:31:42 -0400 Subject: [thelist] AJAX pains - why is Safari being bitchy? In-Reply-To: <30bd6ffd0604050347y7fd6fe69l3fd4a90af6dac383@mail.gmail.com> References: <30bd6ffd0604050347y7fd6fe69l3fd4a90af6dac383@mail.gmail.com> Message-ID: <4433E2DE.5070207@gmail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Christian Heilmann wrote: > I just put an RSS displayer online for you to check out: > > http://onlinetools.org/tools/feednav/ > > My issue with it is Safari: > > 1) Safari doesn't seem to get request.status although I made the > request unique with a timestamp: > request.open('get',feednavcfg.serverScript+encodeURI(url)+'&t='+now.getTime()); > > 2) In some feeds Safari does just hangs and does not even trigger the > timeOut I defined for bad requests. > > Any way around that or is it just a given until the next upgrade is out? Safari's cache logic is borked. Until they fix it, I've been forcing Safari to avoid its cache. Not exactly the best option in a lot of cases, but since you're trying to make the request unique anyway, sounds like this might be for you. Before you call send(): request.setRequestHeader('If-Modified-Since', 'Sat, 29 Oct 1994 00:00:00 GMT'); The date is arbitrary. Just make sure it's formatted correctly - -- Matt Warden Miami University Oxford, OH, USA http://mattwarden.com This email proudly and graciously contributes to entropy. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFEM+LerI3LObhzHRMRAhL7AJ4uUE+fzEIWbgTx9woVTyMgf+1dhQCg4M6d Wcogi4oZ+bsNMQgGQFmtWQA= =FgdX -----END PGP SIGNATURE----- From Conleyj at kubota-kma.com Wed Apr 5 10:44:07 2006 From: Conleyj at kubota-kma.com (James Conley) Date: Wed, 5 Apr 2006 11:44:07 -0400 Subject: [thelist] AJAX Tip Message-ID: > > And yes, lightbox is not Web2.0 either :-) > > What precisely does this mean? It's a buzzword. Thus the websites you develop are Web 2.0 while your competitors are not. Caustic Tech recently bogged about Web 2.0 http://caustictech.typepad.com/ James c From rich at richpoints.com Wed Apr 5 10:48:43 2006 From: rich at richpoints.com (Rich Points) Date: Wed, 05 Apr 2006 09:48:43 -0600 Subject: [thelist] Redirect 301 a scary history - moving forward Message-ID: <4433E6DB.1040405@richpoints.com> Hi, I started working on commerce about a year and a half ago. This site has been around since about 1997 and has had numerous web masters. When I took over there were many inconcintencies in file names and the extensions used. So the first thing I did was to make all that stuff consistent by giving all the pages an .shtml file extension. In addition I added a 301 redirect in the .htaccess file pointing the old addresses to the new ones. This seemed to work fine until last September, I don't remember the exact date, when Google danced and knocked many of the top keywords for this site off the chart. Those keywords have bounced back but they still aren't as strong as they once were. Now the client is moving to a new CMS and shopping cart system. To do this will require another round of 301 redirects. I'm very nervous about doing this as I know another drop in search rankings will drive my client and myself nuts. Everything I've read about 301 redirects suggests that they work as intended. Here are my questions: * Was the drop that I experienced last fall just a Google thing or was it related to my redirects? * If I do another round of redirects would it be "safe" to get rid of the old ones which were first set over a year ago? * Should I gradually introduce the new redirects or do them all at once? * Any other considerations? Thanks Rich From struan at exo.org.uk Wed Apr 5 10:52:53 2006 From: struan at exo.org.uk (Struan Donald) Date: Wed, 5 Apr 2006 16:52:53 +0100 Subject: [thelist] Redirect 301 a scary history - moving forward In-Reply-To: <4433E6DB.1040405@richpoints.com> References: <4433E6DB.1040405@richpoints.com> Message-ID: <20060405155253.GA17825@bollo.hoodee.co.uk> * at 05/04 09:48 -0600 Rich Points said: > * If I do another round of redirects would it be "safe" to get rid > of the old ones which were first set over a year ago? How often are they used? It should be fairly easy to find out from the log files. If they're still used a lot then I'd think about updating them to point at the new pages rather than have two redirects occuring for each page. If you do keep then them put them after the newer redirects so Apache can short ciruit out of the redirect process as quickly as possible. If they're not used a lot then I'd ditch them and maybe update the 404 page for the site with information about the changes. cheers Struan From anthony at baratta.com Wed Apr 5 11:05:17 2006 From: anthony at baratta.com (Anthony Baratta) Date: Wed, 5 Apr 2006 09:05:17 -0700 Subject: [thelist] [SPAM] Rewrite https:// to http:// ?? Message-ID: <96fb9050377cafd2cea34bfaa2932384@baratta.com> > 1. Reroute a user that typed https://address/file in the address bar to > http://address/file > 2. I can use rewrite rules to force specified pages to run on https but > can't figure out how to get them back down to http outside of bypassing > the PHP generated relative links with a hardcoded page Look for the HTTPS header / server variable. It should be off or on. Act accordingly. From fuzzy2k at pacbell.net Wed Apr 5 11:23:17 2006 From: fuzzy2k at pacbell.net (Michael Sprague) Date: Wed, 5 Apr 2006 09:23:17 -0700 (PDT) Subject: [thelist] PDF page with close button Message-ID: <20060405162317.75978.qmail@web82008.mail.mud.yahoo.com> I am working on a page for non-tech-savvy people who need to reference various different sections of a 140ish page pdf file in order to fill out forms they have been mailed or given in person. The theory is they will open one page, look at it, then close it and look at another page... lather, rinse, repeat until done. They will likely open from one to six or eight pages each. I need to be able open up a pop-up window from each of 39 different links on a page to display various different specific sections of a large pdf file. The resulting page needs to have a Close button on it. The above gets me a pop-up window with my specific page in the pdf file displayed, but I am not sure what the best method is, to get a Close button on the page. I was thinking frames, but how do I open a frameset with a close button in one frame and 1 of 39 different pdf sections in the other? I could do it with 39 different frame sets, but I was kind of hoping one of you js gurus might have a more elegant, less repetitive solution. My gut tells me that this is possible in js, but my brain isn't getting me the rest of the way there, and neither is my searching the web. Thank you. Michael Sprague 310.497.7850 c 608.541.6532 fax Serving the interweb since 1995. From pieter at roosensdesign.com Wed Apr 5 11:27:35 2006 From: pieter at roosensdesign.com (Pieter Roosens) Date: Wed, 5 Apr 2006 18:27:35 +0200 Subject: [thelist] Floating layer repositioning In-Reply-To: References: Message-ID: Op 5-apr-06, om 16:11 heeft John Walker het volgende geschreven: > I am trying to add a floating layer to a website. The problem I am > having > is that when the window is resized, the floating layer doesn't > reposition. > This is giving me a Left / Right scrollbar. I am trying to figure > out how > to reposition the layer when the window is resized. > > Any and all information would be greatly appreciated. > Can be a lot of things. Positioning should be: relative Margin should be: auto Depend on browsers also. IE on WIN needs strict mode. Hope this helps, Pieter ----------------------------------------- http://www.roosensdesign.com From morrison.ben at gmail.com Wed Apr 5 11:31:05 2006 From: morrison.ben at gmail.com (ben morrison) Date: Wed, 5 Apr 2006 17:31:05 +0100 Subject: [thelist] Windows XP on a mac Message-ID: <6073aef90604050931g485016ecs1824846bfd4aa771@mail.gmail.com> Apple has formally given its thumbs-up to attempts to install and run Windows XP on Intel-based Macs. http://www.reghardware.co.uk/2006/04/05/apple_okays_winxp_on_macs/ ben From codepo8 at gmail.com Wed Apr 5 11:41:34 2006 From: codepo8 at gmail.com (Christian Heilmann) Date: Wed, 5 Apr 2006 17:41:34 +0100 Subject: [thelist] AJAX pains - why is Safari being bitchy? In-Reply-To: <4433E2DE.5070207@gmail.com> References: <30bd6ffd0604050347y7fd6fe69l3fd4a90af6dac383@mail.gmail.com> <4433E2DE.5070207@gmail.com> Message-ID: <30bd6ffd0604050941q6fc7c01dw321551f20040270d@mail.gmail.com> > Safari's cache logic is borked. Until they fix it, I've been forcing > Safari to avoid its cache. Not exactly the best option in a lot of > cases, but since you're trying to make the request unique anyway, sounds > like this might be for you. > > Before you call send(): > > request.setRequestHeader('If-Modified-Since', > 'Sat, 29 Oct 1994 00:00:00 GMT'); Does that fix the status thing as well? From john_walker2002 at hotmail.com Wed Apr 5 11:46:07 2006 From: john_walker2002 at hotmail.com (John Walker) Date: Wed, 05 Apr 2006 12:46:07 -0400 Subject: [thelist] Floating layer repositioning In-Reply-To: Message-ID: Thanks for the info... I have figured it out by using window.onresize Thanks again!!! From sbeam at onsetcorps.net Wed Apr 5 11:53:08 2006 From: sbeam at onsetcorps.net (sbeam) Date: Wed, 5 Apr 2006 11:53:08 -0500 Subject: [thelist] Rewrite https:// to http:// ?? In-Reply-To: References: Message-ID: <200604051253.08161.sbeam@onsetcorps.net> On Tuesday 04 April 2006 01:45 pm, Colclasure, Wyett H wrote: > 1. Reroute a user that typed https://address/file in the address bar to > http://address/file > 2. I can use rewrite rules to force specified pages to run on https but > can't figure out how to get them back down to http outside of bypassing > the PHP generated relative links with a hardcoded page two ideas: 1) do it in PHP. this affects only .php pages (obviously) which may or may not be OK depending on your needs. I've been known to use auto_prepend_file to include a script that might include, among other things, a block like: /** redirect to non-SSL page if we don't need it **/ if ($_SERVER['SERVER_PORT'] == 443 and !preg_match('/^\/secure\//' $_SERVER['REQUEST_URI'])) { header("Location: http://" . $_SERVER['HTTP_HOST']. $_SERVER['REQUEST_URI']); header("Connection: close"); exit(); } this has the advantage of allowing top-level images, css, etc called from pages within /secure/ to also go over SSL, avoiding the browser warning. 2) use mod_rewrite to do it based on subdomain name or directory name. Prob similar to what you are doing for the reverse direction. ... SSL setup stuff ... RewriteCond %{SERVER_PORT} !^80$ RewriteRule !^(secure/.*) http://domain.com/$1 [R,L] this might be faster (?) and cleaner. But you can get into a nice infinite redirect loop if not careful. of course if you need to get more creative with the regexps then you can. hth -- # S Beam - Web App Dev Servs # http://www.onsetcorps.net/ From Chris at globet.com Wed Apr 5 11:53:32 2006 From: Chris at globet.com (Chris at globet.com) Date: Wed, 5 Apr 2006 17:53:32 +0100 Subject: [thelist] PDF page with close button Message-ID: Michael [..] > I need to be able open up a pop-up window from each of 39 > different links on a page to display various different > specific sections of a large pdf file. The resulting page > needs to have a Close button on it. Even though there is a close button in the top right-hand corner of the browser window? > > > The above gets me a pop-up window with my specific page in > the pdf file displayed, but I am not sure what the best > method is, to get a Close button on the page. > > I was thinking frames, but how do I open a frameset with a > close button in one frame and 1 of 39 different pdf sections > in the other? I could do it with 39 different frame sets, > but I was kind of hoping one of you js gurus might have a > more elegant, less repetitive solution. Have you got access to a server-side scripting technology? If so, you could specify an id for each PDF, and then display the appropriate PDF according to the id. So, your anchor tag would look something like the following: .. The file pdfFrame.asp (or php, or whichever technology you're using) would then have some logic along the following lines: // Get id from querystring // Find pdf filename for id from data structure (text file, database, array etc.) // Output HTML, including the correct PDF file path as a frame src attribute value > My gut tells me that this is possible in js, but my brain > isn't getting me the rest of the way there, and neither is my > searching the web. It would be possible using similar logic to that shown above, but you would have to work very hard to make it accessible. Instead of outputting the HTML, though, you could use the DOM to change the value of the src attribute of the frame to reflect the path to the PDF. Ensure that you do not allow XSS exploits if you take this route . Personally, I would argue that (IMHO) a PDF is not a webpage, and trying to treat it as such will lead to nothing but woe. Don't forget that a system like this will only work for browsers that are configured to display a PDF, the rest will only offer a download anyway. HTH Chris Marsh Web Developer http://www.globet.com/ Tel: +44 20 8246 4804 Ext 828 Fax: +44 20 8246 4808 Any opinions expressed in this email are those of the individual and not necessarily the Company. This message is intended for the use of the individual or entity to which it is addressed and may contain information that is confidential and privileged and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please contact the sender immediately and delete it from your system. From pixelmech at yahoo.com Wed Apr 5 11:53:10 2006 From: pixelmech at yahoo.com (Tom Dell'Aringa) Date: Wed, 5 Apr 2006 09:53:10 -0700 (PDT) Subject: [thelist] JavaScript/DOM columns solutions/ideas? Message-ID: <20060405165310.57357.qmail@web51415.mail.yahoo.com> Hi everyone, I just picked up a new client who is developing a complex financial application, somewhat ajax like. One aspect involves having a long list of items in 3-4 columns. You'd be able to add/remove items and have them update dynamically. The issue is that they are organized *vertically* in columns, not horizontally (they read up and down, like a newspaper article with columns - not left to right). This presents the problem of trying to add/remove one item and have the rest flow correctly to fill in/add space. Each column has 25 items. Their original mock has tables. Adding/removing rows is easy in one table, but we'd have 3 or 4 of them. If i took one out of column two... I thought of using DIVs or better yet LI elements. But the problem remains - how to get them to flow across columns. I suppose the whole list could be rewritten but we'd like to avoid that if possible. I found one article on alistapart for having LIs cross columns, but it's not a great solution that would present some serious challenges dynamically. I realize this is a toughie, In 10 years I've never really seen it done. Any suggestions appreciated. Tom http://www.pixelmech.com/ http://www.crossandthrone.com/ Chuck Norris is the reason why Waldo is hiding. From JCanfield at PacAdvantage.org Wed Apr 5 12:43:39 2006 From: JCanfield at PacAdvantage.org (Canfield, Joel) Date: Wed, 5 Apr 2006 10:43:39 -0700 Subject: [thelist] JavaScript/DOM columns solutions/ideas? Message-ID: > The issue is that they are organized *vertically* in columns, > not horizontally (they read up and > down, like a newspaper article with columns - not left to right). are the columns independent, or would removing an item in column two require columns three and four to flow backwards? is changing the flow an option? spinhead From anthony at baratta.com Wed Apr 5 12:52:06 2006 From: anthony at baratta.com (Anthony Baratta) Date: Wed, 5 Apr 2006 10:52:06 -0700 Subject: [thelist] JavaScript/DOM columns solutions/ideas? Message-ID: If you are thinking AJAX, then the re-ordering can be done on the server side and sent back to the browser with the proper layout, and plopped into place. If you want to reorder via the client side, store the "list" as an XML tree in the "flow" order, pinch out the element you want to remove and then use the changed XML tree to rebuild the column list. At first pass, I'd try floating divs, iterating through the xml list grabbing every X number in the list based on how many columns you have. Or of you don't care about total number of columns wide, just care about how many rows there are - it's just like a pagination problem, calc how may columns you will need (e.g. pages) and re-order the list from there. From david at gigawatt.com Wed Apr 5 13:15:49 2006 From: david at gigawatt.com (David Kaufman) Date: Wed, 5 Apr 2006 14:15:49 -0400 Subject: [thelist] Hosting :http://www.theplanet.com/ References: <0IX90071S0KXT2H0@kbsmtao2.starhub.net.sg> Message-ID: <002d01c658dc$f7e61be0$020010ac@cylon> Hi Lisa! Birdie wrote: > Has anyone got any good or bad things to say about the hosting at > http://www.theplanet.com/ particularly about the dedicated servers > and the response of technical support. > > Thanks > > Lisa www.Evolt.org has been hosted at ServerMatrix.com, which is a product/division of ThePlanet.com (their low-end service, I believe :-)) for about a year now along with, of course, this mailing list :-) I can't say anything helpful about their support response time, as I've never needed to open a support ticket. Downtime has been all but nonexistent. There've been a few scheduled network maintenance periods of a bout 2-4 hours in the middle of the night (US night, that is...). Network performance has been excellent: great bandwidth, low latency. My only negative experience with them was an $10/month price hike that came with only about a month's notice. Evolt runs on their bargain basement dedicated server and, due to us getting in on a special they were running at the time (back when they *had* specials -- lately their specials are, well, not so special...) and a 6-month prepayment discount (which is also no longer advertised, but you should ask a sales rep) we only paid $59 per month originally. I was really aggravated when they bumped that up to $69 so suddenly, but it's still a helluva good deal! It's essentially the same hardware and service for which they're charging um... $199/month -- at the moment. Best compliment I can give to a hosting provider: it "just works"! -dave From david at gigawatt.com Wed Apr 5 13:27:10 2006 From: david at gigawatt.com (David Kaufman) Date: Wed, 5 Apr 2006 14:27:10 -0400 Subject: [thelist] AJAX Tip References: <443399D1.4000201@netvision.net> <30bd6ffd0604050333m38bba2a7g51696614081e485a@mail.gmail.com> Message-ID: <004501c658de$8d9d7b50$020010ac@cylon> Christian Heilmann wrote: > >> Hershel Robinson wote: >> Just saw this today: >> http://www.huddletogether.com/projects/lightbox2/ > > Steady on! Lightbox is a very cool script, no doubt, but it has > nothing to do with AJAX, let's not confuse matters. > > AJAX means using XMLHTTPRequest to talk to the server, all lightbox > does is load an image. if you view the source on that page, notice: The Prototype [http://prototype.conio.net/] and Scriptaculous [http://script.aculo.us/] (which extends Prototype) are certainly the on the cutting edge of free, open source, standards-compliant and cross-browser AJAX capable Javascript libraries. They also include lots of advanced (and cool) DOM visual effects, which may or may not be used with XmlHttpRequest or XML data, so if (and I haven't checked) his lightbox.js does actually *use* those two other libraries, I'd certainly characterize it as "Web 2.0" even if it's neither strictly asynchronous nor using any actual xml data... :-) -dave From julian.rickards at ndm.gov.on.ca Wed Apr 5 13:38:09 2006 From: julian.rickards at ndm.gov.on.ca (Rickards, Julian (NDM)) Date: Wed, 5 Apr 2006 14:38:09 -0400 Subject: [thelist] SUSPECT: RE: Hosting :http://www.theplanet.com/ Message-ID: <5178736BD089DB449F4A4DD9D3D3C27D11F17E@LRCPSUDCMXMB001.lrc.ad.gov.on.ca> Is anyone on this list involved in the management of the TOEvolt.org domain? If so, can they have a look at TOEvolt.org and remove the redirect to Cliterati.co.uk. (Yes, the name of the domain is indicative of the content on the site that TOEvolters would be redirected to.) Jules -----Original Message----- www.Evolt.org has been hosted at ServerMatrix.com, which is a product/division of ThePlanet.com (their low-end service, I believe :-)) for about a year now along with, of course, this mailing list :-) From jdowdell at adobe.com Wed Apr 5 13:42:38 2006 From: jdowdell at adobe.com (John Dowdell) Date: Wed, 05 Apr 2006 11:42:38 -0700 Subject: [thelist] AJAX Tip In-Reply-To: <30bd6ffd0604050333m38bba2a7g51696614081e485a@mail.gmail.com> References: <443399D1.4000201@netvision.net> <30bd6ffd0604050333m38bba2a7g51696614081e485a@mail.gmail.com> Message-ID: <44340F9E.2020505@adobe.com> Christian Heilmann wrote: > Steady on! Lightbox is a very cool script, no doubt, but it has > nothing to do with AJAX, let's not confuse matters. > AJAX means using XMLHTTPRequest to talk to the server, all lightbox > does is load an image. I think you're both right. Sometimes I use "AJaX", or "literal Ajax" to refer to JavaScript apps which refresh text via XmlHttpRequest, while using "Ajax" or "literary Ajax" to refer to the whole marketing movement around the term. People mean both things by this term these days. jd -- John Dowdell . Adobe Developer Support . San Francisco CA USA Weblog: http://weblogs.macromedia.com/jd Aggregator: http://weblogs.macromedia.com/mxna Technotes: http://www.macromedia.com/support/ Spam killed my private email -- public record is best, thanks. From john at userfrenzy.com Wed Apr 5 13:55:04 2006 From: john at userfrenzy.com (John Handelaar) Date: Wed, 05 Apr 2006 19:55:04 +0100 Subject: [thelist] SUSPECT: RE: Hosting :http://www.theplanet.com/ In-Reply-To: <5178736BD089DB449F4A4DD9D3D3C27D11F17E@LRCPSUDCMXMB001.lrc.ad.gov.on.ca> References: <5178736BD089DB449F4A4DD9D3D3C27D11F17E@LRCPSUDCMXMB001.lrc.ad.gov.on.ca> Message-ID: <44341288.5020507@userfrenzy.com> Rickards, Julian (NDM) wrote: > Is anyone on this list involved in the management of the > TOEvolt.org domain? If so, can they have a look at TOEvolt.org > and remove the redirect Erk. Fixed. -- ------------------------------------------- John Handelaar E john at handelaar.org T +353 21 427 9033 M +353 85 748 3790 http://handelaar.org ------------------------------------------- Work in progress: http://dev.vocalvoter.com ------------------------------------------- From julian.rickards at ndm.gov.on.ca Wed Apr 5 13:57:58 2006 From: julian.rickards at ndm.gov.on.ca (Rickards, Julian (NDM)) Date: Wed, 5 Apr 2006 14:57:58 -0400 Subject: [thelist] SUSPECT: RE: Hosting :http://www.theplanet.com/ Message-ID: <5178736BD089DB449F4A4DD9D3D3C27D11F180@LRCPSUDCMXMB001.lrc.ad.gov.on.ca> Many thanks. I wrote to this list many times but each time I used the word H-acked in it and it was held back for administrative review before my post went out. (You may see it again once it has been approved.) Jules -----Original Message----- Rickards, Julian (NDM) wrote: > Is anyone on this list involved in the management of the > TOEvolt.org domain? If so, can they have a look at TOEvolt.org > and remove the redirect Erk. Fixed. From fuzzy2k at pacbell.net Wed Apr 5 14:39:00 2006 From: fuzzy2k at pacbell.net (Michael Sprague) Date: Wed, 5 Apr 2006 12:39:00 -0700 (PDT) Subject: [thelist] PDF page with close button, maybe using frames? was Re: PDF page with close button Message-ID: <20060405193900.67442.qmail@web82008.mail.mud.yahoo.com> Yes. Even though there is a Perfectly Reasonable Close Button in the Top Right, or in a few isolated cases, Top Left corner of the browser window. I have given up trying to understand why those easy options are too much for some people to grasp. thelist-request at lists.evolt.org wrote: ------------------------------ Subject: Re: [thelist] PDF page with close button Even though there is a close button in the top right-hand corner of the browser window? Have you got access to a server-side scripting technology? If so, you could specify an id for each PDF, and then display the appropriate PDF according to the id. So, your anchor tag would look something like the following: The file pdfFrame.asp (or php, or whichever technology you're using) would then have some logic along the following lines: // Get id from querystring // Find pdf filename for id from data structure (text file, database, array etc.) // Output HTML, including the correct PDF file path as a frame src attribute value It would be possible using similar logic to that shown above, but you would have to work very hard to make it accessible. Instead of outputting the HTML, though, you could use the DOM to change the value of the src attribute of the frame to reflect the path to the PDF. Ensure that you do not allow XSS exploits if you take this route . Personally, I would argue that (IMHO) a PDF is not a webpage, and trying to treat it as such will lead to nothing but woe. Don't forget that a system like this will only work for browsers that are configured to display a PDF, the rest will only offer a download anyway. If I had access to asp or php in this environment, then I would not be doing this page- they would give it to someone with knowledge of those environments. Thanks for the response. I will keep looking. Michael Sprague 310.497.7850 c 608.541.6532 fax Serving the interweb since 1995. From mwarden at gmail.com Wed Apr 5 14:55:18 2006 From: mwarden at gmail.com (Matt Warden) Date: Wed, 05 Apr 2006 15:55:18 -0400 Subject: [thelist] AJAX pains - why is Safari being bitchy? In-Reply-To: <30bd6ffd0604050941q6fc7c01dw321551f20040270d@mail.gmail.com> References: <30bd6ffd0604050347y7fd6fe69l3fd4a90af6dac383@mail.gmail.com> <4433E2DE.5070207@gmail.com> <30bd6ffd0604050941q6fc7c01dw321551f20040270d@mail.gmail.com> Message-ID: <443420A6.5060603@gmail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Christian Heilmann wrote: >>Safari's cache logic is borked. Until they fix it, I've been forcing >>Safari to avoid its cache. Not exactly the best option in a lot of >>cases, but since you're trying to make the request unique anyway, sounds >>like this might be for you. >> >>Before you call send(): >> >>request.setRequestHeader('If-Modified-Since', >> 'Sat, 29 Oct 1994 00:00:00 GMT'); > > > Does that fix the status thing as well? The undefined status bug is a result of the page being pulled from cache. See: http://www.google.com/search?q=safari+xmlhttprequest+undefined+status - -- Matt Warden Miami University Oxford, OH, USA http://mattwarden.com This email proudly and graciously contributes to entropy. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFENCCmrI3LObhzHRMRAs1lAJ9kzpZo9NS1gXK4h271aRy2JErK8gCfYVQg csSxLABzYkGx/Jk0wD6DOSg= =zZ9J -----END PGP SIGNATURE----- From mwarden at gmail.com Wed Apr 5 15:07:52 2006 From: mwarden at gmail.com (Matt Warden) Date: Wed, 05 Apr 2006 16:07:52 -0400 Subject: [thelist] AJAX Tip In-Reply-To: <44340F9E.2020505@adobe.com> References: <443399D1.4000201@netvision.net> <30bd6ffd0604050333m38bba2a7g51696614081e485a@mail.gmail.com> <44340F9E.2020505@adobe.com> Message-ID: <44342398.5040409@gmail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 John Dowdell wrote: > People mean both things by this term [ajax] these days. Which is a shame, because it's very clear what 'ajax' stands for. We have an acronymn for the other stuff: dhtml (or dom). - -- Matt Warden Miami University Oxford, OH, USA http://mattwarden.com This email proudly and graciously contributes to entropy. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFENCOYrI3LObhzHRMRAoxCAJsFLssRKDblRoJ8s50B9oMYSNZZQwCeNupu L4n09JoLEmH5Tjng2wGxtiM= =lqGI -----END PGP SIGNATURE----- From codepo8 at gmail.com Wed Apr 5 15:22:27 2006 From: codepo8 at gmail.com (Christian Heilmann) Date: Wed, 5 Apr 2006 21:22:27 +0100 Subject: [thelist] AJAX Tip In-Reply-To: <44342398.5040409@gmail.com> References: <443399D1.4000201@netvision.net> <30bd6ffd0604050333m38bba2a7g51696614081e485a@mail.gmail.com> <44340F9E.2020505@adobe.com> <44342398.5040409@gmail.com> Message-ID: <30bd6ffd0604051322v79be6824q44cafe0edd7b18a1@mail.gmail.com> > John Dowdell wrote: > > People mean both things by this term [ajax] these days. > > Which is a shame, because it's very clear what 'ajax' stands for. We > have an acronymn for the other stuff: dhtml (or dom). +1 just including prototype followed by an alert('hello world'); doesn't make a script AJAX. And especially fading and moving and zooming doesn't. This is DHTML. It took us quite a while to get JavaScript up to a recognised development skill, let's not confuse matters by mixing and matching terminology or even repeat the mistakes of the past. A interface that _needs_ JavaScript to work is just not clever, no matter how fancy it looks. From ian at zstudio.co.uk Wed Apr 5 16:42:06 2006 From: ian at zstudio.co.uk (Ian Anderson) Date: Wed, 05 Apr 2006 22:42:06 +0100 Subject: [thelist] AJAX Tip In-Reply-To: <44340F9E.2020505@adobe.com> References: <443399D1.4000201@netvision.net> <30bd6ffd0604050333m38bba2a7g51696614081e485a@mail.gmail.com> <44340F9E.2020505@adobe.com> Message-ID: <443439AE.3030206@zstudio.co.uk> John Dowdell wrote: > People mean both things by this term these days. It's easy to understand why people get this mixed up. The whole point is that you often can't see true AJAX working. It's the opposite of sexy. -- geek to manager: "Wow, look, did you see that? The page didn't reload!" -- manager: "Mmmm. Great!" (shuffles towards exit) Coupled with the fact that as in the case of draggable sort order widgets or Google maps, the AJAX part is usually physically - and very visually - associated with cool UI tricks that are based on prototype.js and similar DHTML effects. Try showing your business types the draggable widgets which may incidentally talk to the server asynchronously, and boy are they all over you like a cheap suit. "When can we have this? We need slidey things. Now." I agree with Christian and others that we should not confuse ourselves and others even more by calling things AJAX which are not, though. What's needed is a sexy, Web 2.0 sort of name for the DHTML UI tricks - I think these are actually really important going forward from here. The real appeal of the new applications comes from the general leap in usability they offer, which is partly due to the finer-grained communication delivered by AJAX (or Flash) asynchronous server calls without page refresh, and partly to the more intuitive, natural UI conventions that are now reliable, mainstream, cross-browser techniques. Yes, the latter are formally DHTML, but you don't want to be talking about DHTML in this millennium. The term carries too much derogatory baggage, in my opinion. -- _________________________________________________ zStudio - Web development and accessibility http://zStudio.co.uk Snippetz.net - Online code library File, manage and re-use your code snippets & links http://snippetz.net From chris at lwcdial.net Wed Apr 5 16:57:21 2006 From: chris at lwcdial.net (Chris Hayes) Date: Wed, 5 Apr 2006 22:57:21 +0100 Subject: [thelist] Hosting :http://www.theplanet.com/ References: <0IX90071S0KXT2H0@kbsmtao2.starhub.net.sg><1144244100.6912.3.camel@mark> <4433C8CD.6040603@hondaswap.com> Message-ID: <009c01c658fc$5df2bd70$152ca8c0@CHILLI> From: "Brian Cummiskey" Subject: Re: [thelist] Hosting :http://www.theplanet.com/ > Half the time i have a ticket open > before i even know anything is down. It's down half the time ? From codepo8 at gmail.com Wed Apr 5 17:07:08 2006 From: codepo8 at gmail.com (Christian Heilmann) Date: Wed, 5 Apr 2006 23:07:08 +0100 Subject: [thelist] AJAX Tip In-Reply-To: <443439AE.3030206@zstudio.co.uk> References: <443399D1.4000201@netvision.net> <30bd6ffd0604050333m38bba2a7g51696614081e485a@mail.gmail.com> <44340F9E.2020505@adobe.com> <443439AE.3030206@zstudio.co.uk> Message-ID: <30bd6ffd0604051507q61034b9y9067f302a68686a7@mail.gmail.com> > Yes, the latter are formally DHTML, but you don't want to be talking > about DHTML in this millennium. The term carries too much derogatory > baggage, in my opinion. ^ Thank you, that makes all the flak I got for my from DHTML to DOM Scripting article worth while. http://icant.co.uk/articles/from-dhtml-to-dom/ -- Chris Heilmann Blog: http://www.wait-till-i.com Writing: http://icant.co.uk/ Binaries: http://www.onlinetools.org/ From Brian at hondaswap.com Wed Apr 5 18:56:23 2006 From: Brian at hondaswap.com (Brian Cummiskey) Date: Wed, 05 Apr 2006 19:56:23 -0400 Subject: [thelist] Hosting :http://www.theplanet.com/ In-Reply-To: <009c01c658fc$5df2bd70$152ca8c0@CHILLI> References: <0IX90071S0KXT2H0@kbsmtao2.starhub.net.sg><1144244100.6912.3.camel@mark> <4433C8CD.6040603@hondaswap.com> <009c01c658fc$5df2bd70$152ca8c0@CHILLI> Message-ID: <44345927.6080704@hondaswap.com> Chris Hayes wrote: > > It's down half the time ? No, and my server has been up for some 500+ days too. We had a problem with apache locking up a while back. turned out stuff we were running wasn't compatible with 2.0, so we went back to 1.3. From steven.streight at gmail.com Wed Apr 5 19:20:36 2006 From: steven.streight at gmail.com (Steven Streight) Date: Wed, 5 Apr 2006 19:20:36 -0500 Subject: [thelist] e book on blog Message-ID: I want to display an ebook download link on my Vaspers the Grate blog, where a visitor pays to get the ebook. The ebook will be my original content. I think Adobe PDF is the way to go. But not sure how to begin. Anybody have any suggestions, or links to info for me? -- Steven Streight aka Vaspers the Grate Web Usability. Blogs. IT Audit/Control. Social Media. Vaspers the Grate http://www.vaspersthegrate.blogspot.com Revolutionary Army of the Infant Blog http://techrepublic.com.com/5247-6257-0.html Blog Revolution Custom Search Engine http://blog-revolution-search-engine-swicki.eurekster.com SKYPE: vaspersthegrate From thelist at cjmarsh.com Wed Apr 5 20:10:29 2006 From: thelist at cjmarsh.com (Chris Marsh) Date: Thu, 6 Apr 2006 02:10:29 +0100 Subject: [thelist] PDF page with close button, maybe using frames? was Re: PDF page with close button In-Reply-To: <20060405193900.67442.qmail@web82008.mail.mud.yahoo.com> Message-ID: <000a01c65916$e5c14900$0200000a@CJMLTP01> Michael [..] > If I had access to asp or php in this environment, then I > would not be doing this page- they would give it to someone > with knowledge of those environments. > > Thanks for the response. I will keep looking. Take a look at the code (view source) at . Try , changing the value of id from 1 to 6. Outside this range, the top frame defaults to Test1.htm. Does this point you in the right direction for a solution to your issue? To make the solution accessible, just have a direct link to your PDF documents from the href attribute of your anchor tag, and use javascript to launch your framed solution, thus: Click
    Click
    Click
    Click
    HTH Regards Chris Marsh -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.3.5/302 - Release Date: 05/04/2006 From evoltlist at delime.com Wed Apr 5 20:41:55 2006 From: evoltlist at delime.com (M. Seyon) Date: Wed, 05 Apr 2006 21:41:55 -0400 Subject: [thelist] e book on blog In-Reply-To: Message-ID: <4.2.0.58.20060405214040.01e449a8@mx.delime.com> Message from Steven Streight (4/5/2006 07:20 PM) >I want to display an ebook download link on my Vaspers the Grate blog, where >a visitor pays to get the ebook. The ebook will be my original content. > >I think Adobe PDF is the way to go. But not sure how to begin. > >Anybody have any suggestions, or links to info for me? Maybe lulu.com? http://www.lulu.com/help/node/view/1714 regards. -marc -- Trinidad Carnival in all its photographic glory. Playyuhself.com http://www.playyuhself.com/ From lists at neptunewebworks.com Wed Apr 5 22:11:23 2006 From: lists at neptunewebworks.com (Max Schwanekamp) Date: Wed, 05 Apr 2006 20:11:23 -0700 Subject: [thelist] e book on blog In-Reply-To: References: Message-ID: <443486DB.2080701@neptunewebworks.com> Steven Streight wrote: > I want to display an ebook download link on my Vaspers the Grate blog, where > a visitor pays to get the ebook. The ebook will be my original content. > I think Adobe PDF is the way to go. But not sure how to begin. > Anybody have any suggestions, or links to info for me? Any commerce software support downloadable products should suffice (GIYF). Customer clicks a link, fills in payment info, they get a download page and/or email with download link. If you're concerned about customers distributing unlicensed copies, you might want to look into PDF ebook/DRM features -- though generally that requires a copy of Acrobat, not just Reader, so you may not feel it worthwhile. IIRC Adobe Acrobat Pro has tools for secured PDF's built-in, and Google has a lot to say on this too: http://www.google.com/search?q=copy+protect+pdf -- Max Schwanekamp http://www.neptunewebworks.com/ From pixelmech at yahoo.com Wed Apr 5 12:50:06 2006 From: pixelmech at yahoo.com (Tom Dell'Aringa) Date: Wed, 5 Apr 2006 10:50:06 -0700 (PDT) Subject: [thelist] JavaScript/DOM columns solutions/ideas? Message-ID: <20060405175006.36216.qmail@web51408.mail.yahoo.com> It's the latter, the columns must flow whatever way it needs to, depending on where you added or subtracted an item (or items) from. Not sure what you mean by changing the flow, so far they want it vertical if that is what you mean (horizontal would be a piece of cake) Tom On 4/5/06, Canfield, Joel wrote: > The issue is that they are organized *vertically* in columns, > not horizontally (they read up and > down, like a newspaper article with columns - not left to right). are the columns independent, or would removing an item in column two require columns three and four to flow backwards? is changing the flow an option? spinhead http://www.pixelmech.com/ http://www.crossandthrone.com/ Chuck Norris is the reason why Waldo is hiding. From steven.streight at gmail.com Thu Apr 6 00:42:31 2006 From: steven.streight at gmail.com (Steven Streight) Date: Thu, 6 Apr 2006 00:42:31 -0500 Subject: [thelist] e book on blog In-Reply-To: <443486DB.2080701@neptunewebworks.com> References: <443486DB.2080701@neptunewebworks.com> Message-ID: Thanks Marc and Max, two long time friends on this list. Will check out your links. Lulu looks very good to me. In fact, I think I'll try Lulu with a collection of my science fiction stories, as an experiment. My other books are on the topics of blogs and web usability. From volkan.ozcelik at gmail.com Thu Apr 6 00:44:10 2006 From: volkan.ozcelik at gmail.com (=?ISO-8859-9?Q?VOLKAN_=D6Z=C7EL=DDK?=) Date: Thu, 6 Apr 2006 08:44:10 +0300 Subject: [thelist] cron job for crawling web pages In-Reply-To: References: Message-ID: Hi List, The current project I'm working on requires connecting to certain provider sites and storing the raw html from those sites for later processing. Note that what the project is not illegal or unethical, since the content provider sites will accept us to crawl them. Secondly, the provider sites does not give xml feed of any sort; no rss no nothing. We have to grab the data and mine it manually. Now comes the questions: Given that we will be using some *nix distribution (fedora core5 most probably), mySQL for the storage part, and again most probably apache as the web server and ruby on rails with ajax for the MVC structure (wow!) What technology will be apropriate here? imho, writing a servlet and calling it periodically with cron job would do it. can it done with ruby? If so how hard would that be? I believe java is much better in terms of low-level networking capabilities than ruby but I am not sure because I'm not as experienced in rails as I am in java. Secondly, though I theoretically can deduce what to do; I have not worked with a unix distribution for a long long time (I'm more of a win*server/sqlserver/.net guy) How hard will my life be? What should I expect as the unexpected? And finally, I will be running VMWare on my local machine (cuz I do not want to mess my win2k os since I'm developing .net projects there) Have you used it to deploy a *nix distribution. Did it cause any problems? Thank you very much in advance, -- Volkan Ozcelik +>Yep! I'm blogging! : http://www.volkanozcelik.com/volkanozcelik/blog/ +> My projects/studies/trials/errors : http://www.sarmal.com/ From steven.streight at gmail.com Thu Apr 6 00:46:21 2006 From: steven.streight at gmail.com (Steven Streight) Date: Thu, 6 Apr 2006 00:46:21 -0500 Subject: [thelist] Plone vs. Mambo Message-ID: I have a client who wants to move CMS from Mambo to some other service. They are seriously considering Double Knot. I am looking into Plone or Drupal. Take a look at wdboyce [dot] org for the client site, a local Boy Scout council in Peoria, IL. They wish to have a calendar with links to event pages and greater flexibility with images and layout. Any suggestions will be much appreciated. -- Steven Streight aka Vaspers the Grate Web Usability. Blogs. IT Audit/Control. Social Media. http://www.vaspersthegrate.blogspot.com http://techrepublic.com.com/5247-6257-0.html http://blog-revolution-search-engine-swicki.eurekster.com SKYPE: vaspersthegrate From Anthony at Baratta.com Thu Apr 6 02:04:50 2006 From: Anthony at Baratta.com (Anthony Baratta) Date: Thu, 06 Apr 2006 00:04:50 -0700 Subject: [thelist] [SPAM] cron job for crawling web pages In-Reply-To: References: Message-ID: <4434BD92.6010100@Baratta.com> What are you going to process the pages for? If you use Swish-e, you can spider the pages and index them into an index file or mySQL. http://swish-e.org/ Either way, the perl script that does the spidering could be tweaked to not run the HTML through Swish-e and store that for what every processing you want to do later. Hope that helps. From volkan.ozcelik at gmail.com Thu Apr 6 02:41:54 2006 From: volkan.ozcelik at gmail.com (=?ISO-8859-9?Q?VOLKAN_=D6Z=C7EL=DDK?=) Date: Thu, 6 Apr 2006 10:41:54 +0300 Subject: [thelist] [SPAM] cron job for crawling web pages In-Reply-To: <4434BD92.6010100@Baratta.com> References: <4434BD92.6010100@Baratta.com> Message-ID: 2006/4/6, Anthony Baratta : > > What are you going to process the pages for? If you use Swish-e, you can > spider the pages and index them into an index file or mySQL. I will be crawling three or four large sites which have a lot of traffic. The sites basically post sector-related info, news, and job ads - other valuable content and are updated at least on an hourly basis. I cannot give much detail about the business model though. Because it is a confidential data until the first beta of this site I'm working on launches. http://swish-e.org/ Thanks, I'll give that a try. But first I need to get my hands dirty with fedora. Cheers, -- Volkan Ozcelik +>Yep! I'm blogging! : http://www.volkanozcelik.com/volkanozcelik/blog/ +> My projects/studies/trials/errors : http://www.sarmal.com/ From hassan at webtuitive.com Thu Apr 6 03:41:08 2006 From: hassan at webtuitive.com (Hassan Schroeder) Date: Thu, 06 Apr 2006 01:41:08 -0700 Subject: [thelist] cron job for crawling web pages In-Reply-To: References: Message-ID: <4434D424.4060802@webtuitive.com> VOLKAN ?Z?EL?K wrote: > The current project I'm working on requires connecting to certain provider > sites and storing the raw html from those sites for later processing. > Given that we will be using some *nix distribution ... Probably available with your distro: > And finally, I will be running VMWare on my local machine (cuz I do not want > to mess my win2k os since I'm developing .net projects there) Have you used > it to deploy a *nix distribution. Did it cause any problems? I use VMWare to run instances of XP and W2K on my SuSE machine so that may not be exactly analogous, but it works great :-) FWIW! -- Hassan Schroeder ----------------------------- hassan at webtuitive.com Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com opinion: webtuitive.blogspot.com dream. code. From lee.kowalkowski at googlemail.com Thu Apr 6 04:29:48 2006 From: lee.kowalkowski at googlemail.com (Lee kowalkowski) Date: Thu, 6 Apr 2006 10:29:48 +0100 Subject: [thelist] AJAX Tip In-Reply-To: <30bd6ffd0604051507q61034b9y9067f302a68686a7@mail.gmail.com> References: <443399D1.4000201@netvision.net> <30bd6ffd0604050333m38bba2a7g51696614081e485a@mail.gmail.com> <44340F9E.2020505@adobe.com> <443439AE.3030206@zstudio.co.uk> <30bd6ffd0604051507q61034b9y9067f302a68686a7@mail.gmail.com> Message-ID: <610592c90604060229i5c64dad5v85e77636f8a53a7b@mail.gmail.com> On 05/04/06, Christian Heilmann wrote: > > > Yes, the latter are formally DHTML, but you don't want to be talking > > about DHTML in this millennium. The term carries too much derogatory > > baggage, in my opinion. > > ^ Thank you, that makes all the flak I got for my from DHTML to DOM > Scripting article worth while. > http://icant.co.uk/articles/from-dhtml-to-dom/ Oi! Flash also carries similar derogatory baggage, do we need a new buzzword for using Flash well? It's fine to say something is DOM Scripting if it actually use the DOM, but not if your doing non-DOM DHTML unobtrusivesly, that would be lying. -- LK From codepo8 at gmail.com Thu Apr 6 05:07:53 2006 From: codepo8 at gmail.com (Christian Heilmann) Date: Thu, 6 Apr 2006 11:07:53 +0100 Subject: [thelist] AJAX Tip In-Reply-To: <610592c90604060229i5c64dad5v85e77636f8a53a7b@mail.gmail.com> References: <443399D1.4000201@netvision.net> <30bd6ffd0604050333m38bba2a7g51696614081e485a@mail.gmail.com> <44340F9E.2020505@adobe.com> <443439AE.3030206@zstudio.co.uk> <30bd6ffd0604051507q61034b9y9067f302a68686a7@mail.gmail.com> <610592c90604060229i5c64dad5v85e77636f8a53a7b@mail.gmail.com> Message-ID: <30bd6ffd0604060307o74739fcep53893b21d348ccda@mail.gmail.com> > > > Yes, the latter are formally DHTML, but you don't want to be talking > > > about DHTML in this millennium. The term carries too much derogatory > > > baggage, in my opinion. > > > > ^ Thank you, that makes all the flak I got for my from DHTML to DOM > > Scripting article worth while. > > http://icant.co.uk/articles/from-dhtml-to-dom/ > Oi! Flash also carries similar derogatory baggage, do we need a new > buzzword for using Flash well? Flash is a product name. DHTML or DOM scripting isn't. I do hire Flash designers and Flash developers or Flash Application Developers though, so there is a difference in that. > It's fine to say something is DOM Scripting if it actually use the DOM, but > not if your doing non-DOM DHTML unobtrusivesly, that would be lying. How do you NOT use the DOM when you want to do unobtrusive Scripting? Even if it is DOM-1? From escalonab at gmail.com Thu Apr 6 05:20:37 2006 From: escalonab at gmail.com (Bernardo Escalona-Espinosa) Date: Thu, 6 Apr 2006 03:20:37 -0700 Subject: [thelist] MySQL queries, quotes, and AUTO_INCREMENT Message-ID: <12d1e0910604060320w4fc05a65wb10a663d8158b341@mail.gmail.com> Hello dear list, I am desperate. This was supposed to be a simple upgrade, but I've been running into so many MySQL problems its not even funny. My most recent frustration has to do with single and double quotes. (A) I am inserting photo descriptions into a MySQL table, but the problem is that these descriptions sometimes have single quotes (example: this is a picture of john's foot) and sometimes double quotes (example: the src parameter in a link tag). I solved the problem where single quotes break my MySQL queries by using double quotes in the query instead of single quotes, like such: $query = "INSERT INTO photo_db VALUES (\"\", \"".$i."\", \"".$images[$i][0].".jpg\", \"".$images[$i][1]."\", \"".$images[$i][2]."\", \"".$images[$i][3]."\", \"".$images[$i][4]."\", \"".$category."\")"; But of course now my query breaks if $images[$i][2] (the description) has double quotes in it. This is so dumb and obvious and i feel i should know the solution.. but i don?t :( (B) Second problem: has to do with deleting entries of a table when you have the primary key as AUTO_INCREMENT. Seems that when deleting rows, the primary keys of the deleted rows aren't automatically re-used when new rows are inserted. This creates major chaos and confusion. I "shifted up" (or down, if you will) the remaining rows to close the gap manually. Then when i inserted new rows it continued with the old sequence numbering, leaving a gap again. This increased the already existing chaos and confusion. I googled some and found that this behaviour depends on whether your tables are of the type BDB, MyISAM, or InnoDB. Unfortunately I have no idea what engine my server uses and have really no understanding of these db types all together. Can anyone please enlighten me? -- ___________________________________________ Bernardo Escalona Espinosa handy: 0176 / 24 82 35 34 http://www.bernsonline.com/ From dcsquare at myrealbox.com Thu Apr 6 06:12:04 2006 From: dcsquare at myrealbox.com (Dan CRACIUN) Date: Thu, 06 Apr 2006 14:12:04 +0300 Subject: [thelist] MySQL queries, quotes, and AUTO_INCREMENT In-Reply-To: <12d1e0910604060320w4fc05a65wb10a663d8158b341@mail.gmail.com> References: <12d1e0910604060320w4fc05a65wb10a663d8158b341@mail.gmail.com> Message-ID: <4434F784.6040703@myrealbox.com> Bernardo Escalona-Espinosa wrote: > Second problem: has to do with deleting entries of a table when you > have the primary key as AUTO_INCREMENT. > > Seems that when deleting rows, the primary keys of the deleted rows > aren't automatically re-used when new rows are inserted. This creates > major chaos and confusion. I "shifted up" (or down, if you will) the > remaining rows to close the gap manually. Then when i inserted new > rows it continued with the old sequence numbering, leaving a gap > again. This increased the already existing chaos and confusion. After you finish your operations on that table, copy the table to another table (structure+data), drop the original table then copy back the table on the old name. You'll have your auto-incremented ID without gaps. Best, Dan From hershelr at netvision.net.il Thu Apr 6 06:26:39 2006 From: hershelr at netvision.net.il (Hershel Robinson) Date: Thu, 06 Apr 2006 14:26:39 +0300 Subject: [thelist] Volunteer to Convert Video Message-ID: <4434FAEF.8030200@netvision.net> A small non-profit organization whom I assist has a video in MPG format which we need converted into Real Player streaming video format. The host who hosts their site (gratis) has Real Player available to stream video. Could anyone volunteer to convert the video for me? I don't really know anything about video. Thank you. -- Gallery Robinson Web Services http://web.galleryrobinson.com/ From mwarden at gmail.com Thu Apr 6 06:37:00 2006 From: mwarden at gmail.com (Matt Warden) Date: Thu, 06 Apr 2006 07:37:00 -0400 Subject: [thelist] MySQL queries, quotes, and AUTO_INCREMENT In-Reply-To: <12d1e0910604060320w4fc05a65wb10a663d8158b341@mail.gmail.com> References: <12d1e0910604060320w4fc05a65wb10a663d8158b341@mail.gmail.com> Message-ID: <4434FD5C.10503@gmail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Bernardo Escalona-Espinosa wrote: > (B) > > Second problem: has to do with deleting entries of a table when you > have the primary key as AUTO_INCREMENT. > > Seems that when deleting rows, the primary keys of the deleted rows > aren't automatically re-used when new rows are inserted. This creates > major chaos and confusion. No, it would cause major chaos and confusion if they *were* reused, especially since MySQL doesn't enforce referential integrity. > I "shifted up" (or down, if you will) the > remaining rows to close the gap manually. Then when i inserted new > rows it continued with the old sequence numbering, leaving a gap > again. This increased the already existing chaos and confusion. > > I googled some and found that this behaviour depends on whether your > tables are of the type BDB, MyISAM, or InnoDB. Unfortunately I have no > idea what engine my server uses and have really no understanding of > these db types all together. > > Can anyone please enlighten me? Why do the gaps bother you? auto_increment is only a way to ensure you have a unique identifier. If you need something that has some semantics behind it, might I suggest another field, e.g.: id int auto_increment pk foo varchar(255) priority int not null A warning: your shifting can cause some serious serious problems with your data integrity. If you're going to do that, make sure you have table locks first. - -- Matt Warden Miami University Oxford, OH, USA http://mattwarden.com This email proudly and graciously contributes to entropy. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFENP1crI3LObhzHRMRAgc9AJwISyh6lSzJEQDkQAuCoNE07bp0HgCg6YIw 18IoSAY1UakD+/DrPbKrzjw= =Ittt -----END PGP SIGNATURE----- From lee.kowalkowski at googlemail.com Thu Apr 6 06:38:49 2006 From: lee.kowalkowski at googlemail.com (Lee kowalkowski) Date: Thu, 6 Apr 2006 12:38:49 +0100 Subject: [thelist] AJAX Tip In-Reply-To: <30bd6ffd0604060307o74739fcep53893b21d348ccda@mail.gmail.com> References: <443399D1.4000201@netvision.net> <30bd6ffd0604050333m38bba2a7g51696614081e485a@mail.gmail.com> <44340F9E.2020505@adobe.com> <443439AE.3030206@zstudio.co.uk> <30bd6ffd0604051507q61034b9y9067f302a68686a7@mail.gmail.com> <610592c90604060229i5c64dad5v85e77636f8a53a7b@mail.gmail.com> <30bd6ffd0604060307o74739fcep53893b21d348ccda@mail.gmail.com> Message-ID: <610592c90604060438w13d02876sfbf959cc1b30f68@mail.gmail.com> On 06/04/06, Christian Heilmann wrote > > > It's fine to say something is DOM Scripting if it actually use the DOM, > but > > not if your doing non-DOM DHTML unobtrusivesly, that would be lying. > > How do you NOT use the DOM when you want to do unobtrusive Scripting? > Even if it is DOM-1? Hmm, let's see... perhaps? Really contrived, but showPicture could be: function showPicture(elem, src) { if(typeof elem.innerHTML == 'undefined') { elem.innerHTML = ''; return false; } return true; } Okay, that's a pretty lousy example (I'm really ashamed of it already), but it's unobtrusive i.e. javacript is not breaking the page. I might have misunderstood the DOM Scripting message, but I thought one factor was to discourage the use of innerHTML (which is not DOM). Purists would say that if you use innerHTML, it's not pure DOM Scripting. On the other hand, it would be futile to avoid getElementById() or getElementsByTagName() in this day and age in order to use innerHTML, so yeah, DHTML with absolutely no use of the DOM is unlikely. I was being picky. -- LK From mwarden at gmail.com Thu Apr 6 06:42:52 2006 From: mwarden at gmail.com (Matt Warden) Date: Thu, 6 Apr 2006 07:42:52 -0400 Subject: [thelist] AJAX Tip In-Reply-To: <610592c90604060438w13d02876sfbf959cc1b30f68@mail.gmail.com> References: <443399D1.4000201@netvision.net> <30bd6ffd0604050333m38bba2a7g51696614081e485a@mail.gmail.com> <44340F9E.2020505@adobe.com> <443439AE.3030206@zstudio.co.uk> <30bd6ffd0604051507q61034b9y9067f302a68686a7@mail.gmail.com> <610592c90604060229i5c64dad5v85e77636f8a53a7b@mail.gmail.com> <30bd6ffd0604060307o74739fcep53893b21d348ccda@mail.gmail.com> <610592c90604060438w13d02876sfbf959cc1b30f68@mail.gmail.com> Message-ID: On 4/6/06, Lee kowalkowski wrote: > > How do you NOT use the DOM when you want to do unobtrusive Scripting? > > Even if it is DOM-1? > > > Hmm, let's see... > > src="thumbnail.jpg" /> That is the part that is not unobtrusive. There should not be JS in the markup. I think this is where Christian is confused, because typically you'd do: var foo = document.getElementById('...'); if (foo) foo.onclick = function() { showPicture('picture.jpg'); }; -- Matt Warden Miami University Oxford, OH, USA http://mattwarden.com This email proudly and graciously contributes to entropy. From tk at seso.at Thu Apr 6 07:04:58 2006 From: tk at seso.at (seso | thomas korosa) Date: Thu, 6 Apr 2006 14:04:58 +0200 Subject: [thelist] Server-Side generation of flv-files Message-ID: For numerous reasons, it'd come in handy for me to create .flv-files serverside on the fly. Flash Communication Server is not an option in this special case. Now i know that the Sorenson Encoder can create .flv's, as can the Riva Encoder. I'm looking for a command-line driven tool for linux which provides similar functionality (resize, create from mpeg2, crop, pad, ...). Does anyone know how this can be done? From rob.smith at lexjet.com Thu Apr 6 07:26:36 2006 From: rob.smith at lexjet.com (Rob Smith) Date: Thu, 6 Apr 2006 08:26:36 -0400 Subject: [thelist] Dev Connections Message-ID: <25A592EB84583B48A16B86A25F56E7CE019D2654@lesjetcorp01.lexjetcorp.com> Hi List, I just got back from the Dev Connections conference in Orlando, FL covering SharePoint, ASP.NET, and SQL Server 2005. While I didn't do the ASP.NET track, I hovered mostly in the 2005 and then a little in SharePoint. Lots of cool stuff collected so if you have any questions... On a humorous note, I got a free t-shirt for stumping the 12 Microsoft Group Project Managers about this question: "What was the reasoning behind the assumption that when I imported views from 2000 to 2005 using the import wizard that you conveniently converted them to tables for me? I don't want that and there's no way around it aside from manually creating them. Copy and paste doesn't work." Rob Smith LexJet rob.smith at lexjet.com http://www.lexjet.com (800)453-9538 (941)330-1210 Int'l (941)330-1220 Fax 1680 Fruitville Road, 3rd Floor Sarasota, FL 34236 From codepo8 at gmail.com Thu Apr 6 07:28:56 2006 From: codepo8 at gmail.com (Christian Heilmann) Date: Thu, 6 Apr 2006 13:28:56 +0100 Subject: [thelist] AJAX Tip In-Reply-To: References: <443399D1.4000201@netvision.net> <30bd6ffd0604050333m38bba2a7g51696614081e485a@mail.gmail.com> <44340F9E.2020505@adobe.com> <443439AE.3030206@zstudio.co.uk> <30bd6ffd0604051507q61034b9y9067f302a68686a7@mail.gmail.com> <610592c90604060229i5c64dad5v85e77636f8a53a7b@mail.gmail.com> <30bd6ffd0604060307o74739fcep53893b21d348ccda@mail.gmail.com> <610592c90604060438w13d02876sfbf959cc1b30f68@mail.gmail.com> Message-ID: <30bd6ffd0604060528i114cf27dg14670c87a9335483@mail.gmail.com> > > > How do you NOT use the DOM when you want to do unobtrusive Scripting? > > > Even if it is DOM-1? > > Hmm, let's see... > > > > > src="thumbnail.jpg" /> > > That is the part that is not unobtrusive. There should not be JS in > the markup. I think this is where Christian is confused, because > typically you'd do: > var foo = document.getElementById('...'); > if (foo) foo.onclick = function() { showPicture('picture.jpg'); }; Exactly. Unobtrusive JavaScript should be unobtrusive to both the user and the maintainer. Mixing HTML and JavaScript is just lazy and expects a lot more from a site maintainer than is necessary. Chris -- Chris Heilmann Blog: http://www.wait-till-i.com Writing: http://icant.co.uk/ Binaries: http://www.onlinetools.org/ From lee.kowalkowski at googlemail.com Thu Apr 6 08:03:06 2006 From: lee.kowalkowski at googlemail.com (Lee kowalkowski) Date: Thu, 6 Apr 2006 14:03:06 +0100 Subject: [thelist] AJAX Tip In-Reply-To: <30bd6ffd0604060528i114cf27dg14670c87a9335483@mail.gmail.com> References: <443399D1.4000201@netvision.net> <30bd6ffd0604050333m38bba2a7g51696614081e485a@mail.gmail.com> <44340F9E.2020505@adobe.com> <443439AE.3030206@zstudio.co.uk> <30bd6ffd0604051507q61034b9y9067f302a68686a7@mail.gmail.com> <610592c90604060229i5c64dad5v85e77636f8a53a7b@mail.gmail.com> <30bd6ffd0604060307o74739fcep53893b21d348ccda@mail.gmail.com> <610592c90604060438w13d02876sfbf959cc1b30f68@mail.gmail.com> <30bd6ffd0604060528i114cf27dg14670c87a9335483@mail.gmail.com> Message-ID: <610592c90604060603l5576961fgd45197e24b6e7022@mail.gmail.com> On 06/04/06, Christian Heilmann wrote: > > > > > How do you NOT use the DOM when you want to do unobtrusive > Scripting? > > > > Even if it is DOM-1? OK, how do you not use the DOM to do DHTML these days? > > > > src="thumbnail.jpg" /> > > > > That is the part that is not unobtrusive. There should not be JS in > > the markup. Exactly. Unobtrusive JavaScript should be unobtrusive to both the user > and the maintainer. Moving the coupling between presentation and behaviour to your JavaScript is no easier to maintain (or harder). The benefits are generally academic. *Except* for generic scripts that are designed for easy reuse, but most scripts depend on some form of hook into the markup. -- LK From mwarden at gmail.com Thu Apr 6 08:15:50 2006 From: mwarden at gmail.com (Matt Warden) Date: Thu, 6 Apr 2006 09:15:50 -0400 Subject: [thelist] AJAX Tip In-Reply-To: <610592c90604060603l5576961fgd45197e24b6e7022@mail.gmail.com> References: <443399D1.4000201@netvision.net> <44340F9E.2020505@adobe.com> <443439AE.3030206@zstudio.co.uk> <30bd6ffd0604051507q61034b9y9067f302a68686a7@mail.gmail.com> <610592c90604060229i5c64dad5v85e77636f8a53a7b@mail.gmail.com> <30bd6ffd0604060307o74739fcep53893b21d348ccda@mail.gmail.com> <610592c90604060438w13d02876sfbf959cc1b30f68@mail.gmail.com> <30bd6ffd0604060528i114cf27dg14670c87a9335483@mail.gmail.com> <610592c90604060603l5576961fgd45197e24b6e7022@mail.gmail.com> Message-ID: On 4/6/06, Lee kowalkowski wrote: > Moving the coupling between presentation and behaviour to your JavaScript is > no easier to maintain (or harder). The benefits are generally academic. > *Except* for generic scripts that are designed for easy reuse, but most > scripts depend on some form of hook into the markup. I've heard this argument before. Rewind three years, and replace "JavaScript" with "CSS". There is no "hook" in the markup. There are identifiers and class names and DOM structure, but these things have no more to do with JS than they do for CSS. If we accept that inline CSS is a Bad Thing(tm), I don't see why it's such a leap to accept the same for inline JS. Thanks, -- Matt Warden Miami University Oxford, OH, USA http://mattwarden.com This email proudly and graciously contributes to entropy. From codepo8 at gmail.com Thu Apr 6 08:16:49 2006 From: codepo8 at gmail.com (Christian Heilmann) Date: Thu, 6 Apr 2006 14:16:49 +0100 Subject: [thelist] AJAX Tip In-Reply-To: <610592c90604060603l5576961fgd45197e24b6e7022@mail.gmail.com> References: <443399D1.4000201@netvision.net> <44340F9E.2020505@adobe.com> <443439AE.3030206@zstudio.co.uk> <30bd6ffd0604051507q61034b9y9067f302a68686a7@mail.gmail.com> <610592c90604060229i5c64dad5v85e77636f8a53a7b@mail.gmail.com> <30bd6ffd0604060307o74739fcep53893b21d348ccda@mail.gmail.com> <610592c90604060438w13d02876sfbf959cc1b30f68@mail.gmail.com> <30bd6ffd0604060528i114cf27dg14670c87a9335483@mail.gmail.com> <610592c90604060603l5576961fgd45197e24b6e7022@mail.gmail.com> Message-ID: <30bd6ffd0604060616i260637c1jf0b841e1be2c5f51@mail.gmail.com> > OK, how do you not use the DOM to do DHTML these days? Who claimed I wanted to do that? The DOM is there to reach things in the markup with it. Why add your code in the markup and mix structure and behaviour when you don't have to? > > > > > > src="thumbnail.jpg" /> > > > > > > That is the part that is not unobtrusive. There should not be JS in > > > the markup. > > Exactly. Unobtrusive JavaScript should be unobtrusive to both the user > > and the maintainer. > > Moving the coupling between presentation and behaviour to your JavaScript is > no easier to maintain (or harder). The benefits are generally academic. > *Except* for generic scripts that are designed for easy reuse, but most > scripts depend on some form of hook into the markup. I know many CMS that allow you to apply a class to a link, but not many (good ones that do manage content instead of create web sites) that allow you to add own inline event handlers. If you want to edit misspellings and get a change request every time some content has to change be my guest, I'd rather have an editor with a short period of training be able to add something like an image popup in a CMS by applying a class or select a plugin than mess around with my code. So, yes, these are generic, but what is the use in bespoke development of functionality that needs to be used over and over again anyways? How many more menu scripts do we need? -- Chris Heilmann Blog: http://www.wait-till-i.com Writing: http://icant.co.uk/ Binaries: http://www.onlinetools.org/ From Conleyj at kubota-kma.com Thu Apr 6 08:29:18 2006 From: Conleyj at kubota-kma.com (James Conley) Date: Thu, 6 Apr 2006 09:29:18 -0400 Subject: [thelist] AJAX Tip Message-ID: > -----Original Message----- > From: thelist-bounces at lists.evolt.org > [mailto:thelist-bounces at lists.evolt.org] On Behalf Of Lee kowalkowski > Sent: Thursday, April 06, 2006 7:39 AM > To: thelist at lists.evolt.org > Subject: Re: [thelist] AJAX Tip > > On 06/04/06, Christian Heilmann wrote > > > > > It's fine to say something is DOM Scripting if it > actually use the > > > DOM, > > but > > > not if your doing non-DOM DHTML unobtrusivesly, that > would be lying. > > > > How do you NOT use the DOM when you want to do unobtrusive > Scripting? > > Even if it is DOM-1? > > > Hmm, let's see... > > > > perhaps? > > Really contrived, but showPicture could be: > > function showPicture(elem, src) > { > if(typeof elem.innerHTML == 'undefined') > { > elem.innerHTML = ''; > return false; > } > return true; > } > > Okay, that's a pretty lousy example (I'm really ashamed of it > already), but it's unobtrusive i.e. javacript is not breaking > the page. > > I might have misunderstood the DOM Scripting message, but I > thought one factor was to discourage the use of innerHTML > (which is not DOM). Purists would say that if you use > innerHTML, it's not pure DOM Scripting. > > On the other hand, it would be futile to avoid getElementById() or > getElementsByTagName() in this day and age in order to use > innerHTML, so yeah, DHTML with absolutely no use of the DOM > is unlikely. I was being picky. > > -- LK > -- Is the innerHTML function of a document object not part of the "Document Object Model"? James c. From evolt at kasimir-k.fi Thu Apr 6 08:55:17 2006 From: evolt at kasimir-k.fi (kasimir-k) Date: Thu, 06 Apr 2006 13:55:17 +0000 Subject: [thelist] AJAX Tip In-Reply-To: References: Message-ID: <44351DC5.2010501@kasimir-k.fi> James Conley scribeva in 06/04/2006 13:29: > Is the innerHTML function of a document object not part of the "Document > Object Model"? No it isn't. It's originally a Microsoft extension, but nowadays many browsers support it. Purists frown on it, but it is often faster than the DOM way. .k From codepo8 at gmail.com Thu Apr 6 09:11:05 2006 From: codepo8 at gmail.com (Christian Heilmann) Date: Thu, 6 Apr 2006 15:11:05 +0100 Subject: [thelist] AJAX Tip In-Reply-To: <44351DC5.2010501@kasimir-k.fi> References: <44351DC5.2010501@kasimir-k.fi> Message-ID: <30bd6ffd0604060711j4762ae09k3cc8ba131037fdec@mail.gmail.com> > > Is the innerHTML function of a document object not part of the "Document > > Object Model"? > > No it isn't. It's originally a Microsoft extension, but nowadays many > browsers support it. Purists frown on it, but it is often faster than > the DOM way. Arguably. It is dead handy for debugging and also for writing out a bunch of HTML you got from an XHR. For generating HTML it is not as clever though, as you don't leave a trail of developed objects behind and need to reach them again: va bla=document.getElementById('specialLink'); bla.innerHTML='

    retrieve specials

    '; var speciallink=bla.getElementsByTagName('a')[0]; addEvent(speciallink,'click',foo,false); vs. var bla=document.getElementById('specialLink'); var p=document.createElement('p'); var specialLink=document.createElement('a'); specialLink.setAttribute('href','#'); addEvent(specialLink,'click',foo,false); p.appendChild(specialLink) bla.appendChild(p); If another function needs to reach that A it'll always have to do a getElementsByTagName in the innerHTML example, in the DOM example it can just change specialLink. This also promotes the idea of HTML as a node tree, and not as a huge string. -- Chris Heilmann Blog: http://www.wait-till-i.com Writing: http://icant.co.uk/ Binaries: http://www.onlinetools.org/ From evolt at kasimir-k.fi Thu Apr 6 09:33:00 2006 From: evolt at kasimir-k.fi (kasimir-k) Date: Thu, 06 Apr 2006 14:33:00 +0000 Subject: [thelist] AJAX Tip In-Reply-To: <30bd6ffd0604060711j4762ae09k3cc8ba131037fdec@mail.gmail.com> References: <44351DC5.2010501@kasimir-k.fi> <30bd6ffd0604060711j4762ae09k3cc8ba131037fdec@mail.gmail.com> Message-ID: <4435269C.6070901@kasimir-k.fi> >>> innerHTML >> is often faster than the DOM way. Christian Heilmann scribeva in 06/04/2006 14:11: > Arguably. It is dead handy for debugging and also for writing out a > bunch of HTML you got from an XHR. This is actually pretty much the only situation where I use it. > For generating HTML it is not as clever though, Clever - no. Fast - yes. If I happen to end up with a table with hundreds of rows, and must manipulate it client side, I just might rely on innerHTML. (Naturally heavy tasks are often better done server side, but sometimes that is not an option.) > This also promotes the idea of HTML as a node tree, and not as a huge string. And this is a very worthwhile idea to promote too! And as you mentioned XHR (and as the title of this thread has "AJAX" in it :-) this is good place to tell, that the XMLHttpRequest object is now a W3C Working Draft: http://www.w3.org/TR/XMLHttpRequest/ .k From lee.kowalkowski at googlemail.com Thu Apr 6 09:50:57 2006 From: lee.kowalkowski at googlemail.com (Lee kowalkowski) Date: Thu, 6 Apr 2006 15:50:57 +0100 Subject: [thelist] AJAX Tip In-Reply-To: References: <443399D1.4000201@netvision.net> <443439AE.3030206@zstudio.co.uk> <30bd6ffd0604051507q61034b9y9067f302a68686a7@mail.gmail.com> <610592c90604060229i5c64dad5v85e77636f8a53a7b@mail.gmail.com> <30bd6ffd0604060307o74739fcep53893b21d348ccda@mail.gmail.com> <610592c90604060438w13d02876sfbf959cc1b30f68@mail.gmail.com> <30bd6ffd0604060528i114cf27dg14670c87a9335483@mail.gmail.com> <610592c90604060603l5576961fgd45197e24b6e7022@mail.gmail.com> Message-ID: <610592c90604060750v15a1a6afi34cc1aad5203cb96@mail.gmail.com> On 06/04/06, Matt Warden wrote: > > There is no "hook" in the markup. Sorry Matt, I wasn't talking about hooks in the markup, I said hooks in the code. E.g. Whenever you use getElementById("id"), we're expecting an element with that ID. So there's no maintenance difference. Unless you're adding all your elements in JavaScript too! -- LK From codepo8 at gmail.com Thu Apr 6 10:29:10 2006 From: codepo8 at gmail.com (Christian Heilmann) Date: Thu, 6 Apr 2006 16:29:10 +0100 Subject: [thelist] AJAX Tip In-Reply-To: <610592c90604060750v15a1a6afi34cc1aad5203cb96@mail.gmail.com> References: <443399D1.4000201@netvision.net> <30bd6ffd0604051507q61034b9y9067f302a68686a7@mail.gmail.com> <610592c90604060229i5c64dad5v85e77636f8a53a7b@mail.gmail.com> <30bd6ffd0604060307o74739fcep53893b21d348ccda@mail.gmail.com> <610592c90604060438w13d02876sfbf959cc1b30f68@mail.gmail.com> <30bd6ffd0604060528i114cf27dg14670c87a9335483@mail.gmail.com> <610592c90604060603l5576961fgd45197e24b6e7022@mail.gmail.com> <610592c90604060750v15a1a6afi34cc1aad5203cb96@mail.gmail.com> Message-ID: <30bd6ffd0604060829l3d0f5390n33670f3501f8b3b6@mail.gmail.com> > > There is no "hook" in the markup. > Sorry Matt, I wasn't talking about hooks in the markup, I said hooks in the > code. > E.g. Whenever you use getElementById("id"), we're expecting an element with > that ID. So there's no maintenance difference. Unless you're adding > all your elements in JavaScript too! Yes, but the difference is that these are shared among JS and CSS, and inline event handlers would be only for JavaScript. Or are you trying to argument that JavaScript is as easy to learn as adding some classes and IDs and writing CSS for it? -- Chris Heilmann Blog: http://www.wait-till-i.com Writing: http://icant.co.uk/ Binaries: http://www.onlinetools.org/ From lee.kowalkowski at googlemail.com Thu Apr 6 10:40:02 2006 From: lee.kowalkowski at googlemail.com (Lee kowalkowski) Date: Thu, 6 Apr 2006 16:40:02 +0100 Subject: [thelist] AJAX Tip In-Reply-To: <30bd6ffd0604060616i260637c1jf0b841e1be2c5f51@mail.gmail.com> References: <443399D1.4000201@netvision.net> <443439AE.3030206@zstudio.co.uk> <30bd6ffd0604051507q61034b9y9067f302a68686a7@mail.gmail.com> <610592c90604060229i5c64dad5v85e77636f8a53a7b@mail.gmail.com> <30bd6ffd0604060307o74739fcep53893b21d348ccda@mail.gmail.com> <610592c90604060438w13d02876sfbf959cc1b30f68@mail.gmail.com> <30bd6ffd0604060528i114cf27dg14670c87a9335483@mail.gmail.com> <610592c90604060603l5576961fgd45197e24b6e7022@mail.gmail.com> <30bd6ffd0604060616i260637c1jf0b841e1be2c5f51@mail.gmail.com> Message-ID: <610592c90604060840o525b63a8le1e52ac11ffac990@mail.gmail.com> On 06/04/06, Christian Heilmann wrote: > Why add your code in the markup and mix structure > and behaviour when you don't have to? I've said this before, but onlclick="return myFunc(this)" *isn't* mixing structure and behaviour, as long as the definition of myFunc is externalised. However, I admit it *is* mixing markup and *code*. Doing getElementById('foo') is mixing structure and behaviour. However, it's generally unavoidable, but onclick="return myFunc(this)" is more loosely coupled, in my opinion. > I know many CMS that allow you to apply a class to a link, but not > many (good ones that do manage content instead of create web sites) > that allow you to add own inline event handlers. I don't blame them! I wouldn't dream of using a CMS to maintain the functionality in a website. > If you want to edit misspellings and get a change request every time > some content has to change be my guest, I'd rather have an editor with > a short period of training be able to add something like an image > popup in a CMS by applying a class or select a plugin than mess around > with my code. Separation of content and markup is another thing again! I don't edit code to change content either, because it's all externalised using localisation. I know CMS systems are limited in this area (and rightly so). I'm starting to realise why we're having these discussions, as a web application developer I forget the majority of people do ordinary, content-based websites. They can be totally different beasts. Absolutely, when using CMS for maintenance, any form of inline script is totally unrecommended. > So, yes, these are generic, but what is the use in bespoke development > of functionality that needs to be used over and over again anyways? > How many more menu scripts do we need? Menu scripts? *Shudder* (Hate them) No, I'll give you a real world example: In our applications we often get requirements to set focus on the first form field on every page, of course, this is done unobtrusively, using the DOM, and generically, so it's the exact same script on every page. Sorry about the confusion. *LOL* Yes, content authors definitely benefit from separation of content and code, I wouldn't have it any other way. Developers benefit from separation of content, presentation and behaviour (i.e. MVC). In certain circumstances, I would view the markup for a form for instance as an interface between behaviour and presentation. As long as the content is also externalised. That is, I couldn't imagine letting our content authors maintain form markup when our application heavily depends on it. -- LK From lee.kowalkowski at googlemail.com Thu Apr 6 10:46:52 2006 From: lee.kowalkowski at googlemail.com (Lee kowalkowski) Date: Thu, 6 Apr 2006 16:46:52 +0100 Subject: [thelist] AJAX Tip In-Reply-To: <30bd6ffd0604060829l3d0f5390n33670f3501f8b3b6@mail.gmail.com> References: <443399D1.4000201@netvision.net> <610592c90604060229i5c64dad5v85e77636f8a53a7b@mail.gmail.com> <30bd6ffd0604060307o74739fcep53893b21d348ccda@mail.gmail.com> <610592c90604060438w13d02876sfbf959cc1b30f68@mail.gmail.com> <30bd6ffd0604060528i114cf27dg14670c87a9335483@mail.gmail.com> <610592c90604060603l5576961fgd45197e24b6e7022@mail.gmail.com> <610592c90604060750v15a1a6afi34cc1aad5203cb96@mail.gmail.com> <30bd6ffd0604060829l3d0f5390n33670f3501f8b3b6@mail.gmail.com> Message-ID: <610592c90604060846w767f80d0h2f88d30488f7bde7@mail.gmail.com> On 06/04/06, Christian Heilmann wrote: > Or are you trying > to argument that JavaScript is as easy to learn as adding some classes > and IDs and writing CSS for it? No, I assumed that the same person/team creates, owns and maintains the JS as the CSS and the HTML, as tends to be the case in my experience, but yeah, I'd only make these arguments when this assumption is true. Sorry, don't worry about it, I'm on my own planet again today! -- LK From codepo8 at gmail.com Thu Apr 6 10:56:58 2006 From: codepo8 at gmail.com (Christian Heilmann) Date: Thu, 6 Apr 2006 16:56:58 +0100 Subject: [thelist] AJAX Tip In-Reply-To: <610592c90604060846w767f80d0h2f88d30488f7bde7@mail.gmail.com> References: <443399D1.4000201@netvision.net> <30bd6ffd0604060307o74739fcep53893b21d348ccda@mail.gmail.com> <610592c90604060438w13d02876sfbf959cc1b30f68@mail.gmail.com> <30bd6ffd0604060528i114cf27dg14670c87a9335483@mail.gmail.com> <610592c90604060603l5576961fgd45197e24b6e7022@mail.gmail.com> <610592c90604060750v15a1a6afi34cc1aad5203cb96@mail.gmail.com> <30bd6ffd0604060829l3d0f5390n33670f3501f8b3b6@mail.gmail.com> <610592c90604060846w767f80d0h2f88d30488f7bde7@mail.gmail.com> Message-ID: <30bd6ffd0604060856n670a9ba8y9bcbe2476e76f17@mail.gmail.com> > > Or are you trying > > to argument that JavaScript is as easy to learn as adding some classes > > and IDs and writing CSS for it? > > No, I assumed that the same person/team creates, owns and maintains > the JS as the CSS and the HTML, as tends to be the case in my > experience, but yeah, I'd only make these arguments when this > assumption is true. That is dangerous thinking that leads to technology divas and people getting stuck in the same jobs until they are so bored they have to leave. Most of my experience is that you will never be able to fix things you mess up in the first iteration as the budget runs out before you can do the promised "cleanup round". Better to plan for change and not get a nasty surprise months later when you see your own code and wondered what kind of confused person created that crud. -- Chris Heilmann Blog: http://www.wait-till-i.com Writing: http://icant.co.uk/ Binaries: http://www.onlinetools.org/ From mwarden at gmail.com Thu Apr 6 11:02:37 2006 From: mwarden at gmail.com (Matt Warden) Date: Thu, 6 Apr 2006 12:02:37 -0400 Subject: [thelist] AJAX Tip In-Reply-To: <610592c90604060840o525b63a8le1e52ac11ffac990@mail.gmail.com> References: <443399D1.4000201@netvision.net> <30bd6ffd0604051507q61034b9y9067f302a68686a7@mail.gmail.com> <610592c90604060229i5c64dad5v85e77636f8a53a7b@mail.gmail.com> <30bd6ffd0604060307o74739fcep53893b21d348ccda@mail.gmail.com> <610592c90604060438w13d02876sfbf959cc1b30f68@mail.gmail.com> <30bd6ffd0604060528i114cf27dg14670c87a9335483@mail.gmail.com> <610592c90604060603l5576961fgd45197e24b6e7022@mail.gmail.com> <30bd6ffd0604060616i260637c1jf0b841e1be2c5f51@mail.gmail.com> <610592c90604060840o525b63a8le1e52ac11ffac990@mail.gmail.com> Message-ID: > Sorry Matt, I wasn't talking about hooks in the markup, I said hooks in the > code. > > E.g. Whenever you use getElementById("id"), we're expecting an element with > that ID. So there's no maintenance difference. Unless you're adding > all your elements in JavaScript too! That's actually what I figured you meant. I was just pointing out that the "hook" is not a hook, but an id, which has nothing to do with JS or CSS or anything else. If you only have one anchor in your entire document, you could do: document.getElementsByTagName('a').item(0) instead of document.getElementById('mylink'). It is simply a way of navigating the document structure. > I've said this before, but onlclick="return myFunc(this)" *isn't* > mixing structure and behaviour, as long as the definition of myFunc is > externalised. However, I admit it *is* mixing markup and *code*. what about this: onclick="alert('hi');" or maybe this? onclick="return function() { return myFunc('foo'); };" what about this? onclick="return function() { if (this.value) return myFunc('foo'); else return false; };" At what point is the definition no longer externalized? onclick is a way of defining a behavior in response to an event, just like defining myFunc() is defining behavior in response to that function call. > Doing getElementById('foo') is mixing structure and behaviour. How is obtaining a reference to a dom element mixing structure and behavior? When I say "structure", I'm talking about markup structure, which is supposed to be a way of serializing a document tree. That's why JS (and CSS) has no business within it. > I'm starting to realise why we're having these discussions, as a web > application developer I forget the majority of people do ordinary, > content-based websites. They can be totally different beasts. > Absolutely, when using CMS for maintenance, any form of inline script > is totally unrecommended. I do strictly web application development, and I'm pretty sure Christian does similar work. When systems start getting much more complex is when separation like this becomes increasingly important and has an increasing impact on maintenance and knowledge transfer (e.g., during employee turnover) costs. By the way, this is digressing into an argument we've had on this list at least 3 times. There's more info in the archives. -- Matt Warden Miami University Oxford, OH, USA http://mattwarden.com This email proudly and graciously contributes to entropy. From JCanfield at PacAdvantage.org Thu Apr 6 11:34:15 2006 From: JCanfield at PacAdvantage.org (Canfield, Joel) Date: Thu, 6 Apr 2006 09:34:15 -0700 Subject: [thelist] not mixing markup and whatever (was RE: AJAX Tip) Message-ID: > onclick is a way of defining a behavior in response to an event, just > like defining myFunc() is defining behavior in response to that > function call. fascinating thread, guys matt, or whoever, can you help me out with this part and the associated bits? is it being said that js like 'onclick' shouldn't live in the html, but be external? I'm trying to get my head around how far we can take the separation. Keeping CSS external makes perfect sense to me, as do most js functions. but there are some javascript things that I'd be totally flummoxed about making external in the same manner. any pointers to resources that'd help? Christian, does your DHTML/DOM article which I've bookmarked but not read cover this? thanks again for a very educational conversation joel From mwarden at gmail.com Thu Apr 6 11:48:38 2006 From: mwarden at gmail.com (Matt Warden) Date: Thu, 6 Apr 2006 12:48:38 -0400 Subject: [thelist] not mixing markup and whatever (was RE: AJAX Tip) In-Reply-To: References: Message-ID: On 4/6/06, Canfield, Joel wrote: > > onclick is a way of defining a behavior in response to an event, just > > like defining myFunc() is defining behavior in response to that > > function call. > > fascinating thread, guys > > matt, or whoever, can you help me out with this part and the associated > bits? is it being said that js like 'onclick' shouldn't live in the > html, but be external? I'm trying to get my head around how far we can > take the separation. Keeping CSS external makes perfect sense to me, as > do most js functions. but there are some javascript things that I'd be > totally flummoxed about making external in the same manner. > > any pointers to resources that'd help? Christian, does your DHTML/DOM > article which I've bookmarked but not read cover this? > > thanks again for a very educational conversation Check out Christian's unobtrusive javascript tutorial, especially: http://www.onlinetools.org/articles/unobtrusivejavascript/chapter2.html Just to give you an idea, though, here is an init function for one of the interfaces of a scheduler I'm working on right now for a client: /** * Initiates the interface. Called on window.onload */ function init() { if (!document.getElementById) return; // attach "close" function to the 'X' in the appt // form var a = document.getElementById('closeapptform'); if (a) { a.onclick = closeApptForm; } // end if a // attach "to day view" event to table cells in month view // of calendar var caltable = document.getElementById('calendardata'); if (caltable) { var tds = caltable.getElementsByTagName('td'); for (var i=0; i References: Message-ID: <44355037.8000109@userfrenzy.com> Steven Streight wrote: > I have a client who wants to move CMS from Mambo to some other service. They > are seriously considering Double Knot. I am looking into Plone or Drupal. I'd warn you that Drupal is at least a relatively simple conversion. Moving stuff in and out of Zope is a frickin' nightmare in my experience. -- ------------------------------------------- John Handelaar E john at handelaar.org T +353 21 427 9033 M +353 85 748 3790 http://handelaar.org ------------------------------------------- Work in progress: http://dev.vocalvoter.com ------------------------------------------- From mattias at thorslund.us Thu Apr 6 12:41:35 2006 From: mattias at thorslund.us (Mattias Thorslund) Date: Thu, 06 Apr 2006 10:41:35 -0700 Subject: [thelist] innerHTML on a table (Was: AJAX Tip) In-Reply-To: <4435269C.6070901@kasimir-k.fi> References: <44351DC5.2010501@kasimir-k.fi> <30bd6ffd0604060711j4762ae09k3cc8ba131037fdec@mail.gmail.com> <4435269C.6070901@kasimir-k.fi> Message-ID: <443552CF.6020607@thorslund.us> kasimir-k wrote: > Clever - no. Fast - yes. If I happen to end up with a table with > hundreds of rows, and must manipulate it client side, I just might rely > on innerHTML. (Naturally heavy tasks are often better done server side, > but sometimes that is not an option.) > In case someone reading the above thought of doing some innerHTML in tables: Setting the innerHTML of tables (and table rows and some other table sub-elements) is NOT supported in Internet Explorer. Setting the innerHTML on table rows works in Firefox (didn't try on a table), but in IE, you have to walk through each cell (TD or TH) and set their innerHTML separately. Not as handy, perhaps, but I suppose it guarantees that the number of rows and columns are consistent after a change. Merged cells (colspan>1, rowspan>1) might be a problem, too. Anyway, I had hoped to replace table rows, updated via XHR (great new? acronym...), but had to settle for a less "convenient" solution. FWIW Mattias From lists at neptunewebworks.com Thu Apr 6 12:52:53 2006 From: lists at neptunewebworks.com (Max Schwanekamp) Date: Thu, 06 Apr 2006 10:52:53 -0700 Subject: [thelist] MySQL queries, quotes, and AUTO_INCREMENT In-Reply-To: <12d1e0910604060320w4fc05a65wb10a663d8158b341@mail.gmail.com> References: <12d1e0910604060320w4fc05a65wb10a663d8158b341@mail.gmail.com> Message-ID: <44355575.6000502@neptunewebworks.com> Bernardo Escalona-Espinosa wrote: > (A) > I am inserting photo descriptions into a MySQL table, but the problem > is that these descriptions sometimes have single quotes (example: this > is a picture of john's foot) and sometimes double quotes (example: the > src parameter in a link tag). > I solved the problem where single quotes break my MySQL queries by > using double quotes in the query instead of single quotes, like such: > > $query = "INSERT INTO photo_db VALUES (\"\", \"".$i."\", > \"".$images[$i][0].".jpg\", \"".$images[$i][1]."\", > \"".$images[$i][2]."\", \"".$images[$i][3]."\", > \"".$images[$i][4]."\", \"".$category."\")"; > > But of course now my query breaks if $images[$i][2] (the description) > has double quotes in it. mysql_real_escape_string() is your friend! Your query seems to be going through a lot of unnecessary contortions. How about: $imgdata = array_map('mysql_real_escape_string',$images[$i]); $query = "INSERT INTO photo_db VALUES ('', '$i', '{$imgdata[0]}', '{$imgdata[1]}', '{$imgdata[2]}','{$imgdata[3]}', '{$imgdata[4]}','$category') "; Or maybe even shorten that query string further with implode(), assuming each row of $images array has just the five values: $imgs = implode("','", array_map('mysql_real_escape_string',$images[$i]) ); $query = "INSERT INTO photo_db VALUES ('', '$i', '$imgs', '$category') "; > (B) > Second problem: has to do with deleting entries of a table when you > have the primary key as AUTO_INCREMENT. > Seems that when deleting rows, the primary keys of the deleted rows > aren't automatically re-used when new rows are inserted. As Matt said, this is by design and is a good idea. What difference does it make what value your table.id is, so long as it's unique? When you delete a row, the data is gone and the storage file's size is accordingly smaller. What is your rationale for wanting to reuse primary keys? > I googled some and found that this behaviour depends on whether your > tables are of the type BDB, MyISAM, or InnoDB. Unfortunately I have no > idea what engine my server uses and have really no understanding of > these db types all together. RTFM. http://dev.mysql.com/doc/refman/5.0/en/storage-engines.html -- Max Schwanekamp http://www.neptunewebworks.com/ From peter at easylistbox.com Thu Apr 6 12:52:00 2006 From: peter at easylistbox.com (Peter Brunone (EasyListBox.com)) Date: Thu, 6 Apr 2006 10:52:00 -0700 Subject: [thelist] innerHTML on a table (Was: AJAX Tip) Message-ID: Of course if you enclose the table in a div or span, you can set the innerHTML of THAT element... From: Mattias Thorslund mattias at thorslund.us kasimir-k wrote: > Clever - no. Fast - yes. If I happen to end up with a table with > hundreds of rows, and must manipulate it client side, I just might rely > on innerHTML. (Naturally heavy tasks are often better done server side, > but sometimes that is not an option.) > In case someone reading the above thought of doing some innerHTML in tables: Setting the innerHTML of tables (and table rows and some other table sub-elements) is NOT supported in Internet Explorer. Setting the innerHTML on table rows works in Firefox (didn't try on a table), but in IE, you have to walk through each cell (TD or TH) and set their innerHTML separately. Not as handy, perhaps, but I suppose it guarantees that the number of rows and columns are consistent after a change. Merged cells (colspan>1, rowspan>1) might be a problem, too. Anyway, I had hoped to replace table rows, updated via XHR (great new? acronym...), but had to settle for a less "convenient" solution. FWIW Mattias From codepo8 at gmail.com Thu Apr 6 12:59:17 2006 From: codepo8 at gmail.com (Christian Heilmann) Date: Thu, 6 Apr 2006 18:59:17 +0100 Subject: [thelist] innerHTML on a table (Was: AJAX Tip) In-Reply-To: <443552CF.6020607@thorslund.us> References: <44351DC5.2010501@kasimir-k.fi> <30bd6ffd0604060711j4762ae09k3cc8ba131037fdec@mail.gmail.com> <4435269C.6070901@kasimir-k.fi> <443552CF.6020607@thorslund.us> Message-ID: <30bd6ffd0604061059k4156a332j9e7404853f5bdf85@mail.gmail.com> > In case someone reading the above thought of doing some innerHTML in > tables: > > Setting the innerHTML of tables (and table rows and some other table > sub-elements) is NOT supported in Internet Explorer. Setting the > innerHTML on table rows works in Firefox (didn't try on a table), but in > IE, you have to walk through each cell (TD or TH) and set their > innerHTML separately. that makes the DOM approach easier. What about creating the table as an XML string on the backend and just include it in a document via innerHTML? > Not as handy, perhaps, but I suppose it guarantees that the number of > rows and columns are consistent after a change. Merged cells (colspan>1, > rowspan>1) might be a problem, too. Anyway, I had hoped to replace table > rows, updated via XHR (great new? acronym...), Nah, XHR has been around for ages, I like it (excerpt from the chapter 8 of my book, finished minutes ago: Let's go for a simpler example at first. The demo file exampleXHR.html uses AJAX (well, without the X as there is no XML involved) to load and display files from the server when the user clicks a link as shown in Figure 8-2: Insert 6803f0802.tiff Figure 8-2 Loading external files via AJAX The magic wand behind all of this is an object called XMLHttpRequest or short XHR. This is a non-standard object insofar it has no mention on the W3C site but it is supported across all modern browsers (Safari, Mozilla/Firefox, Opera). MSIE does not support XHR, but uses an ActiveX object instead. The good news is that it works the same way. Oops, I have to ammend the W3C comment now :-) -- Chris Heilmann Blog: http://www.wait-till-i.com Writing: http://icant.co.uk/ Binaries: http://www.onlinetools.org/ From codepo8 at gmail.com Thu Apr 6 13:02:52 2006 From: codepo8 at gmail.com (Christian Heilmann) Date: Thu, 6 Apr 2006 19:02:52 +0100 Subject: [thelist] innerHTML on a table (Was: AJAX Tip) In-Reply-To: References: Message-ID: <30bd6ffd0604061102r743e31a9y411bd04baee84fa4@mail.gmail.com> > Of course if you enclose the table in a div or span, you can set the innerHTML of THAT element... And create tagsoup. SPAN is an inline element, TABLE is a block element. I never got the fetish of .NET putting SPANs of all things all over the document. From steven.streight at gmail.com Thu Apr 6 13:55:50 2006 From: steven.streight at gmail.com (Steven Streight) Date: Thu, 6 Apr 2006 13:55:50 -0500 Subject: [thelist] Plone vs. Mambo In-Reply-To: <44355037.8000109@userfrenzy.com> References: <44355037.8000109@userfrenzy.com> Message-ID: Thank you, that is a huge priority I had not gotten to thinking of yet. Plone seems to be conducive to multiple input group project collab. Seamless integration, info foraging plug ins, and newbie user friendliness, for both web browsing visitors and council staff update ease, are large points of consideration here also. Any other first hand dramas are welcome. On 4/6/06, John Handelaar wrote: > > Steven Streight wrote: > > I have a client who wants to move CMS from Mambo to some other service. > They > > are seriously considering Double Knot. I am looking into Plone or > Drupal. > > I'd warn you that Drupal is at least a relatively simple > conversion. Moving stuff in and out of Zope is a frickin' > nightmare in my experience. > > > From jono at charlestonwebsolutions.com Thu Apr 6 14:58:54 2006 From: jono at charlestonwebsolutions.com (jono at charlestonwebsolutions.com) Date: Thu, 6 Apr 2006 12:58:54 -0700 (PDT) Subject: [thelist] PHP: specify the current directory's parent Message-ID: <64127.216.215.170.194.1144353534.squirrel@charlestonwebsolutions.com> I am trying to set up a search function and I need to change a line of the PHP code (below) so that the start directory is the current directory's (".") parent. How do I get this $settings["options"]["start_dir"]="."; to start in the directory above the current directory? Being new to PHP, I tried using $settings["options"]["start_dir"]="../"; which does not work. I just need to tell ["start_dir"]="."; not to start in the current directory, but to start in the current directory's parent directory, which is the site's root. Am I way off here? Anybody have an idea? I could post the entire chunk of PHP code, but it seems that this is something simple enough to figure out with out the rest of the code...I could be wrong bout that? -- Jono Young Designer | Developer | Illustrator Charleston Web Solutions Bringing Higher Standards to the Lowcountry http://www.charlestonwebsolutions.com From lists at neptunewebworks.com Thu Apr 6 15:16:00 2006 From: lists at neptunewebworks.com (Max Schwanekamp) Date: Thu, 06 Apr 2006 13:16:00 -0700 Subject: [thelist] PHP: specify the current directory's parent In-Reply-To: <64127.216.215.170.194.1144353534.squirrel@charlestonwebsolutions.com> References: <64127.216.215.170.194.1144353534.squirrel@charlestonwebsolutions.com> Message-ID: <44357700.4070303@neptunewebworks.com> jono at charlestonwebsolutions.com wrote: > $settings["options"]["start_dir"]="."; > I just need to tell ["start_dir"]="."; not to start in the current > directory, but to start in the current directory's parent directory, which > is the site's root. realpath() probably will fit the bill. $docroot = isset($_SERVER['DOCUMENT_ROOT']) ? realpath($_SERVER['DOCUMENT_ROOT']) : realpath('../') ; $settings["options"]["start_dir"] = $docroot; PHP as CGI on Windows doesn't set the DOCUMENT_ROOT server var, thus the test. You could check for $_SERVER['PATH_TRANSLATED'] instead of relying on the current script's current location when DOCUMENT_ROOT is not set. HTH -- Max Schwanekamp http://www.neptunewebworks.com/ From codepo8 at gmail.com Thu Apr 6 15:47:28 2006 From: codepo8 at gmail.com (Christian Heilmann) Date: Thu, 6 Apr 2006 21:47:28 +0100 Subject: [thelist] innerHTML on a table (Was: AJAX Tip) In-Reply-To: <30bd6ffd0604061059k4156a332j9e7404853f5bdf85@mail.gmail.com> References: <44351DC5.2010501@kasimir-k.fi> <30bd6ffd0604060711j4762ae09k3cc8ba131037fdec@mail.gmail.com> <4435269C.6070901@kasimir-k.fi> <443552CF.6020607@thorslund.us> <30bd6ffd0604061059k4156a332j9e7404853f5bdf85@mail.gmail.com> Message-ID: <30bd6ffd0604061347w265d46dbjbab62d905fe9fbde@mail.gmail.com> > > In case someone reading the above thought of doing some innerHTML in > > tables: It is even worse: DOM generated tables will not show. http://icant.co.uk/sandbox/msieXHRtable/exampleXMLxhr.html This works nicely in Firefox but not in MSIE. MSIE gets and sets the innerHTML, but the table is not shown. Is that some messed up hasLayout thing? -- Chris Heilmann Blog: http://www.wait-till-i.com Writing: http://icant.co.uk/ Binaries: http://www.onlinetools.org/ From peter at easylistbox.com Thu Apr 6 16:02:42 2006 From: peter at easylistbox.com (Peter Brunone (EasyListBox.com)) Date: Thu, 6 Apr 2006 14:02:42 -0700 Subject: [thelist] innerHTML on a table (Was: AJAX Tip) Message-ID: <5b62355af5784051a5f2fe2e0cb4e603@easylistbox.com> Weird. I've created/altered tables both ways (innerHTML and DOM), and never had this problem. From: "Christian Heilmann" codepo8 at gmail.com > > In case someone reading the above thought of doing some innerHTML in > > tables: It is even worse: DOM generated tables will not show. http://icant.co.uk/sandbox/msieXHRtable/exampleXMLxhr.html This works nicely in Firefox but not in MSIE. MSIE gets and sets the innerHTML, but the table is not shown. Is that some messed up hasLayout thing? -- Chris Heilmann Blog: http://www.wait-till-i.com Writing: http://icant.co.uk/ Binaries: http://www.onlinetools.org/ From dudrenov at gmail.com Thu Apr 6 16:05:33 2006 From: dudrenov at gmail.com (Pavel Dudrenov) Date: Thu, 6 Apr 2006 14:05:33 -0700 Subject: [thelist] innerHTML on a table (Was: AJAX Tip) In-Reply-To: <30bd6ffd0604061347w265d46dbjbab62d905fe9fbde@mail.gmail.com> References: <44351DC5.2010501@kasimir-k.fi> <30bd6ffd0604060711j4762ae09k3cc8ba131037fdec@mail.gmail.com> <4435269C.6070901@kasimir-k.fi> <443552CF.6020607@thorslund.us> <30bd6ffd0604061059k4156a332j9e7404853f5bdf85@mail.gmail.com> <30bd6ffd0604061347w265d46dbjbab62d905fe9fbde@mail.gmail.com> Message-ID: <10c3e4e00604061405o20863021m42a58d4fcc054912@mail.gmail.com> To enshure that IE displays the content of a table the table needs to have a tbody element. And put wahtever table elements you need to put in the tbody not the table directly. Pavel P.S. Avoid using innerHTML. On 4/6/06, Christian Heilmann wrote: > > > > In case someone reading the above thought of doing some innerHTML in > > > tables: > > It is even worse: > > DOM generated tables will not show. > http://icant.co.uk/sandbox/msieXHRtable/exampleXMLxhr.html > > This works nicely in Firefox but not in MSIE. MSIE gets and sets the > innerHTML, but the table is not shown. Is that some messed up > hasLayout thing? > > -- > Chris Heilmann > Blog: http://www.wait-till-i.com > Writing: http://icant.co.uk/ > Binaries: http://www.onlinetools.org/ > -- > > * * Please support the community that supports you. * * > http://evolt.org/help_support_evolt/ > > For unsubscribe and other options, including the Tip Harvester > and archives of thelist go to: http://lists.evolt.org > Workers of the Web, evolt ! > From thelist at alex.fu2k.org Thu Apr 6 16:09:31 2006 From: thelist at alex.fu2k.org (Alex Robinson) Date: Thu, 6 Apr 2006 22:09:31 +0100 Subject: [thelist] innerHTML on a table (Was: AJAX Tip) In-Reply-To: <30bd6ffd0604061347w265d46dbjbab62d905fe9fbde@mail.gmail.com> References: <44351DC5.2010501@kasimir-k.fi> <30bd6ffd0604060711j4762ae09k3cc8ba131037fdec@mail.gmail.com> <4435269C.6070901@kasimir-k.fi> <443552CF.6020607@thorslund.us> <30bd6ffd0604061059k4156a332j9e7404853f5bdf85@mail.gmail.com> <30bd6ffd0604061347w265d46dbjbab62d905fe9fbde@mail.gmail.com> Message-ID: >This works nicely in Firefox but not in MSIE. MSIE gets and sets the >innerHTML, but the table is not shown. Is that some messed up >hasLayout thing? I don't know whether it has anything to do with the hasLayout thing, but the table needs to have a tbody to show up if inserted via DOM fiddling. Weird, but not a biggy once you know. From codepo8 at gmail.com Thu Apr 6 16:12:48 2006 From: codepo8 at gmail.com (Christian Heilmann) Date: Thu, 6 Apr 2006 22:12:48 +0100 Subject: [thelist] innerHTML on a table (Was: AJAX Tip) In-Reply-To: <10c3e4e00604061405o20863021m42a58d4fcc054912@mail.gmail.com> References: <44351DC5.2010501@kasimir-k.fi> <30bd6ffd0604060711j4762ae09k3cc8ba131037fdec@mail.gmail.com> <4435269C.6070901@kasimir-k.fi> <443552CF.6020607@thorslund.us> <30bd6ffd0604061059k4156a332j9e7404853f5bdf85@mail.gmail.com> <30bd6ffd0604061347w265d46dbjbab62d905fe9fbde@mail.gmail.com> <10c3e4e00604061405o20863021m42a58d4fcc054912@mail.gmail.com> Message-ID: <30bd6ffd0604061412j156d99dm1e2c3e35aafccff6@mail.gmail.com> > To enshure that IE displays the content of a table the table needs to have a > tbody element. And put wahtever table elements you need to put in the tbody > not the table directly. Good man! http://icant.co.uk/sandbox/msieXHRtable/exampleXMLxhr.html From lee.kowalkowski at googlemail.com Thu Apr 6 16:50:54 2006 From: lee.kowalkowski at googlemail.com (Lee kowalkowski) Date: Thu, 6 Apr 2006 22:50:54 +0100 Subject: [thelist] AJAX Tip In-Reply-To: References: <443399D1.4000201@netvision.net> <610592c90604060229i5c64dad5v85e77636f8a53a7b@mail.gmail.com> <30bd6ffd0604060307o74739fcep53893b21d348ccda@mail.gmail.com> <610592c90604060438w13d02876sfbf959cc1b30f68@mail.gmail.com> <30bd6ffd0604060528i114cf27dg14670c87a9335483@mail.gmail.com> <610592c90604060603l5576961fgd45197e24b6e7022@mail.gmail.com> <30bd6ffd0604060616i260637c1jf0b841e1be2c5f51@mail.gmail.com> <610592c90604060840o525b63a8le1e52ac11ffac990@mail.gmail.com> Message-ID: <610592c90604061450g69cd0525yd39b46a16b7ee17a@mail.gmail.com> On 06/04/06, Matt Warden wrote: > what about this: > > onclick="alert('hi');" > > or maybe this? > > onclick="return function() { return myFunc('foo'); };" > > what about this? > > onclick="return function() { if (this.value) return myFunc('foo'); > else return false; };" > > At what point is the definition no longer externalized? Yes, they're all behaviour in markup, totally unrecommended. You should know better ;-). Yes, it's difficult to draw the line, I can see this is a difficult education exercise in most development domains, and it's much simpler to ban inline events altogether. > onclick is a way of defining a behavior in response to an event, just > like defining myFunc() is defining behavior in response to that > function call. Agree, but using myFunc is delegation of behaviour. > How is obtaining a reference to a dom element mixing structure and > behavior? When I say "structure", I'm talking about markup structure, > which is supposed to be a way of serializing a document tree. It's about coupling and simplicity. Explicitly referencing elements that originated from a serialized origin is coupling. Depends on your slant, code/markup decoupling is acheivable, but in my experience, it comes at a cost. Markup/behaviour (or controller/view) decoupling in the user agent tier is unavoidable in practice, but coupling is less with (appropriately contrained!) inline events. This is where I'm saying there are possible support & maintenance gains to be made, yes depending on the skillset of your team. Chris demonstrated earlier that this is inappropriate for CMS scenarios, which I hadn't appreciated before (cheers Chris, that's *obvious* now!). > When systems start getting much more > complex is when separation like this becomes increasingly important > and has an increasing impact on maintenance and knowledge transfer > (e.g., during employee turnover) costs. I agree (except I think you meant the opposite), spearation has an increasing impact on maintenance and knowledge transfer. That's why I'm trying to emphasize decoupling, not separation without thought, but I'm not doing very well am I? Sigh. > By the way, this is digressing into an argument we've had on this list > at least 3 times. There's more info in the archives. Please don't use the word argument, that's so negative. You wouldn't participate if you didn't enjoy it. I'm just want to understand the reasoning & limits of the guidelines, the archives don't help me do this, I can't discuss on the archives. I was miffed at the notion that DHTML is something to be distanced from DOM Scripting, one is bad and the other good. When in actual fact, this thread has proved it's almost impossible to do much DHTML without DOM Scripting. It should be in our nature to challenge things, when one is enlightened, they understand. When one understands, they don't forget. It's a learning excercise, what this list is all about. In order to evangelise, one must believe! Respect to Chris & yourself (& the list), you make all this possible. Even if Chris does get annoyed from time-to-time! ;-) -- LK From JCanfield at PacAdvantage.org Thu Apr 6 17:27:01 2006 From: JCanfield at PacAdvantage.org (Canfield, Joel) Date: Thu, 6 Apr 2006 15:27:01 -0700 Subject: [thelist] vbscript: dateadd weekdays Message-ID: Why does this <% response.write(dateadd("w",28,date) & "
    ") response.write(dateadd("d",28,date) & "
    ") %> return this 5/4/2006 5/4/2006 instead of the first being about eight days later to account for the weekends not being counted? am I misunderstanding what 'weekdays' are in vbscript? thanks spinhead From jeff.hinds at netagency.com Thu Apr 6 18:20:29 2006 From: jeff.hinds at netagency.com (Jeff Hinds) Date: Thu, 6 Apr 2006 18:20:29 -0500 Subject: [thelist] thelist Digest, Vol 38, Issue 10 In-Reply-To: Message-ID: <001b01c659d0$b4ed2d70$6801a8c0@DCDMYP91> If you want something search engine friendly and very user friendly I would suggest Drupal. I don't know Plone. Jeff Message: 1 Date: Thu, 6 Apr 2006 00:46:21 -0500 From: "Steven Streight" Subject: [thelist] Plone vs. Mambo To: thelist Message-ID: Content-Type: text/plain; charset=ISO-8859-1 I have a client who wants to move CMS from Mambo to some other service. They are seriously considering Double Knot. I am looking into Plone or Drupal. Take a look at wdboyce [dot] org for the client site, a local Boy Scout council in Peoria, IL. They wish to have a calendar with links to event pages and greater flexibility with images and layout. Any suggestions will be much appreciated. -- Steven Streight aka Vaspers the Grate Web Usability. Blogs. IT Audit/Control. Social Media. http://www.vaspersthegrate.blogspot.com http://techrepublic.com.com/5247-6257-0.html http://blog-revolution-search-engine-swicki.eurekster.com SKYPE: vaspersthegrate From Ken at adOpenStatic.com Thu Apr 6 20:05:38 2006 From: Ken at adOpenStatic.com (Ken Schaefer) Date: Fri, 7 Apr 2006 11:05:38 +1000 Subject: [thelist] vbscript: dateadd weekdays References: Message-ID: <160489103479AB4892187638EE7D1E691F4E9C@kjserver1.kjhome.local> Hi "d" and "w" behave the same way (as you have discovered). Using "w" does not exclude weekends. The documentation isn't clear about the differences between "d" and "w" (because there aren't any), but nowhere does it say that "w" applies to working days only. If you look at the Weekday() function, you'll see it can be used to determine any day of the week (Saturdays and Sundays included), which implies that weekdays are any day of the week. But why have both "d" and "w" then? This post might help answer that question, kind of :-) http://groups.google.com.au/group/microsoft.public.scripting.wsh/browse_frm/t hread/86b0c04dfa8c6340/948913f6bf6f086e?lnk=st&q=VBScript+DateAdd+Day+Weekday +difference+group%3Amicrosoft.public.*&rnum=1&hl=en#948913f6bf6f086e -or- http://tinyurl.com/rrn3s Cheers Ken -- My IIS Blog: www.adOpenStatic.com/cs/blogs/ken Tech.Ed Boston 2006 - see you there: Everything the web administrator needs to know about MOM 2005 : -----Original Message----- : From: thelist-bounces at lists.evolt.org [mailto:thelist- : bounces at lists.evolt.org] On Behalf Of Canfield, Joel : Subject: [thelist] vbscript: dateadd weekdays : : Why does this : : <% : response.write(dateadd("w",28,date) & "
    ") : response.write(dateadd("d",28,date) & "
    ") : %> : : return this : : 5/4/2006 : 5/4/2006 : : instead of the first being about eight days later to account for the : weekends not being counted? am I misunderstanding what 'weekdays' are : in : vbscript? : : thanks : spinhead From mattias at thorslund.us Thu Apr 6 23:57:32 2006 From: mattias at thorslund.us (Mattias Thorslund) Date: Thu, 06 Apr 2006 21:57:32 -0700 Subject: [thelist] innerHTML on a table (Was: AJAX Tip) In-Reply-To: <10c3e4e00604061405o20863021m42a58d4fcc054912@mail.gmail.com> References: <44351DC5.2010501@kasimir-k.fi> <30bd6ffd0604060711j4762ae09k3cc8ba131037fdec@mail.gmail.com> <4435269C.6070901@kasimir-k.fi> <443552CF.6020607@thorslund.us> <30bd6ffd0604061059k4156a332j9e7404853f5bdf85@mail.gmail.com> <30bd6ffd0604061347w265d46dbjbab62d905fe9fbde@mail.gmail.com> <10c3e4e00604061405o20863021m42a58d4fcc054912@mail.gmail.com> Message-ID: <4435F13C.2090505@thorslund.us> To clarify my earlier post a little: What I tried and couldn't do in IE was to set innerHTML on a TR, in order to update just one row. What I wanted to do (in concept): oTD.innerHTML = 'contentmore content'; Since the content for the row was generated by the server, this would have been very handy, especially since I wanted to replace not only the content of the TDs but also the class attributes. This worked fine in Firefox, but not in IE. Instead I had to do this (feel free to tell me what's wrong/bad about this): //get the row object oRow = document.getElementById('row'+rowID.toString()); //walk through the properties in the js object received via XHR/JSON //and set the properties on the cells of the TD for(cellID in newCells){ oCell = oRow.cells[cellID]; oCell.innerHTML = newCells[cellID].innerHTML; oCell.className = newCells[cellID].className; } Quoting from MSDN [1]: > The property is read/write for all objects except the following, for > which it is read-only: COL, COLGROUP, FRAMESET, HTML, STYLE, TABLE, > TBODY, TFOOT, THEAD, TITLE, TR. The property has no default value. So, according to that, it wouldn't be possible to set innerHTML of a TBODY... Cheers, Mattias [1] http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/innerhtml.asp Pavel Dudrenov wrote: > To enshure that IE displays the content of a table the table needs to have a > tbody element. And put wahtever table elements you need to put in the tbody > not the table directly. > > Pavel > P.S. > Avoid using innerHTML. > > On 4/6/06, Christian Heilmann wrote: > >>>> In case someone reading the above thought of doing some innerHTML in >>>> tables: >>>> >> It is even worse: >> >> DOM generated tables will not show. >> http://icant.co.uk/sandbox/msieXHRtable/exampleXMLxhr.html >> >> This works nicely in Firefox but not in MSIE. MSIE gets and sets the >> innerHTML, but the table is not shown. Is that some messed up >> hasLayout thing? >> >> -- >> Chris Heilmann >> Blog: http://www.wait-till-i.com >> Writing: http://icant.co.uk/ >> Binaries: http://www.onlinetools.org/ >> -- >> >> * * Please support the community that supports you. * * >> http://evolt.org/help_support_evolt/ >> >> For unsubscribe and other options, including the Tip Harvester >> and archives of thelist go to: http://lists.evolt.org >> Workers of the Web, evolt ! >> >> From escalonab at gmail.com Fri Apr 7 05:01:27 2006 From: escalonab at gmail.com (Bernardo Escalona-Espinosa) Date: Fri, 7 Apr 2006 03:01:27 -0700 Subject: [thelist] MySQL queries and AUTO_INCREMENT Message-ID: <12d1e0910604070301t35de95e8x2e56b21debbbb2de@mail.gmail.com> Thanks so far for the replies. > After you finish your operations on that table, copy the table to > another table (structure+data), drop the original table then copy back > the table on the old name. You'll have your auto-incremented ID without > gaps. > > Best, > Dan Dan, I gave this a try and this is what happened: I deleted every entry with ID higher than 134. Then I did the copy, drop, rename like you suggested. Then I added new rows expecting them to appear with IDs 135, 136, etc. Instead, all the new rows have ID of zero (although ID is the PK and supposed to be unique). What did I do wrong? > Why do the gaps bother you? auto_increment is only a way to ensure you > have a unique identifier. If you need something that has some semantics > behind it, might I suggest another field, e.g.: > > id int auto_increment pk > foo varchar(255) > priority int not null > ... > Matt Warden Matt, I would like the IDs to be continuous because in another part of my page i generate thumbnails of random photos. The randomly generated ID is used to retrieve the corresponding thumbnail, so if the ID doesn't exist because of a gap, I have a problem. Thanks all so far for the help. Berns -- ___________________________________________ Bernardo Escalona Espinosa handy: 0176 / 24 82 35 34 http://www.bernsonline.com/ From Ken at adOpenStatic.com Fri Apr 7 06:12:44 2006 From: Ken at adOpenStatic.com (Ken Schaefer) Date: Fri, 7 Apr 2006 21:12:44 +1000 Subject: [thelist] MySQL queries and AUTO_INCREMENT Message-ID: <160489103479AB4892187638EE7D1E691F4EB4@kjserver1.kjhome.local> : -----Original Message----- : From: thelist-bounces at lists.evolt.org [mailto:thelist- : bounces at lists.evolt.org] On Behalf Of Bernardo Escalona-Espinosa : Sent: Friday, 7 April 2006 8:01 PM : To: thelist at lists.evolt.org : Subject: Re: [thelist] MySQL queries and AUTO_INCREMENT : : > Why do the gaps bother you? auto_increment is only a way to ensure you : > have a unique identifier. If you need something that has some semantics : > behind it, might I suggest another field, e.g.: : > : > id int auto_increment pk : > foo varchar(255) : > priority int not null : > ... : > Matt Warden : : Matt, : I would like the IDs to be continuous because in another part of my : page i generate thumbnails of random photos. The randomly generated ID : is used to retrieve the corresponding thumbnail, so if the ID doesn't : exist because of a gap, I have a problem. Then you are completely mis-using the auto-increment as your primary key. PKs are there to identify the row uniquely. They are not there to fall within a range in some random number generator. Can I *strongly* suggest that you do not attempt to use the auto-increment as your primary key if that's also the field you are going to be renumbering for purposes of your random record formula. I suspect there is probably some other way you can get around this. I don't really know mySQL well, but I have this page for Access/Jet and SQL Server: http://www.adopenstatic.com/faq/randomrecord.asp Neither of the two mechanisms relies on sequential PK values. Maybe something similar could be used in your case? Cheers Ken From volkan.ozcelik at gmail.com Fri Apr 7 06:24:00 2006 From: volkan.ozcelik at gmail.com (=?ISO-8859-9?Q?VOLKAN_=D6Z=C7EL=DDK?=) Date: Fri, 7 Apr 2006 14:24:00 +0300 Subject: [thelist] MySQL queries and AUTO_INCREMENT In-Reply-To: <160489103479AB4892187638EE7D1E691F4EB4@kjserver1.kjhome.local> References: <160489103479AB4892187638EE7D1E691F4EB4@kjserver1.kjhome.local> Message-ID: Hi, I may be totally off here but why don't you add a column named "sort_order" (or sngSortOrder my convention) and sort your images accordingly? Cheers, -- Volkan Ozcelik +>Yep! I'm blogging! : http://www.volkanozcelik.com/volkanozcelik/blog/ +> My projects/studies/trials/errors : http://www.sarmal.com/ From matthew at chickenskinners.com Fri Apr 7 06:41:13 2006 From: matthew at chickenskinners.com (Matthew Pollard) Date: Fri, 7 Apr 2006 12:41:13 +0100 Subject: [thelist] innerHTML on a table (Was: AJAX Tip) Message-ID: > > In case someone reading the above thought of doing some innerHTML in > > tables: You don't need to use innerHTML at all - just traverse the dom and find the right node and append(node.appendChild(newnode)) it - this works in IE as well as firefox. look here: http://developer.mozilla.org/en/docs/Gecko_DOM_Reference tables have their own little section http://developer.mozilla.org/en/docs/DOM:table#HTML_Form_Element_Interface Cheers Matthew -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.385 / Virus Database: 268.3.5/303 - Release Date: 06/04/2006 From codepo8 at gmail.com Fri Apr 7 07:26:34 2006 From: codepo8 at gmail.com (Christian Heilmann) Date: Fri, 7 Apr 2006 13:26:34 +0100 Subject: [thelist] innerHTML on a table (Was: AJAX Tip) In-Reply-To: References: Message-ID: <30bd6ffd0604070526o7aa1d8d4ta0983e5ec48509da@mail.gmail.com> > > > In case someone reading the above thought of doing some innerHTML in > > > tables: > You don't need to use innerHTML at all - just traverse the dom and find the > right node and append(node.appendChild(newnode)) it - this works in IE as > well as firefox. > look here: > http://developer.mozilla.org/en/docs/Gecko_DOM_Reference > tables have their own little section > http://developer.mozilla.org/en/docs/DOM:table#HTML_Form_Element_Interface Yes, we know, however that is not the issue. The problem is that MSIE does not show a table generated with DOM unless you also have a TBODY in it. If you use createElement and appendChild to create tables in JavaScript always make sure to use a tbody in the table. function dotables(){ // table without tbody var table=document.createElement('table'); var tr=document.createElement('tr'); var td=document.createElement('td') td.appendChild(document.createTextNode('foo')); tr.appendChild(td); table.appendChild(tr); document.body.appendChild(table); // table with tbody var table2=document.createElement('table'); var tr2=tr.cloneNode(true); var tbody=document.createElement('tbody'); tbody.appendChild(tr2); table2.appendChild(tbody); document.body.appendChild(table2); } window.onload=dotables; This will result in two tables in Firefox, but only one in MSIE, as the first one lacks a tbody. The table is inside the document, it is just not rendered! Proof: http://icant.co.uk/sandbox/createTables.html With thanks to Pavel Dudrenov and Alex Robinson. From Ron.Luther at hp.com Fri Apr 7 08:25:31 2006 From: Ron.Luther at hp.com (Luther, Ron) Date: Fri, 7 Apr 2006 08:25:31 -0500 Subject: [thelist] MySQL queries and AUTO_INCREMENT In-Reply-To: <12d1e0910604070301t35de95e8x2e56b21debbbb2de@mail.gmail.com> Message-ID: <1FF0647605921940BCB22C2A454AD7CE101820@cceexc17.americas.cpqcorp.net> Bernardo Escalona-Espinosa described a problem where he wants to pull a random photo out of an ever changing db collection of photographs: Hi Berns, First of all, I agree with Ken (et alia) that auto-increment is the wrong tool for this task. Here is an outline of *one way* to do this that might be workable and not too tricky to implement: Assumption - I'm guessing that this photo collection isn't quite as large and doesn't have quite as much update activity as Phil's 'photo.net'. I'm also not that familiar with triggers and sprocs so I wanted to suggest something that stayed away from those. How about a kinda simple four table design? (1) The photo table. The main table containing all the file name, ID, location, size, submitter, category, comment links, ratings, evaluations, alt text, etc. fields. (2) Last Update. A very small (1 record - 1 field) table containing a timestamp indicating the last time the photo table was updated. [Add a routine when you add or delete a photo to change the date/time here.] (3) Enumeration Table. A two field table containing an ID link back into the photo table and a 'counter' field numbered '1' thru 'x' that you match your random number into. [Create this table with a routine that (a) wipes this table, and (b) loops through the photo table writing ID and 'counter' here one record at a time to ensure you get your '1' thru 'x' coverage.] {The tricky part is 'when' to write this table. Hint: That's what the two date tables are for.} (4) Last Enumeration Date. Another very small (1 record - 1 field) table containing a timestamp indicating the last time the enumeration table was updated. [You see where I'm going here, right?] Now, every time you update the photo table you update the 'last update' timestamp so you have a record telling you when the last change to the table was made. Sooooo ... when somebody hits your page/link/whatever and wants to see a random photo you: (i) Check to see if the last enumeration time is 'after' the last update to the photo database. If it is, everything is cool - you select your random number, match through the enumeration table to get the photo table id and use that to link into the photo table and pull up the snazzy pix and knock their socks off. (ii) Otherwise - you add a step to kick off the routine to rewrite the enumeration table and update the last enumeration date. Now that things are up to date again, you pull your random number between '1' and 'select max(counter) from enumeration_table' and go get that picture. Probably not the most 'efficient' design and may or may not scale well to enormous quantities of photos being updated every six tenths of a second ... But for a small to midsized app this might work 'well enough'. HTH, RonL. From John.Brooking at sappi.com Fri Apr 7 09:42:01 2006 From: John.Brooking at sappi.com (Brooking, John) Date: Fri, 7 Apr 2006 10:42:01 -0400 Subject: [thelist] MySQL queries and AUTO_INCREMENT Message-ID: <7DFF91610114AB4C8C0B068CFC34734F059424EC@CDFNEXC3.NA.Sappi.com> > : I would like the IDs to be continuous because in another part of my > : page i generate thumbnails of random photos. The randomly generated ID > : is used to retrieve the corresponding thumbnail, so if the ID doesn't > : exist because of a gap, I have a problem. > > ... > Can I *strongly* suggest that you do not attempt to use the auto- > increment as your primary key if that's also the field you are > going to be renumbering for purposes of your random record > formula. > > I suspect there is probably some other way you can get around > this. I don't really know mySQL well, but I have this page for > Access/Jet and SQL Server: > http://www.adopenstatic.com/faq/randomrecord.asp > > Neither of the two mechanisms relies on sequential PK values. > Maybe something similar could be used in your case? I agree that using the primary key for this is only going to cause you headaches. I suggest a separate field, maybe call it SequenceNbr, and make THAT where you keep your sequential number. Set it to the next higher value on insert, shift it down on deletes, don't modify the primary key, and everyone stays happy. I've done a similar thing on some tables that need to maintain a fixed order to the records, and it works very well. You might ask why you can't just use that as your primary key? Well, you could, I suppose, as long as you don't make it AUTO_INCREMENT, so you and the AUTO_INCREMENT feature are not fighting over control of it (which is what is happening now). However, as far as the MEANING of the field, you would be using it for two different things. Using a potentially-changing sequential number to also identify the row is problematic over time: How do you know that row #12 now has always been row #12? You don't. That's why a primary key should never change, and why you should make them separate fields. The primary key identifies the row for all time, while the sequence number is simply a property of the row and may change. Hope this helps. - John -- This message may contain information which is private, privileged or confidential and is intended solely for the use of the individual or entity named in the message. If you are not the intended recipient of this message, please notify the sender thereof and destroy / delete the message. Neither the sender nor Sappi Limited (including its subsidiaries and associated companies) shall incur any liability resulting directly or indirectly from accessing any of the attached files which may contain a virus or the like. From rob.smith at lexjet.com Fri Apr 7 10:37:51 2006 From: rob.smith at lexjet.com (Rob Smith) Date: Fri, 7 Apr 2006 11:37:51 -0400 Subject: [thelist] MySQL queries, quotes, and AUTO_INCREMENT Message-ID: <25A592EB84583B48A16B86A25F56E7CE019D2911@lesjetcorp01.lexjetcorp.com> Thanks to SQL Server 2005, you can do the new function row_number() to help solve the Island and Gap problem much more efficiently. The following is a copy and paste from the lecturer, Itzik Ben-Gan. He's got some really cool stuff on Recursive Queries and the new CTE (Common Table Expressions) new to 2005. As a test, I've now mapped out my entire company's corporate ladder in a matter of a few minutes in a recursive algorithm....Now on to printing the entire menu navigation as a site map/catalog application. http://www.sql.co.il/books/insidetsql2005/source_code/Discover%20the%20P ower%20of%20Row%20Numbers.txt (Basic - excerpt below) http://www.sql.co.il/books/insidetsql2005/source_code/Hierarchies%20and% 20Recursive%20Queries.txt (Advanced) --------------------------------------------------------------------- -- Islands and Gaps --------------------------------------------------------------------- SET NOCOUNT ON; GO IF OBJECT_ID('dbo.T1') IS NOT NULL DROP TABLE dbo.T1; GO CREATE TABLE dbo.T1(col1 INT NOT NULL PRIMARY KEY); GO INSERT INTO dbo.T1 VALUES(1); INSERT INTO dbo.T1 VALUES(2); INSERT INTO dbo.T1 VALUES(3); INSERT INTO dbo.T1 VALUES(100); INSERT INTO dbo.T1 VALUES(101); INSERT INTO dbo.T1 VALUES(102); INSERT INTO dbo.T1 VALUES(103); INSERT INTO dbo.T1 VALUES(500); INSERT INTO dbo.T1 VALUES(997); INSERT INTO dbo.T1 VALUES(998); INSERT INTO dbo.T1 VALUES(999); INSERT INTO dbo.T1 VALUES(1000); GO -- Gaps SELECT col1 + 1 AS start_range, (SELECT MIN(col1) FROM dbo.T1 AS B WHERE B.col1 > A.col1) AS end_range FROM dbo.T1 AS A WHERE NOT EXISTS (SELECT * FROM dbo.T1 AS B WHERE B.col1 = A.col1 + 1) AND col1 < (SELECT MAX(col1) FROM dbo.T1); -- With row numbers SELECT MIN(col1) AS start_range, MAX(col1) AS end_range FROM (SELECT col1, col1 - ROW_NUMBER() OVER(ORDER BY col1) AS grp FROM dbo.T1) AS D GROUP BY grp; -- Islands SELECT MIN(col1) AS start_range, MAX(col1) AS end_range FROM (SELECT col1, (SELECT MIN(col1) FROM dbo.T1 AS B WHERE B.col1 >= A.col1 AND NOT EXISTS (SELECT * FROM dbo.T1 AS C WHERE C.col1 = B.col1 + 1)) AS grp FROM dbo.T1 AS A) AS D GROUP BY grp; -- With row numbers SELECT MIN(col1) AS start_range, MAX(col1) AS end_range FROM (SELECT col1, col1 - ROW_NUMBER() OVER(ORDER BY col1) AS grp FROM dbo.T1) AS D GROUP BY grp; GO Rob Smith LexJet rob.smith at lexjet.com http://www.lexjet.com (800)453-9538 (941)330-1210 Int'l (941)330-1220 Fax 1680 Fruitville Road, 3rd Floor Sarasota, FL 34236 From lists at neptunewebworks.com Fri Apr 7 11:38:25 2006 From: lists at neptunewebworks.com (Max Schwanekamp) Date: Fri, 07 Apr 2006 09:38:25 -0700 Subject: [thelist] MySQL queries and AUTO_INCREMENT In-Reply-To: <160489103479AB4892187638EE7D1E691F4EB4@kjserver1.kjhome.local> References: <160489103479AB4892187638EE7D1E691F4EB4@kjserver1.kjhome.local> Message-ID: <44369581.3020001@neptunewebworks.com> Ken Schaefer wrote: > Then you are completely mis-using the auto-increment as your primary key. PKs > are there to identify the row uniquely. They are not there to fall within a > range in some random number generator. Ken is absolutely correct, you shouldn't be designing your database to fit in with your particular scripting technique. Still, it's not so hard to let MySQL select a random row using a PK sequence that may have gaps. If the table is small (a few thousand rows or less), you can just do: SELECT [fields] FROM mytable ORDER BY RAND() LIMIT 1 The only problem with this is that when the table gets any heft to it (e.g. 10,000+ rows) the query gets slow. So, assuming your PK is an integer type named 'id', the idea then is: 1. Get the lowest and highest id value from mytable: SELECT min(id) AS firstrow, max(id) AS lastrow FROM mytable 2. Generate a random integer between $firstrow and $lastrow: $x = mt_rand($firstrow,$lastrow); 2. SELECT [fields] FROM mytable WHERE id >= $x LIMIT 1 3. If no data returned, query once more: SELECT [fields] FROM mytable WHERE id < $x LIMIT 1 4. If still no data, your table is empty; raise an error. With this method there is no coupling of the random number routine in PHP and the PK column 'id' in your table, aside from the requirement of it being an integer, but the original post was about AUTO INCREMENT which only works on integer columns anyway. -- Max Schwanekamp http://www.neptunewebworks.com/ From joshua at waetech.com Fri Apr 7 12:24:51 2006 From: joshua at waetech.com (Joshua Olson) Date: Fri, 7 Apr 2006 13:24:51 -0400 Subject: [thelist] MySQL queries and AUTO_INCREMENT In-Reply-To: AAAAAG+s9R0sTAxPmKw0nnD8aj3ksT8A Message-ID: <000401c65a68$2ddaf220$66e64d0a@OLSONXPS> > -----Original Message----- > From: Max Schwanekamp > Sent: Friday, April 07, 2006 12:38 PM > > 3. If no data returned, query once more: > SELECT [fields] FROM mytable WHERE id < $x LIMIT 1 This is an interesting concept and will presumably work. You may need to add in an ORDER BY clause here, though. <><><><><><><><><><> Joshua L. Olson WAE Technologies, Inc. http://www.waetech.com/ Phone: 706.210.0168 Fax: 413.812.4864 Monitor bandwidth usage on IIS6 in real-time: http://www.waetech.com/services/iisbm/ From mattias at thorslund.us Fri Apr 7 12:29:15 2006 From: mattias at thorslund.us (Mattias Thorslund) Date: Fri, 07 Apr 2006 10:29:15 -0700 Subject: [thelist] MySQL queries and AUTO_INCREMENT In-Reply-To: <44369581.3020001@neptunewebworks.com> References: <160489103479AB4892187638EE7D1E691F4EB4@kjserver1.kjhome.local> <44369581.3020001@neptunewebworks.com> Message-ID: <4436A16B.8010204@thorslund.us> Max Schwanekamp wrote: > 1. Get the lowest and highest id value from mytable: > SELECT min(id) AS firstrow, max(id) AS lastrow FROM mytable > 2. Generate a random integer between $firstrow and $lastrow: > $x = mt_rand($firstrow,$lastrow); > 2. SELECT [fields] FROM mytable WHERE id >= $x LIMIT 1 > 3. If no data returned, query once more: > SELECT [fields] FROM mytable WHERE id < $x LIMIT 1 > 4. If still no data, your table is empty; raise an error. > > With this method there is no coupling of the random number routine in > PHP and the PK column 'id' in your table, aside from the requirement of > it being an integer, but the original post was about AUTO INCREMENT > which only works on integer columns anyway. > Interesting technique. But it looks like some rows would be more likely to be chosen than others. Consider if the IDs are [1, 2, 3, 100]. Then, picking a random number between 1 and 100 will result displaying the row with ID 100 for 97% of the time. Of course that's an extreme example but for each missing number, the likely selection of the following record is much larger than the others (one missing number doubles the likelihood of selecting the next record, two missing numbers will triple it)... What's the use of point 3? The (second) point 2 should return a row if there are rows in the table. If there are no rows in the table, point 1 will return NULL in both firstrow and lastrow, which is where you should raise the error. I agree with John Brooking: Use a separate sequence field, and update it. Or, if the number of records will be not too large, use ORDER BY RAND() LIMIT 1. Mattias From mwarden at gmail.com Fri Apr 7 12:35:02 2006 From: mwarden at gmail.com (Matt Warden) Date: Fri, 7 Apr 2006 13:35:02 -0400 Subject: [thelist] MySQL queries and AUTO_INCREMENT In-Reply-To: <000401c65a68$2ddaf220$66e64d0a@OLSONXPS> References: <000401c65a68$2ddaf220$66e64d0a@OLSONXPS> Message-ID: On 4/7/06, Joshua Olson wrote: > > -----Original Message----- > > From: Max Schwanekamp > > Sent: Friday, April 07, 2006 12:38 PM > > > > 3. If no data returned, query once more: > > SELECT [fields] FROM mytable WHERE id < $x LIMIT 1 > > This is an interesting concept and will presumably work. You may need to > add in an ORDER BY clause here, though. Yes, I think you are correct. Otherwise, the <$x condition would likely be ordered by id ascending, and you would get the first record every time. Nice catch, Joshua. -- Matt Warden Miami University Oxford, OH, USA http://mattwarden.com This email proudly and graciously contributes to entropy. From mwarden at gmail.com Fri Apr 7 12:40:22 2006 From: mwarden at gmail.com (Matt Warden) Date: Fri, 7 Apr 2006 13:40:22 -0400 Subject: [thelist] MySQL queries and AUTO_INCREMENT In-Reply-To: <4436A16B.8010204@thorslund.us> References: <160489103479AB4892187638EE7D1E691F4EB4@kjserver1.kjhome.local> <44369581.3020001@neptunewebworks.com> <4436A16B.8010204@thorslund.us> Message-ID: On 4/7/06, Mattias Thorslund wrote: > But it looks like some rows would be more likely to be chosen than > others. Consider if the IDs are [1, 2, 3, 100]. Then, picking a random > number between 1 and 100 will result displaying the row with ID 100 for > 97% of the time. Of course that's an extreme example but for each > missing number, the likely selection of the following record is much > larger than the others (one missing number doubles the likelihood of > selecting the next record, two missing numbers will triple it)... His disclaimer was for > 10,000 rows, and it doesn't sound like this is an application where uniformity is a huge issue. > What's the use of point 3? The (second) point 2 should return a row if > there are rows in the table. Only if you lock tables for writing in between these queries. > I agree with John Brooking: Use a separate sequence field, and update > it. Or, if the number of records will be not too large, use ORDER BY > RAND() LIMIT 1. I would suggest this either way. I'm not sure issuing 3 queries over the network is more efficient than using this method (although, I haven't done any testing). -- Matt Warden Miami University Oxford, OH, USA http://mattwarden.com This email proudly and graciously contributes to entropy. From JCanfield at PacAdvantage.org Fri Apr 7 12:51:28 2006 From: JCanfield at PacAdvantage.org (Canfield, Joel) Date: Fri, 7 Apr 2006 10:51:28 -0700 Subject: [thelist] vbscript: dateadd weekdays Message-ID: thanks for clarifying, Ken > The documentation isn't clear about the > differences between > "d" and "w" (because there aren't any) it does, though, say that 'd' means 'days' and 'w' means 'workdays', which, in my mind, implies a difference, whatever that might be. So, is the only way to add working days (for me, that's Monday through Friday inclusive) to laboriously walk through the calendar using the Weekday function? spinhead From peter at easylistbox.com Fri Apr 7 13:07:28 2006 From: peter at easylistbox.com (Peter Brunone (EasyListBox.com)) Date: Fri, 7 Apr 2006 11:07:28 -0700 Subject: [thelist] vbscript: dateadd weekdays Message-ID: <6a16d8b75b134fd8958606a0d8387e73@easylistbox.com> > So, is the only way to add working days (for me, that's Monday through > Friday inclusive) to laboriously walk through the calendar using the > Weekday function? More or less, yes... BUT if you're worried about performance on long loops, you could verify your current position in the week and then add (WeekDaysToAdd/5)*7 or something like that. Just a half-formed thought... Peter From: "Canfield, Joel" JCanfield at PacAdvantage.org thanks for clarifying, Ken > The documentation isn't clear about the > differences between > "d" and "w" (because there aren't any) it does, though, say that 'd' means 'days' and 'w' means 'workdays', which, in my mind, implies a difference, whatever that might be. So, is the only way to add working days (for me, that's Monday through Friday inclusive) to laboriously walk through the calendar using the Weekday function? spinhead From JCanfield at PacAdvantage.org Fri Apr 7 13:11:32 2006 From: JCanfield at PacAdvantage.org (Canfield, Joel) Date: Fri, 7 Apr 2006 11:11:32 -0700 Subject: [thelist] vbscript: dateadd weekdays Message-ID: > performance on long loops, you could verify your current > position in the week and then add (WeekDaysToAdd/5)*7 or > something like that. yeah; for adding large numbers of days, something like my bits to reduce nine-bazillion seconds to X days, XX hours, XX minutes, XX seconds, only in reverse. ish. kind of. yeah. probably simpler than that, in this specific instance; just need to add 1, 3, or 7 workdays to set task deadlines. doable; just always looking for shortcuts thanks From sbeam at onsetcorps.net Fri Apr 7 13:16:08 2006 From: sbeam at onsetcorps.net (sbeam) Date: Fri, 7 Apr 2006 13:16:08 -0500 Subject: [thelist] MySQL queries and AUTO_INCREMENT In-Reply-To: References: <160489103479AB4892187638EE7D1E691F4EB4@kjserver1.kjhome.local> <4436A16B.8010204@thorslund.us> Message-ID: <200604071416.08631.sbeam@onsetcorps.net> On Friday 07 April 2006 01:40 pm, Matt Warden wrote: > > I agree with John Brooking: Use a separate sequence field, and update > > it. Or, if the number of records will be not too large, use ORDER BY > > RAND() LIMIT 1. > > I would suggest this either way. I'm not sure issuing 3 queries over > the network is more efficient than using this method (although, I > haven't done any testing). Just curious - as an alternative - would there be any downside to just using a result set pointer/cursor - something like $res = $db->query("SELECT id, file_name FROM photos"); $pic = $res->fetchRow(DB_FETCHMODE_ASSOC, rand(1, $res->numRows()); $res->free(); (Using PHP/PEAR because thats just what I'm used to. You could do the same thing lots of ways) So you are only doing one rand() in the application code and not 10^4 rand's in SQL plus a sort. -- # S Beam - Web App Dev Servs # http://www.onsetcorps.net/ From mwarden at gmail.com Fri Apr 7 13:20:41 2006 From: mwarden at gmail.com (Matt Warden) Date: Fri, 7 Apr 2006 14:20:41 -0400 Subject: [thelist] MySQL queries and AUTO_INCREMENT In-Reply-To: <200604071416.08631.sbeam@onsetcorps.net> References: <160489103479AB4892187638EE7D1E691F4EB4@kjserver1.kjhome.local> <4436A16B.8010204@thorslund.us> <200604071416.08631.sbeam@onsetcorps.net> Message-ID: sbeam, On 4/7/06, sbeam wrote: > Just curious - as an alternative - would there be any downside to just > using a result set pointer/cursor - something like > > $res = $db->query("SELECT id, file_name FROM photos"); > $pic = $res->fetchRow(DB_FETCHMODE_ASSOC, rand(1, $res->numRows()); > $res->free(); > > (Using PHP/PEAR because thats just what I'm used to. You could do the > same thing lots of ways) > > So you are only doing one rand() in the application code and not 10^4 > rand's in SQL plus a sort. rand() is not very expensive. Psuedo-random number generation is a simple calculation based on the previous (or seed) value. It's a good thought to avoid the many calculations, but transferring data over a network is expensive, so returning all the rows in the table would most certainly be slower. -- Matt Warden Miami University Oxford, OH, USA http://mattwarden.com This email proudly and graciously contributes to entropy. From mattias at thorslund.us Fri Apr 7 13:57:29 2006 From: mattias at thorslund.us (mattias at thorslund.us) Date: Fri, 07 Apr 2006 11:57:29 -0700 Subject: [thelist] MySQL queries and AUTO_INCREMENT In-Reply-To: References: <160489103479AB4892187638EE7D1E691F4EB4@kjserver1.kjhome.local> <44369581.3020001@neptunewebworks.com> <4436A16B.8010204@thorslund.us> Message-ID: <20060407115729.h5yl7j6fka688w0g@www.thorslund.us> Quoting Matt Warden : > On 4/7/06, Mattias Thorslund wrote: >> But it looks like some rows would be more likely to be chosen than >> others. Consider if the IDs are [1, 2, 3, 100]. Then, picking a random >> number between 1 and 100 will result displaying the row with ID 100 for >> 97% of the time. Of course that's an extreme example but for each >> missing number, the likely selection of the following record is much >> larger than the others (one missing number doubles the likelihood of >> selecting the next record, two missing numbers will triple it)... > > His disclaimer was for > 10,000 rows, and it doesn't sound like this > is an application where uniformity is a huge issue. Agreed. Probably won't be an issue, practically speaking. RAND() is much simpler to implement. >> What's the use of point 3? The (second) point 2 should return a row if >> there are rows in the table. > > Only if you lock tables for writing in between these queries. Anomalies would be pretty unlikely (they would happen only if someone managed to delete the chosen picture in the microseconds between getting first/last ID and selecting the random record). If we can assume that deletes are relatively rare, this would not be a big issue, practically speaking. But in principle I agree, the two queries should be made into one transaction, either by lock/unlock, a transaction, or a stored procerdure, etc... Putting them in a stored procedure (if the MySQL version supports it) would probably give the best performance since there'd be just one trip to the database. >> I agree with John Brooking: Use a separate sequence field, and update >> it. Or, if the number of records will be not too large, use ORDER BY >> RAND() LIMIT 1. > > I would suggest this either way. I'm not sure issuing 3 queries over > the network is more efficient than using this method (although, I > haven't done any testing). Database server and web server are likely the same box here, so I assume there's no huge latency. Besides, I only see the need for two queries. But all in all this isn't much to argue over. In practice, I would try whichever approach that seems easy to implement and see whether the results are acceptable to the purposes of the application... Mattias From lists at neptunewebworks.com Fri Apr 7 14:22:30 2006 From: lists at neptunewebworks.com (Max Schwanekamp) Date: Fri, 07 Apr 2006 12:22:30 -0700 Subject: [thelist] MySQL select random row [WAS: MySQL queries and AUTO_INCREMENT] In-Reply-To: <4436A16B.8010204@thorslund.us> References: <160489103479AB4892187638EE7D1E691F4EB4@kjserver1.kjhome.local> <44369581.3020001@neptunewebworks.com> <4436A16B.8010204@thorslund.us> Message-ID: <4436BBF6.1000007@neptunewebworks.com> Mattias Thorslund wrote: > But it looks like some rows would be more likely to be chosen than > others. Consider if the IDs are [1, 2, 3, 100]. Then, picking a random > number between 1 and 100 will result displaying the row with ID 100 for > 97% of the time. Yup, totally true. I just mentioned that weakness to Joshua on the phone earlier, before I saw your post. If you want a closer approximation of true randomness, you'll want to use a separate sequence field. Still, if the point is simply to vary the output on a more-or-less random basis, and it is reasonable to assume that we'll have a table with may more insertions than deletions, this method is simpler than having 4 tables to maintain solely for the purpose of generating a random image. > What's the use of point 3? The (second) point 2 should return a row if > there are rows in the table. Also true! I was in a rush and added the minid bit just before sending; should have removed #3. > If there are no rows in the table, point 1 will return NULL in both > firstrow and lastrow, which is where you should raise the error. Good point. > I agree with John Brooking: Use a separate sequence field, and update > it. That makes sense in most cases, but this may add overhead to the maintenance, since now all inserts to that table requires a routine that under MyISAM locks the table, inserts, updates all rows, unlocks (or wraps it in a transaction under InnoDB). It also couples the code to the table structure, which was partly what I was trying to avoid. If we want to reuse a selectRandomRow method, the table must always have that sequence field, or fall back on some other technique... like this one or ORDER BY RAND() LIMIT 1. > Or, if the number of records will be not too large, use ORDER BY > RAND() LIMIT 1. I agree. But there should be some automated way to get alerted when a query takes an inordinately long time, as ORDER BY RAND() is expensive for big tables. OK, so I googled around a bit just now, and these guys have a good discussion: http://akinas.com/pages/en/blog/mysql_random_row/ The last one is an interesting solution. -- Max Schwanekamp http://www.neptunewebworks.com/ From mwarden at gmail.com Fri Apr 7 14:41:39 2006 From: mwarden at gmail.com (Matt Warden) Date: Fri, 7 Apr 2006 15:41:39 -0400 Subject: [thelist] MySQL select random row [WAS: MySQL queries and AUTO_INCREMENT] In-Reply-To: <4436BBF6.1000007@neptunewebworks.com> References: <160489103479AB4892187638EE7D1E691F4EB4@kjserver1.kjhome.local> <44369581.3020001@neptunewebworks.com> <4436A16B.8010204@thorslund.us> <4436BBF6.1000007@neptunewebworks.com> Message-ID: On 4/7/06, Max Schwanekamp wrote: > OK, so I googled around a bit just now, and these guys have a good > discussion: > http://akinas.com/pages/en/blog/mysql_random_row/ > > The last one is an interesting solution. It's the same thing you suggested, just using SQL subqueries (which I assumed weren't available): SELECT * FROM `table` WHERE id >= (SELECT FLOOR( MAX(id) * RAND()) FROM `table` ) ORDER BY id LIMIT 1; Except it's not quite right. It should be: SELECT * FROM `table` WHERE id >= ( SELECT MIN(id) + ROUND( ( MAX(id)-MIN(id) ) * RAND() ) FROM `table` ) ORDER BY id LIMIT 1; -- Matt Warden Miami University Oxford, OH, USA http://mattwarden.com This email proudly and graciously contributes to entropy. From sbeam at onsetcorps.net Fri Apr 7 15:18:28 2006 From: sbeam at onsetcorps.net (sbeam) Date: Fri, 7 Apr 2006 15:18:28 -0500 Subject: [thelist] MySQL queries and AUTO_INCREMENT In-Reply-To: References: <160489103479AB4892187638EE7D1E691F4EB4@kjserver1.kjhome.local> <200604071416.08631.sbeam@onsetcorps.net> Message-ID: <200604071618.28165.sbeam@onsetcorps.net> On Friday 07 April 2006 02:20 pm, Matt Warden wrote: > > $res = $db->query("SELECT id, file_name FROM photos"); > > $pic = $res->fetchRow(DB_FETCHMODE_ASSOC, rand(1, $res->numRows()); > > $res->free(); > > > rand() is not very expensive. Psuedo-random number generation is a > simple calculation based on the previous (or seed) value. It's a good > thought to avoid the many calculations, but transferring data over a > network is expensive, so returning all the rows in the table would > most certainly be slower. OK, rand() is not expensive, granted. But ORDER BY can be (somewhat). And I'd assume the client and the DB are on the same machine here. Besides I've always understood that RDBMSs don't send any parts of the result set over the wire (or even read them off disk, unless a temp table or cursor is created?) until you actually fetch the row. So in this case the only bits that are moved are the ones corresponding to the single row at the pointer position. -- # S Beam - Web App Dev Servs # http://www.onsetcorps.net/ From mattias at thorslund.us Fri Apr 7 15:40:20 2006 From: mattias at thorslund.us (mattias at thorslund.us) Date: Fri, 07 Apr 2006 13:40:20 -0700 Subject: [thelist] MySQL select random row [WAS: MySQL queries and AUTO_INCREMENT] In-Reply-To: References: <160489103479AB4892187638EE7D1E691F4EB4@kjserver1.kjhome.local> <44369581.3020001@neptunewebworks.com> <4436A16B.8010204@thorslund.us> <4436BBF6.1000007@neptunewebworks.com> Message-ID: <20060407134020.3nau771geh444040@www.thorslund.us> Quoting Matt Warden : > On 4/7/06, Max Schwanekamp wrote: > >> OK, so I googled around a bit just now, and these guys have a good >> discussion: >> http://akinas.com/pages/en/blog/mysql_random_row/ >> >> The last one is an interesting solution. > > It's the same thing you suggested, just using SQL subqueries (which I > assumed weren't available): > > SELECT * FROM `table` WHERE id >= (SELECT FLOOR( MAX(id) * RAND()) > FROM `table` ) ORDER BY id LIMIT 1; > > Except it's not quite right. It should be: > > SELECT * FROM `table` > WHERE id >= ( > SELECT MIN(id) + ROUND( ( MAX(id)-MIN(id) ) * RAND() ) > FROM `table` ) > ORDER BY id LIMIT 1; That's pretty elegant. I should have mentioned subqueries too, since it's something I work with also. I think that would avoid forcing a scan of the entire table (or index), unlike ORDER BY RAND() LIMIT 1. Mattias (OK - going back to work now...) From lists at neptunewebworks.com Fri Apr 7 17:06:26 2006 From: lists at neptunewebworks.com (Max Schwanekamp) Date: Fri, 07 Apr 2006 15:06:26 -0700 Subject: [thelist] MySQL select random row [WAS: MySQL queries and AUTO_INCREMENT] In-Reply-To: <20060407134020.3nau771geh444040@www.thorslund.us> References: <160489103479AB4892187638EE7D1E691F4EB4@kjserver1.kjhome.local> <44369581.3020001@neptunewebworks.com> <4436A16B.8010204@thorslund.us> <4436BBF6.1000007@neptunewebworks.com> <20060407134020.3nau771geh444040@www.thorslund.us> Message-ID: <4436E262.6040701@neptunewebworks.com> mattias at thorslund.us wrote: > Quoting Matt Warden: >>SELECT * FROM `table` >>WHERE id >= ( >> SELECT MIN(id) + ROUND( ( MAX(id)-MIN(id) ) * RAND() ) >> FROM `table` ) >>ORDER BY id LIMIT 1; > > That's pretty elegant. I should have mentioned subqueries too, since it's > something I work with also. Yes, it is. I shoulda thought about subqueries as well... Thanks Matt! Plus it's easy to switch out to other RDBMSs with minimal modification. E.g. in MSSQL, use TOP and add the mandatory second argument to ROUND, and remove the backticks or replace em with brackets: SELECT TOP 1 * FROM table WHERE id >= ( SELECT MIN(id) + ROUND( ( MAX(id)-MIN(id) ) * RAND(),0 ) FROM table ) ORDER BY id -- Max Schwanekamp http://www.neptunewebworks.com/ From anthony at baratta.com Fri Apr 7 18:00:53 2006 From: anthony at baratta.com (Anthony Baratta) Date: Fri, 7 Apr 2006 16:00:53 -0700 Subject: [thelist] adding directories to the dotNet Local Assembly cache... Message-ID: <7a64b86543d09b3eaa5a9dfc3c42fbf4@baratta.com> Howdy... I'm playing around with setting up assemblies that are shared among dotNetapplication on the same server. There are two ways, adding the assemblies to the Global Assembly Cache (GAC) or adding directories to the "application probe" directory path. Now - adding to the GAC requires strong named assemblies. I've tried to follow the info here: http://www.ondotnet.com/pub/a/dotnet/2003/04/28/strongnaming.html http://aspalliance.com/394 to setup a strong named assembly - but when I add the assembly to the GAC via: gacutil /i sample.dll its not available. I get a namespace not found type error. And the assembly does not show up in the list of registered assemblies via the Framework Configuration Tool. So I thought I could add a virtual directory to the application directory tree and then add that directory to the "application probe" directory path. e.g. web.config but that didn't seem to work either, and I tried a few combinations of paths and slashes for the privatePath attribute. So, has anyone here successfully created string named assemblies and stored them in the GAC? Or modified the probe directory paths so that the Framework will look in other directories besides "bin". Thanks in advance. From Ken at adOpenStatic.com Fri Apr 7 20:54:23 2006 From: Ken at adOpenStatic.com (Ken Schaefer) Date: Sat, 8 Apr 2006 11:54:23 +1000 Subject: [thelist] vbscript: dateadd weekdays Message-ID: <160489103479AB4892187638EE7D1E691F4EBB@kjserver1.kjhome.local> : -----Original Message----- : From: thelist-bounces at lists.evolt.org [mailto:thelist- : bounces at lists.evolt.org] On Behalf Of Canfield, Joel : Subject: Re: [thelist] vbscript: dateadd weekdays : : thanks for clarifying, Ken : : > The documentation isn't clear about the : > differences between : > "d" and "w" (because there aren't any) : : it does, though, say that 'd' means 'days' and 'w' means 'workdays', : which, in my mind, implies a difference, whatever that might be. : : So, is the only way to add working days (for me, that's Monday through : Friday inclusive) to laboriously walk through the calendar using the : Weekday function? Um, no. You know that every 7 days you have two weekend days. All you need to know is: a) How many days from the StartDate to the next Saturday b) How many lots of 7 days there are between the next Saturday and your EndDate c) How many days between the Sunday and your end Date. Cheers Ken From robert at pennyonthesidewalk.com Sat Apr 8 07:40:35 2006 From: robert at pennyonthesidewalk.com (Robert Gormley) Date: Sat, 08 Apr 2006 22:40:35 +1000 Subject: [thelist] mysqldump and crontab Message-ID: <4437AF43.8070705@pennyonthesidewalk.com> I'm trying to set up a mysqldump job by crontab - problem is, the job works via command line (bash shell on CentOS 4.3), but errors when run by crontab. This is the command line: /usr/local/bin/mysqldump -A --user=xxx --password=xxx | /usr/bin/bzip2 -c > /home/backup/db/`date \+%Y%m%d`.sql.bz2 The above works fine. When run through /etc/crontab: 51 6 * * * root /usr/local... I get this error from the Cron Daemon: /bin/bash: -c: line 0: unexpected EOF while looking for matching ``' /bin/bash: -c: line 1: syntax error: unexpected end of file Anyone able to help? Rob From santilal at scorpioneng.co.nz Sat Apr 8 15:33:35 2006 From: santilal at scorpioneng.co.nz (Santilal Parbhu) Date: Sun, 9 Apr 2006 08:33:35 +1200 Subject: [thelist] php session_start() function Message-ID: Hi I have been trying to write a login page for a website. I want to restrict certain pages of the site, and control this with a username and password. I am having trouble with the first part of a series of scripts to do this. My problem is with the session_start() and session_destroy() functions. Here is the script: Login Page

    Login Page

    $errorMessage"; // Generate the login layout ?>
    Enter your user-name:
    Enter your password:

    Winestore

    Winestore

    You are currently logged in as

    Logout When I run it I get the following error: Warning: open(/tmp\sess_c27a0a85456411904f81baebeda8e71d, O_RDWR) failed: m (2) in c:/program files/abria merlin/apache/htdocs/gameon/pages/alexbasketball/login.php on line 93 Line 93 is //Main Line 94 is session_start(); I also get the error: Warning: Session object destruction failed in c:/program files/abria merlin/apache/htdocs/gameon/pages/alexbasketball/login.php on line 109 Line 109 is session_destroy(); I have scoured through several texts that I have, and I have scoured the net for an answer to this problem, but I can't find anything. I am using php version 4.0.4 and I am using Windows xp. Can anyone help. I was wondering if it was trying to open a temporary file that didn't exist and I am suppose to create one somewhere or something liken that. Thank you. Regards Santilal From misterhaan at track7.org Sat Apr 8 16:11:21 2006 From: misterhaan at track7.org (misterhaan) Date: Sat, 08 Apr 2006 16:11:21 -0500 Subject: [thelist] php session_start() function In-Reply-To: References: Message-ID: <443826F9.30001@track7.org> Santilal Parbhu wrote: > Warning: open(/tmp\sess_c27a0a85456411904f81baebeda8e71d, O_RDWR) failed: m > (2) in c:/program files/abria > merlin/apache/htdocs/gameon/pages/alexbasketball/login.php on line 93 > > Line 93 is //Main > Line 94 is session_start(); > Here it's trying to write to /tmp, which doesn't make much sense to Windows XP. Edit your php.ini and change the temp directory setting to something that exists, like c:/windows/temp possibly. > I also get the error: > > Warning: Session object destruction failed in c:/program files/abria > merlin/apache/htdocs/gameon/pages/alexbasketball/login.php on line 109 > > Line 109 is session_destroy(); > It can't destroy the session because it was never able to create one. If this doesn't go away though, you can suppress the message using @session_destroy() instead of session_destroy(). This isn't really fixing the problem though -- it's just hiding the warning. From mwarden at gmail.com Sat Apr 8 18:27:39 2006 From: mwarden at gmail.com (Matt Warden) Date: Sat, 08 Apr 2006 19:27:39 -0400 Subject: [thelist] php session_start() function In-Reply-To: References: Message-ID: <443846EB.1030602@gmail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Santilal Parbhu wrote: > When I run it I get the following error: > > Warning: open(/tmp\sess_c27a0a85456411904f81baebeda8e71d, O_RDWR) failed: m > (2) in c:/program files/abria > merlin/apache/htdocs/gameon/pages/alexbasketball/login.php on line 93 > > Line 93 is //Main > Line 94 is session_start(); Do a phpinfo() and tell us what the values of session.save_handler and session.save_path are. My guess is that session.save_handler is 'files' and session.save_path is the default of '/tmp'. If you are on Windows, you have to change this to a valid directory (e.g. c:/temp) in order to use PHP sessions. You say: why wouldn't they set the default to a valid directory in the Windows distribution? An excellent question. The answer is 42. (just in case: http://www.google.com/search?q=the%20answer%20to%20life%2C%20the%20universe%2C%20and%20everything) - -- Matt Warden Miami University Oxford, OH, USA http://mattwarden.com This email proudly and graciously contributes to entropy. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFEOEbrrI3LObhzHRMRAljvAJoCorckLMI87bBPjacQqFDHOQUhSgCeNOjy gt/gxT2+Gv1ib356G5Huns8= =zWhL -----END PGP SIGNATURE----- From Anthony at Baratta.com Sat Apr 8 19:12:23 2006 From: Anthony at Baratta.com (Anthony Baratta) Date: Sat, 08 Apr 2006 17:12:23 -0700 Subject: [thelist] mysqldump and crontab In-Reply-To: <4437AF43.8070705@pennyonthesidewalk.com> References: <4437AF43.8070705@pennyonthesidewalk.com> Message-ID: <44385167.4020003@Baratta.com> Did you see your error?? /home/backup/db/`date You have a back tick in there where it shouldn't be. Robert Gormley wrote: > I'm trying to set up a mysqldump job by crontab - problem is, the job > works via command line (bash shell on CentOS 4.3), but errors when run > by crontab. > > This is the command line: > > /usr/local/bin/mysqldump -A --user=xxx --password=xxx | /usr/bin/bzip2 > -c > /home/backup/db/`date > \+%Y%m%d`.sql.bz2 > > The above works fine. > When run through /etc/crontab: > > 51 6 * * * root /usr/local... > > I get this error from the Cron Daemon: > > /bin/bash: -c: line 0: unexpected EOF while looking for matching ``' > /bin/bash: -c: line 1: syntax error: unexpected end of file > > Anyone able to help? > > Rob > From santilal at scorpioneng.co.nz Sat Apr 8 19:40:28 2006 From: santilal at scorpioneng.co.nz (Santilal Parbhu) Date: Sun, 9 Apr 2006 12:40:28 +1200 Subject: [thelist] php session_start() function In-Reply-To: <443826F9.30001@track7.org> Message-ID: Thanks. That sounds like the answer all right. However, I can't seem to be able to change the php.ini file. I have searched for php.ini and I came up with three hits. One was called just php, one called php.ini-dist, and the third was also called just php. The first two were in a directory called c:\Program Files\Abria Merlin\Php, while the third was in a file called c:\Program Files\Abria Merlin\Php/pear/tests. I am using Abria Merlins apache server. The third file just looks like a batch file. The first two are about the same size - about 25kB. I edited the first two files to make session.save_path c:\window\temp, and rebooted my PC, but when I ran phpinfo(), I found that the seesion.save_path was still /tmp. So either I have edited the wrong php.ini file or it hasn't taken up the new configuration. Any ideas on how to make it do this? Thanks again. These little quirks drive you insane. Cheers Santilal -----Original Message----- From: thelist-bounces at lists.evolt.org [mailto:thelist-bounces at lists.evolt.org]On Behalf Of misterhaan Sent: Sunday, 9 April 2006 9:11 a.m. To: thelist at lists.evolt.org Subject: Re: [thelist] php session_start() function Santilal Parbhu wrote: > Warning: open(/tmp\sess_c27a0a85456411904f81baebeda8e71d, O_RDWR) failed: m > (2) in c:/program files/abria > merlin/apache/htdocs/gameon/pages/alexbasketball/login.php on line 93 > > Line 93 is //Main > Line 94 is session_start(); > Here it's trying to write to /tmp, which doesn't make much sense to Windows XP. Edit your php.ini and change the temp directory setting to something that exists, like c:/windows/temp possibly. > I also get the error: > > Warning: Session object destruction failed in c:/program files/abria > merlin/apache/htdocs/gameon/pages/alexbasketball/login.php on line 109 > > Line 109 is session_destroy(); > It can't destroy the session because it was never able to create one. If this doesn't go away though, you can suppress the message using @session_destroy() instead of session_destroy(). This isn't really fixing the problem though -- it's just hiding the warning. -- * * Please support the community that supports you. * * http://evolt.org/help_support_evolt/ For unsubscribe and other options, including the Tip Harvester and archives of thelist go to: http://lists.evolt.org Workers of the Web, evolt ! From santilal at scorpioneng.co.nz Sat Apr 8 19:44:05 2006 From: santilal at scorpioneng.co.nz (Santilal Parbhu) Date: Sun, 9 Apr 2006 12:44:05 +1200 Subject: [thelist] php session_start() function In-Reply-To: <443846EB.1030602@gmail.com> Message-ID: Thanks, I have had another reply suggesting the same thing. What should the setting be for session.save_handler. Is "files" OK. Santilal -----Original Message----- From: thelist-bounces at lists.evolt.org [mailto:thelist-bounces at lists.evolt.org]On Behalf Of Matt Warden Sent: Sunday, 9 April 2006 11:28 a.m. To: thelist at lists.evolt.org Subject: Re: [thelist] php session_start() function -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Santilal Parbhu wrote: > When I run it I get the following error: > > Warning: open(/tmp\sess_c27a0a85456411904f81baebeda8e71d, O_RDWR) failed: m > (2) in c:/program files/abria > merlin/apache/htdocs/gameon/pages/alexbasketball/login.php on line 93 > > Line 93 is //Main > Line 94 is session_start(); Do a phpinfo() and tell us what the values of session.save_handler and session.save_path are. My guess is that session.save_handler is 'files' and session.save_path is the default of '/tmp'. If you are on Windows, you have to change this to a valid directory (e.g. c:/temp) in order to use PHP sessions. You say: why wouldn't they set the default to a valid directory in the Windows distribution? An excellent question. The answer is 42. (just in case: http://www.google.com/search?q=the%20answer%20to%20life%2C%20the%20universe% 2C%20and%20everything) - -- Matt Warden Miami University Oxford, OH, USA http://mattwarden.com This email proudly and graciously contributes to entropy. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFEOEbrrI3LObhzHRMRAljvAJoCorckLMI87bBPjacQqFDHOQUhSgCeNOjy gt/gxT2+Gv1ib356G5Huns8= =zWhL -----END PGP SIGNATURE----- -- * * Please support the community that supports you. * * http://evolt.org/help_support_evolt/ For unsubscribe and other options, including the Tip Harvester and archives of thelist go to: http://lists.evolt.org Workers of the Web, evolt ! From santilal at scorpioneng.co.nz Sat Apr 8 19:33:42 2006 From: santilal at scorpioneng.co.nz (Santilal Parbhu) Date: Sun, 9 Apr 2006 12:33:42 +1200 Subject: [thelist] php session_start() function In-Reply-To: <443826F9.30001@track7.org> Message-ID: Thanks. That sounds like the answer all right. However, I can't seem to be able to change the php.ini file. I have searched for php.ini and I came up with three hits. One was called just php, one called php.ini-dist, and the third was also called just php. The first two were in a directory called c:\Program Files\Abria Merlin\Php, while the third was in a file called c:\Program Files\Abria Merlin\Php/pear/tests. I am using Abria Merlins apache server. The third file just looks like a batch file. The first two are about the same size - about 25kB. I edited the first two files to make session.save_path c:\window\temp, and rebooted my PC, but when I ran phpinfo(), I found that the seesion.save_path was still /tmp. So either I have edited the wrong php.ini file or it hasn't taken up the new configuration. Any ideas on how to make it do this? Thanks again. These little quirks drive you insane. Cheers Santilal -----Original Message----- From: thelist-bounces at lists.evolt.org [mailto:thelist-bounces at lists.evolt.org]On Behalf Of misterhaan Sent: Sunday, 9 April 2006 9:11 a.m. To: thelist at lists.evolt.org Subject: Re: [thelist] php session_start() function Santilal Parbhu wrote: > Warning: open(/tmp\sess_c27a0a85456411904f81baebeda8e71d, O_RDWR) failed: m > (2) in c:/program files/abria > merlin/apache/htdocs/gameon/pages/alexbasketball/login.php on line 93 > > Line 93 is //Main > Line 94 is session_start(); > Here it's trying to write to /tmp, which doesn't make much sense to Windows XP. Edit your php.ini and change the temp directory setting to something that exists, like c:/windows/temp possibly. > I also get the error: > > Warning: Session object destruction failed in c:/program files/abria > merlin/apache/htdocs/gameon/pages/alexbasketball/login.php on line 109 > > Line 109 is session_destroy(); > It can't destroy the session because it was never able to create one. If this doesn't go away though, you can suppress the message using @session_destroy() instead of session_destroy(). This isn't really fixing the problem though -- it's just hiding the warning. -- * * Please support the community that supports you. * * http://evolt.org/help_support_evolt/ For unsubscribe and other options, including the Tip Harvester and archives of thelist go to: http://lists.evolt.org Workers of the Web, evolt ! From dejan at kozina.com Sun Apr 9 01:56:06 2006 From: dejan at kozina.com (Dejan Kozina) Date: Sun, 09 Apr 2006 08:56:06 +0200 Subject: [thelist] php session_start() function In-Reply-To: References: Message-ID: <4438B006.9050908@kozina.com> You should make a copy of php.ini-dist somewhere in your path (like c:\windows), rename it to php.ini and edit this one. djn Santilal Parbhu wrote: > Thanks. > > That sounds like the answer all right. However, I can't seem to be able to > change the php.ini file. I have searched for php.ini and I came up with > three hits. > > One was called just php, one called php.ini-dist, and the third was also > called just php. The first two were in a directory called c:\Program > Files\Abria Merlin\Php, while the third was in a file called c:\Program > Files\Abria Merlin\Php/pear/tests. I am using Abria Merlins apache server. > The third file just looks like a batch file. The first two are about the > same size - about 25kB. > > I edited the first two files to make session.save_path c:\window\temp, and > rebooted my PC, but when I ran phpinfo(), I found that the seesion.save_path > was still /tmp. > > So either I have edited the wrong php.ini file or it hasn't taken up the new > configuration. Any ideas on how to make it do this? > > Thanks again. These little quirks drive you insane. > > Cheers > > Santilal > > > -----Original Message----- > From: thelist-bounces at lists.evolt.org > [mailto:thelist-bounces at lists.evolt.org]On Behalf Of misterhaan > Sent: Sunday, 9 April 2006 9:11 a.m. > To: thelist at lists.evolt.org > Subject: Re: [thelist] php session_start() function > > > Santilal Parbhu wrote: >> Warning: open(/tmp\sess_c27a0a85456411904f81baebeda8e71d, O_RDWR) failed: > m >> (2) in c:/program files/abria >> merlin/apache/htdocs/gameon/pages/alexbasketball/login.php on line 93 >> >> Line 93 is //Main >> Line 94 is session_start(); >> > Here it's trying to write to /tmp, which doesn't make much sense to > Windows XP. Edit your php.ini and change the temp directory setting to > something that exists, like c:/windows/temp possibly. >> I also get the error: >> >> Warning: Session object destruction failed in c:/program files/abria >> merlin/apache/htdocs/gameon/pages/alexbasketball/login.php on line 109 >> >> Line 109 is session_destroy(); >> > It can't destroy the session because it was never able to create one. > If this doesn't go away though, you can suppress the message using > @session_destroy() instead of session_destroy(). This isn't really > fixing the problem though -- it's just hiding the warning. > -- > > * * Please support the community that supports you. * * > http://evolt.org/help_support_evolt/ > > For unsubscribe and other options, including the Tip Harvester > and archives of thelist go to: http://lists.evolt.org > Workers of the Web, evolt ! > > -- Dejan Kozina Dolina 346 (TS) - I-34018 Italy tel./fax: +39 040 228 436 - cell.: +39 348 7355 225 http://www.kozina.com/ - e-mail: dejan at kozina.com From robert at pennyonthesidewalk.com Sun Apr 9 01:56:45 2006 From: robert at pennyonthesidewalk.com (Robert Gormley) Date: Sun, 09 Apr 2006 16:56:45 +1000 Subject: [thelist] php session_start() function In-Reply-To: <4438B006.9050908@kozina.com> References: <4438B006.9050908@kozina.com> Message-ID: <4438B02D.6080404@pennyonthesidewalk.com> Ideally, you should try to work off of php.ini-recommended as a base - I typically do this, even for a dev system, to try to ensure maximum performance / security - however, for development, you probably want to change the error logging options (there are two: display_errors = On, and log_errors = Off) Rob Dejan Kozina wrote: > You should make a copy of php.ini-dist somewhere in your path (like > c:\windows), rename it to php.ini and edit this one. > > From rogerharness at comcast.net Sun Apr 9 03:04:17 2006 From: rogerharness at comcast.net (rogerharness at comcast.net) Date: Sun, 09 Apr 2006 08:04:17 +0000 Subject: [thelist] PHP/MySQL/sum() Message-ID: <040920060804.12688.4438C001000C602E0000319022007507449C9C0A029D0E089D0A09019D@comcast.net> E'volters, I'm not really a 'from scratch" PHP/MySQL programmer. I just try to cut/paste/re-use code and try to make it work for whatever I'm trying to do. I know that the way I have this database set up would probably drive most real programmers crazy. I only have 6 fields; name unique_id class class_date hours auto_number In the database, there can be multiple records for the same person, with his same unique_id, but all for different classes, (Access, Excel, etc.). With the following code, I'm able to successfully view all the person's classes, class dates, and class hours. But what I can't do is get a total of the hours. If Microsoft Access is 8 hours, and Microsoft Excel is 6 hours, I would like the total_hours to print 14. I've been messing with the sum() function, but no matter what I do, I can't get my PHP code to print it to the screen. If I'm actually logged into my database, I'm able to do the 'select sum(hours) from my_table' thing, and get THAT to give me a correct total, but again, I can't get anything like that to actually work on my PHP/HTML page. I've googled/searched/etc, and have found tips, but I just can't seemt to make anything actually work. Does anyone have any help/pointers/advise with this situation? Thank you for any help. (and please ignore the sloppy code/etc. A work in progress, -Roger Harness mysql_select_db("my_database"); $query = "select * from my_table where unique_id = '$unique_id'"; $result = mysql_query($query); $num_results = mysql_num_rows($result); echo "

    Number of Completed classes: ".$num_results."

    "; echo ""; for ($i=0; $i <$num_results; $i++) { $row=mysql_fetch_array($result); echo ""; echo ""; echo ""; } echo "
    "; echo htmlspecialchars( stripslashes($row["class_date"])); echo ""; echo htmlspecialchars( stripslashes($row["class"])); echo ""; echo ($row["hours"]); echo "
    "; From evolt at kasimir-k.fi Sun Apr 9 04:34:42 2006 From: evolt at kasimir-k.fi (kasimir-k) Date: Sun, 09 Apr 2006 09:34:42 +0000 Subject: [thelist] php session_start() function In-Reply-To: References: Message-ID: <4438D532.50102@kasimir-k.fi> Santilal Parbhu scribeva in 09/04/2006 0:40: > I edited the first two files to make session.save_path c:\window\temp, and > rebooted my PC, but when I ran phpinfo(), I found that the seesion.save_path > was still /tmp. Make sure also that the directory you specify exists - and is "c:\window\temp" typo here, or in your php.ini, or is your system directory really "window", not "windows" ;-) Another gotcha I could imagine: make sure that in php.ini you don't have session.save_path set twice, first to C:\windows\temp and later to /tmp > So either I have edited the wrong php.ini file or it hasn't taken up the new > configuration. Any ideas on how to make it do this? phpinfo() tells you also the path of php.ini, in the first section there's entry "Configuration File (php.ini) Path" .k From richard.bennett at skynet.be Sun Apr 9 04:38:02 2006 From: richard.bennett at skynet.be (Richard Bennett) Date: Sun, 9 Apr 2006 11:38:02 +0200 Subject: [thelist] PHP/MySQL/sum() In-Reply-To: <040920060804.12688.4438C001000C602E0000319022007507449C9C0A029D0E089D0A09019D@comcast.net> References: <040920060804.12688.4438C001000C602E0000319022007507449C9C0A029D0E089D0A09019D@comcast.net> Message-ID: <200604091138.03123.richard.bennett@skynet.be> On Sunday 09 April 2006 10:04, rogerharness at comcast.net wrote: > $query = "select * from my_table where unique_id = '$unique_id'"; Hi, Replacing the above with something like this should do it: $query = "select unique_id, max(name) as name, sum(hours) as hours from my_table where unique_id = '$unique_id' group by unique_id"; Hope that's what you meant. Richard From santilal at scorpioneng.co.nz Sun Apr 9 06:13:37 2006 From: santilal at scorpioneng.co.nz (Santilal Parbhu) Date: Sun, 9 Apr 2006 23:13:37 +1200 Subject: [thelist] php session_start() function In-Reply-To: <4438D532.50102@kasimir-k.fi> Message-ID: Thanks for the help. Unfortunately I am no further ahead. >From phpinfo I have copied and pasted the following: Configuration File (php.ini) Path php.ini I presume this means that the php.ini file is in the same directory as php. I have found a php.ini file in the same directory and edited it as below. I have copied and pasted the following from php.ini: session.save_handler = files ; handler used to store/retrieve data session.save_path = c:\WINDOWS\Temp; argument passed to save_handler ; in the case of files, this is the ; path where data files are stored The directory c:\WINDOWS\Temp is exactly as in my directory structure. This looks right to me - any comments?? After re-booting I got the following from phpinfo: session.save_handler files files session.save_path /tmp /tmp This suggests that the changes I made did not work. I looked further and in the environment area of phpinfo I found: TEMP C:\WINDOWS\TEMP TMP C:\WINDOWS\TEMP I am not sure if the above two lines are relevant. I also searched the php.ini file to see if the session.save_path could have been set twice - but alas no. The only thing I haven't done is edit the php.ini-dist file. I know this exists but I don't know what it's for or what it does. It still seems to me that php is picking up the wrong path from somewhere, but I don't know where. Or could it be that php is not initialising each time I reboot my PC. When does php initialise?? Thanks everyone for your help - I'm sure we can crack this one. Santilal -----Original Message----- From: thelist-bounces at lists.evolt.org [mailto:thelist-bounces at lists.evolt.org]On Behalf Of kasimir-k Sent: Sunday, 9 April 2006 9:35 p.m. To: thelist at lists.evolt.org Subject: Re: [thelist] php session_start() function Santilal Parbhu scribeva in 09/04/2006 0:40: > I edited the first two files to make session.save_path c:\window\temp, and > rebooted my PC, but when I ran phpinfo(), I found that the seesion.save_path > was still /tmp. Make sure also that the directory you specify exists - and is "c:\window\temp" typo here, or in your php.ini, or is your system directory really "window", not "windows" ;-) Another gotcha I could imagine: make sure that in php.ini you don't have session.save_path set twice, first to C:\windows\temp and later to /tmp > So either I have edited the wrong php.ini file or it hasn't taken up the new > configuration. Any ideas on how to make it do this? phpinfo() tells you also the path of php.ini, in the first section there's entry "Configuration File (php.ini) Path" .k -- * * Please support the community that supports you. * * http://evolt.org/help_support_evolt/ For unsubscribe and other options, including the Tip Harvester and archives of thelist go to: http://lists.evolt.org Workers of the Web, evolt ! From evolt at kasimir-k.fi Sun Apr 9 09:19:06 2006 From: evolt at kasimir-k.fi (kasimir-k) Date: Sun, 09 Apr 2006 14:19:06 +0000 Subject: [thelist] php session_start() function In-Reply-To: References: Message-ID: <443917DA.4090308@kasimir-k.fi> Santilal Parbhu scribeva in 09/04/2006 11:13: > Configuration File (php.ini) Path php.ini > > I presume this means that the php.ini file is in the same directory as php. Hmm... I'd expect to see absolute path for php.ini... but I don't know. > session.save_handler = files ; handler used to store/retrieve data > session.save_path = c:\WINDOWS\Temp; argument passed to save_handler > ; in the case of files, this is the > ; path where data files are stored > > The directory c:\WINDOWS\Temp is exactly as in my directory structure. This > looks right to me - any comments?? It looks right... > After re-booting I got the following from phpinfo: > session.save_handler files files > session.save_path /tmp /tmp > > This suggests that the changes I made did not work. True. Makes me think that PHP isn't finding the php.ini. Try moving it from php dircetory to C:\windows and restart Apache (no need to restart your computer). http://php.net/manual/en/configuration.php Or plan B: set the value in httpd.conf, .htaccess or script level using ini_set() http://php.net/manual/en/function.ini-set.php http://php.net/manual/en/ini.php .k From robert at pennyonthesidewalk.com Sun Apr 9 09:35:22 2006 From: robert at pennyonthesidewalk.com (Robert Gormley) Date: Mon, 10 Apr 2006 00:35:22 +1000 Subject: [thelist] mysqldump and crontab In-Reply-To: <44385167.4020003@Baratta.com> References: <4437AF43.8070705@pennyonthesidewalk.com> <44385167.4020003@Baratta.com> Message-ID: <44391BAA.8040509@pennyonthesidewalk.com> The backtick works fine interactively by the command line - but doesn't seem to be parsed by cron... is there any equivalent, or do I just need to do more escaping? Rob Anthony Baratta wrote: > Did you see your error?? > > /home/backup/db/`date > > You have a back tick in there where it shouldn't be. > > > Robert Gormley wrote: > >> I'm trying to set up a mysqldump job by crontab - problem is, the job >> works via command line (bash shell on CentOS 4.3), but errors when run >> by crontab. >> >> This is the command line: >> >> /usr/local/bin/mysqldump -A --user=xxx --password=xxx | /usr/bin/bzip2 >> -c > /home/backup/db/`date >> \+%Y%m%d`.sql.bz2 >> >> The above works fine. >> When run through /etc/crontab: >> >> 51 6 * * * root /usr/local... >> >> I get this error from the Cron Daemon: >> >> /bin/bash: -c: line 0: unexpected EOF while looking for matching ``' >> /bin/bash: -c: line 1: syntax error: unexpected end of file >> >> Anyone able to help? >> >> Rob >> >> > > From hassan at webtuitive.com Sun Apr 9 10:20:58 2006 From: hassan at webtuitive.com (Hassan Schroeder) Date: Sun, 09 Apr 2006 08:20:58 -0700 Subject: [thelist] mysqldump and crontab In-Reply-To: <44391BAA.8040509@pennyonthesidewalk.com> References: <4437AF43.8070705@pennyonthesidewalk.com> <44385167.4020003@Baratta.com> <44391BAA.8040509@pennyonthesidewalk.com> Message-ID: <4439265A.5010103@webtuitive.com> Robert Gormley wrote: > The backtick works fine interactively by the command line - but doesn't > seem to be parsed by cron... is there any equivalent, or do I just need > to do more escaping? By default, cron runs /bin/sh, not bash -- subtle differences, but... >>>I'm trying to set up a mysqldump job by crontab - problem is, the job >>>works via command line (bash shell on CentOS 4.3) >>>/usr/local/bin/mysqldump -A --user=xxx --password=xxx | /usr/bin/bzip2 >>>-c > /home/backup/db/`date >>> \+%Y%m%d`.sql.bz2 I'd first try putting the full path of `date` in there; if that's no help, put the entire command in a shell script and invoke *that* from cron. Just for grins, I made a shell script from this, adjusted for local conditions :-) and ran that from cron successfully (SuSE 9.1). HTH! -- Hassan Schroeder ----------------------------- hassan at webtuitive.com Webtuitive Design === (+1) 408-938-0567 === http://webtuitive.com opinion: webtuitive.blogspot.com dream. code. From misterhaan at track7.org Sun Apr 9 10:40:52 2006 From: misterhaan at track7.org (misterhaan) Date: Sun, 09 Apr 2006 10:40:52 -0500 Subject: [thelist] php session_start() function In-Reply-To: <443917DA.4090308@kasimir-k.fi> References: <443917DA.4090308@kasimir-k.fi> Message-ID: <44392B04.1000708@track7.org> Santilal Parbhu scribeva in 09/04/2006 11:13: > session.save_handler = files ; handler used to store/retrieve data > session.save_path = c:\WINDOWS\Temp; argument passed to save_handler > ; in the case of files, this is the > ; path where data files are stored > > The directory c:\WINDOWS\Temp is exactly as in my directory structure. This > looks right to me - any comments?? You probably need to either use forward slashes (c:/windows/temp), or escape your backslashes (c:\\windows\\temp) From lists at neptunewebworks.com Sun Apr 9 14:03:39 2006 From: lists at neptunewebworks.com (Max Schwanekamp) Date: Sun, 09 Apr 2006 12:03:39 -0700 Subject: [thelist] php session_start() function In-Reply-To: References: Message-ID: <44395A8B.4080502@neptunewebworks.com> Santilal Parbhu wrote: > I have had another reply suggesting the same thing. What should the setting > be for session.save_handler. Is "files" OK. That is what it should be in most cases. Probably best to override it in the apps that use another storage engine for session data. E.g. an app that stores session data in a database would call session_set_save_handler() (or the equivalent using ini_set()) to set this differently. The important thing is that when running php on Windows, this should be a valid windows path, e.g. C:\tmp and that directory must exist and be writeable. Santilal Parbhu also wrote: > I can't seem to be able to > change the php.ini file. I have searched for php.ini and I came up with > three hits. Run php_info() and look at the top block for the correct file. E.g. on my dev machine php_info() gives this: Configuration File (php.ini) Path C:\php\php.ini You'll find lots of other useful info in the output from php_info(). N.B. Don't expose php_info() output to the open web! A few other important settings that need valid windows paths: extensions_dir include_path upload_tmp_dir If this at all baffling, consider using WAMP[0] or XAMPP[1]. Your life will be much simpler. [0] http://www.en.wampserver.com/ [1] http://www.apachefriends.org/en/xampp.html -- Max Schwanekamp http://www.neptunewebworks.com/ From thelist at cjmarsh.com Sun Apr 9 14:26:50 2006 From: thelist at cjmarsh.com (Chris Marsh) Date: Sun, 9 Apr 2006 20:26:50 +0100 Subject: [thelist] Corrupt File Downloads Message-ID: <000101c65c0b$8d4d8020$0200000a@CJMLTP01> All I have a PC running Windows 2000. I have run Windows update to ensure that the hotfixes are up to date. I can surf the web with no problems through a browser. However, when I attempt to download any files that are not rendered in the browser, I am prevented from doing so. The download appears to have executed correctly (albeit far too swiftly), but the file is a fraction of the correct size. I am getting no errors being reported, only the usual "Download Complete" messages. I have tried clearing the cache, manually clearing the temporary internet files directory, searching the HDD for any files of the same name (in case a cache that I'm unaware of is in operation - no files were found), and virus scanning the machine. The files that I have tried to download are from many different organisations and locations, and all have downloaded fine onto a different machine on the same network. This problem occurs with Internet Explorer 6, and Mozilla 1.4 - there are no other browsers installed. No proxy server is being used. Does anyone have any ideas? I'm having a bit of a problem even coming up with effective search terms for Google, and have hit a bit of a brick wall. Any thoughts would be appreciated. Regards Chris Marsh From volkan.ozcelik at gmail.com Sun Apr 9 15:16:22 2006 From: volkan.ozcelik at gmail.com (=?ISO-8859-9?Q?VOLKAN_=D6Z=C7EL=DDK?=) Date: Sun, 9 Apr 2006 23:16:22 +0300 Subject: [thelist] cron job for crawling web pages In-Reply-To: <4434D424.4060802@webtuitive.com> References: <4434D424.4060802@webtuitive.com> Message-ID: >I use VMWare to run instances of XP and W2K on my SuSE machine so >that may not be exactly analogous, but it works great :-) VMWare worked great except for a resolution issue (I could display at most 800*600, I've installed the vmware tools on the guest OS but things did not change). Thinking about the current project, I think I'll either use wget, or I'd be calling some ruby script via a cron job to handle it since I need something tailor-made. Both swish and wget are nice tools to be kept in my repository for later use none the less. Thank you for all your help. -- Volkan Ozcelik +>Yep! I'm blogging! : http://www.volkanozcelik.com/volkanozcelik/blog/ +> My projects/studies/trials/errors : http://www.sarmal.com/ From rick.denhaan at gmail.com Sun Apr 9 15:18:58 2006 From: rick.denhaan at gmail.com (Rick den Haan) Date: Sun, 9 Apr 2006 22:18:58 +0200 Subject: [thelist] Formatting rightholder's name... Message-ID: List, I'm finally getting round to redesigning the website for my radio show - I'd been unhappy with the current design since I first invented it in 2002, so it's about time. Since it's a Country & Western-programme, I'm trying to get a country feel to it, which, to me, means browns and a bit of wood-pattern. I've chosen blue for a contrasting color and I'd like your opinions on my current design: http://www.countryexpress.nl/nieuw But here's the issue. I want to use that photo of a rearing horse in the banner. Having contacted the website the photo comes from, I'm allowed to use it, if I mention the photographer's name. Currently, the banner says "Foto: Jeremy Rynders". However, the site is going to be multilingual (Dutch and English), so I shouldn't really include "Foto", or I should make a different one that says "Photo" for English. But most (local) visitors will come from telephone-lines, so 5 Kbps max. The banner is 17KB, so I don't really want to reload it every time a visitor changes their language. I've thought about putting "(c) Jeremy Rynders" there, but I think that will be misinterpreted as including the guitar, which is mine. I could probably place the text somewhere else, but I've been meddling with it for a while now and I rather like it as it is now. Apart from the fact that English visitors will claim a spelling error.... Any tips? Rick. On a sidenote, I completely forgot to post a follow-up to the XLS Export question I asked a while ago. After testing, we finally went for the PEAR Spreadsheet_Excel_Writer package, which doesn't really need PEAR, as Dejan Kozina mentioned. It is dependent on the PEAR OLE module and the PEAR.phpfile, but uploading those files alongside our export script worked magnificently. From psm2713 at hotmail.com Sun Apr 9 15:30:07 2006 From: psm2713 at hotmail.com (Ken Moore) Date: Sun, 09 Apr 2006 14:30:07 -0600 Subject: [thelist] Pass vars to HTML in PHP Message-ID: Hi all, I am creating RSS feeds in tables as here:
    The feeds work fine. The problem is that I need to color match about 20 to 25 different sites. Rather than create 20 different pages that identical except for the color, I want to pass in the color, ?339933?, as a variable using PHP. I am pretty certain that this is possible. Please help.. Ken _________________________________________________________________ Is your PC infected? Get a FREE online computer virus scan from McAfee? Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 From mwarden at gmail.com Sun Apr 9 15:45:33 2006 From: mwarden at gmail.com (Matt Warden) Date: Sun, 9 Apr 2006 16:45:33 -0400 Subject: [thelist] Pass vars to HTML in PHP In-Reply-To: References: Message-ID: On 4/9/06, Ken Moore wrote: > Hi all, > > I am creating RSS feeds in tables as here: > > > >
    > > The feeds work fine. The problem is that I need to color match about 20 to > 25 different sites. Rather than create 20 different pages that identical > except for the color, I want to pass in the color, "339933", as a variable > using PHP. I am pretty certain that this is possible. Please help..
    This will give you the default color of #339933, unless there is a query string variable named 'color': http://myserver.com/path/myscript.php?color=995732 This will give you a color of #995732 hth, -- Matt Warden Miami University Oxford, OH, USA http://mattwarden.com This email proudly and graciously contributes to entropy. From santilal at scorpioneng.co.nz Sun Apr 9 20:11:38 2006 From: santilal at scorpioneng.co.nz (Santilal Parbhu) Date: Mon, 10 Apr 2006 13:11:38 +1200 Subject: [thelist] php session_start() function In-Reply-To: <443917DA.4090308@kasimir-k.fi> Message-ID: Hey thanks guys, Finally cracked it. There was another file called php.ini in the c:/WINDOWS/Temp directory. I don't know why there were two (here and one in the php directory). Anyway I changed the seeion.save_path in the Windows one, and that solved the problem. Thanks for all the help - I have been tearing my hair out over this one. Cheers Santilal -----Original Message----- From: thelist-bounces at lists.evolt.org [mailto:thelist-bounces at lists.evolt.org]On Behalf Of kasimir-k Sent: Monday, 10 April 2006 2:19 a.m. To: thelist at lists.evolt.org Subject: Re: [thelist] php session_start() function Santilal Parbhu scribeva in 09/04/2006 11:13: > Configuration File (php.ini) Path php.ini > > I presume this means that the php.ini file is in the same directory as php. Hmm... I'd expect to see absolute path for php.ini... but I don't know. > session.save_handler = files ; handler used to store/retrieve data > session.save_path = c:\WINDOWS\Temp; argument passed to save_handler > ; in the case of files, this is the > ; path where data files are stored > > The directory c:\WINDOWS\Temp is exactly as in my directory structure. This > looks right to me - any comments?? It looks right... > After re-booting I got the following from phpinfo: > session.save_handler files files > session.save_path /tmp /tmp > > This suggests that the changes I made did not work. True. Makes me think that PHP isn't finding the php.ini. Try moving it from php dircetory to C:\windows and restart Apache (no need to restart your computer). http://php.net/manual/en/configuration.php Or plan B: set the value in httpd.conf, .htaccess or script level using ini_set() http://php.net/manual/en/function.ini-set.php http://php.net/manual/en/ini.php .k -- * * Please support the community that supports you. * * http://evolt.org/help_support_evolt/ For unsubscribe and other options, including the Tip Harvester and archives of thelist go to: http://lists.evolt.org Workers of the Web, evolt ! From guy at thinkitbyhand.com Sun Apr 9 01:18:37 2006 From: guy at thinkitbyhand.com (Guy Foresman) Date: Sat, 8 Apr 2006 23:18:37 -0700 Subject: [thelist] Open Source Shooping Cart with Good Quickbooks Integration Message-ID: <000501c65b9d$707a8ab0$650aa8c0@gforesman> Hi, I am also looking into oscommerce for quick books integration as well as ups integration. Have you been happy with what you have found and the results of integration into oscommerce or other shopping carts? Thank you, Guy guy at thinkitbyhand.com