From 1j0lkq002 at sneakemail.com Thu Mar 1 01:20:12 2007 From: 1j0lkq002 at sneakemail.com (inforequest) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] Google Maps API In-Reply-To: <8d9a42800702282021x4450b66fk5c0059606437a355@mail.gmail.com> References: <8d9a42800702281449v33deb86aoe4ec89e665902492@mail.gmail.com> <17023-34469@sneakemail.com> <8d9a42800702282021x4450b66fk5c0059606437a355@mail.gmail.com> Message-ID: <7856-87992@sneakemail.com> Joseph Crawford codebowl-at-gmail.com |nyphp dev/internal group use| wrote: > I found what is happening is that you will see 6 clusters on the > screen each will say there are 6 points under the cluster when in fact > there are only 6 points total, some reason it is making each point a > cluster when there are more than 5 points on the screen. I need to > dig down into that. > > I also need to know how to pass a value from JS to PHP so that i can > do map.getZoom() and use the value in PHP any ideas? > > -- > Joseph Crawford Jr. > Zend Certified Engineer > Codebowl Solutions, Inc. > http://www.codebowl.com/ > Blog: http://www.josephcrawford.com/ > 1-802-671-2021 > codebowl@gmail.com See PHP Talk list from July 7-8 2006 "Passing Javascript Arrays" -=john -- ------------------------------------------------------------- Your web server traffic log file is the most important source of web business information available. Do you know where your logs are right now? Do you know who else has access to your log files? When they were last archived? Where those archives are? --John Andrews Competitive Webmaster and SEO Blogging at http://www.johnon.com From codebowl at gmail.com Thu Mar 1 07:54:43 2007 From: codebowl at gmail.com (Joseph Crawford) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] Google Maps API In-Reply-To: <7856-87992@sneakemail.com> References: <8d9a42800702281449v33deb86aoe4ec89e665902492@mail.gmail.com> <17023-34469@sneakemail.com> <8d9a42800702282021x4450b66fk5c0059606437a355@mail.gmail.com> <7856-87992@sneakemail.com> Message-ID: <8d9a42800703010454n639f6279uda0489f83108ad81@mail.gmail.com> Thanks, This is a very good read on how to pass from PHP to JavaScript but what i need to do is the opposite. I need to pass from JavaScript to PHP. Thanks, -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. http://www.codebowl.com/ Blog: http://www.josephcrawford.com/ 1-802-671-2021 codebowl@gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.lists.nyphp.org/pipermail/front-end/attachments/20070301/2f894292/attachment.html From kenrbnsn at rbnsn.com Thu Mar 1 08:01:58 2007 From: kenrbnsn at rbnsn.com (Ken Robinson) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] Google Maps API In-Reply-To: <8d9a42800703010454n639f6279uda0489f83108ad81@mail.gmail.co m> References: <8d9a42800702281449v33deb86aoe4ec89e665902492@mail.gmail.com> <17023-34469@sneakemail.com> <8d9a42800702282021x4450b66fk5c0059606437a355@mail.gmail.com> <7856-87992@sneakemail.com> <8d9a42800703010454n639f6279uda0489f83108ad81@mail.gmail.com> Message-ID: At 07:54 AM 3/1/2007, Joseph Crawford wrote: >Thanks, This is a very good read on how to pass from PHP to >JavaScript but what i need to do is the opposite. I need to pass >from JavaScript to PHP. The only way that I know to pass from Javascript to PHP is to use AJAX techniques. I've been using the Connection Manager in the Yahoo User Interface library when I want to do this. Yes, I have used the Yahoo library with Google Maps. Ken From codebowl at gmail.com Thu Mar 1 09:24:59 2007 From: codebowl at gmail.com (Joseph Crawford) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] Google Maps API In-Reply-To: <45e6cec9.7bf7c1b1.3196.ffffa446SMTPIN_ADDED@mx.google.com> References: <8d9a42800702281449v33deb86aoe4ec89e665902492@mail.gmail.com> <17023-34469@sneakemail.com> <8d9a42800702282021x4450b66fk5c0059606437a355@mail.gmail.com> <7856-87992@sneakemail.com> <8d9a42800703010454n639f6279uda0489f83108ad81@mail.gmail.com> <45e6cec9.7bf7c1b1.3196.ffffa446SMTPIN_ADDED@mx.google.com> Message-ID: <8d9a42800703010624i5775e722p92286e00cb560e26@mail.gmail.com> I see you have to pass it at a query string parameter ;) Thanks. The clustering method this book provides is not that great because the marker count and placement changes as you move around the map and that is not good. I am going to look into an alternative method for clustering. Maybe by creating a tic tac toe grid on the map and clustering the points within each square, not sure yet though. Thanks, -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. http://www.codebowl.com/ Blog: http://www.josephcrawford.com/ 1-802-671-2021 codebowl@gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.lists.nyphp.org/pipermail/front-end/attachments/20070301/dc5f885b/attachment.html From rmarscher at beaffinitive.com Thu Mar 1 09:52:43 2007 From: rmarscher at beaffinitive.com (Rob Marscher) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] Google Maps API In-Reply-To: <8d9a42800703010624i5775e722p92286e00cb560e26@mail.gmail.com> References: <8d9a42800702281449v33deb86aoe4ec89e665902492@mail.gmail.com> <17023-34469@sneakemail.com> <8d9a42800702282021x4450b66fk5c0059606437a355@mail.gmail.com> <7856-87992@sneakemail.com> <8d9a42800703010454n639f6279uda0489f83108ad81@mail.gmail.com> <45e6cec9.7bf7c1b1.3196.ffffa446SMTPIN_ADDED@mx.google.com> <8d9a42800703010624i5775e722p92286e00cb560e26@mail.gmail.com> Message-ID: <669E73AD-E664-4FCD-819B-2CF29FA6631B@beaffinitive.com> > I see you have to pass it at a query string parameter ;) Thanks. While I think using ajax/query string is probably the better way to do it... just thought I'd throw out there that you could set a cookie. -Rob -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.lists.nyphp.org/pipermail/front-end/attachments/20070301/2e142102/attachment.html From codebowl at gmail.com Thu Mar 1 12:22:15 2007 From: codebowl at gmail.com (Joseph Crawford) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] Google Maps API In-Reply-To: <669E73AD-E664-4FCD-819B-2CF29FA6631B@beaffinitive.com> References: <8d9a42800702281449v33deb86aoe4ec89e665902492@mail.gmail.com> <17023-34469@sneakemail.com> <8d9a42800702282021x4450b66fk5c0059606437a355@mail.gmail.com> <7856-87992@sneakemail.com> <8d9a42800703010454n639f6279uda0489f83108ad81@mail.gmail.com> <45e6cec9.7bf7c1b1.3196.ffffa446SMTPIN_ADDED@mx.google.com> <8d9a42800703010624i5775e722p92286e00cb560e26@mail.gmail.com> <669E73AD-E664-4FCD-819B-2CF29FA6631B@beaffinitive.com> Message-ID: <8d9a42800703010922o5ae725d9k483e1405054eb259@mail.gmail.com> So i was thinking that it would be best to create an invisible overlay shall we say that looks like a tic tac toe grid on the map and cluster the points that are within that block (if there are more than say 5) however i do not think this is going to be the best method. I like how fast the map is with the server side clustering that this book suggests however i do not like how when you move the map around the points appear and dissapear. They also seem to move around the map a bit so I am not sure what is going on with it. Do any of you have any suggestions on how to do server side clustering where the points wont move around like they do? Here is the server side clustering enabled http://codebowl.homeip.net/eremaps/ here is with no clustering (SLOW) http://codebowl.homeip.net/eremaps/test.php Any suggestions/assistance would be great. Thanks, -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. http://www.codebowl.com/ Blog: http://www.josephcrawford.com/ 1-802-671-2021 codebowl@gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.lists.nyphp.org/pipermail/front-end/attachments/20070301/d0d40b8d/attachment.html From codebowl at gmail.com Fri Mar 2 15:57:31 2007 From: codebowl at gmail.com (Joseph Crawford) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] Google Maps API In-Reply-To: <8d9a42800703010922o5ae725d9k483e1405054eb259@mail.gmail.com> References: <8d9a42800702281449v33deb86aoe4ec89e665902492@mail.gmail.com> <17023-34469@sneakemail.com> <8d9a42800702282021x4450b66fk5c0059606437a355@mail.gmail.com> <7856-87992@sneakemail.com> <8d9a42800703010454n639f6279uda0489f83108ad81@mail.gmail.com> <45e6cec9.7bf7c1b1.3196.ffffa446SMTPIN_ADDED@mx.google.com> <8d9a42800703010624i5775e722p92286e00cb560e26@mail.gmail.com> <669E73AD-E664-4FCD-819B-2CF29FA6631B@beaffinitive.com> <8d9a42800703010922o5ae725d9k483e1405054eb259@mail.gmail.com> Message-ID: <8d9a42800703021257o74158d2do351dcfe0bc142fc8@mail.gmail.com> ok so here is a new question. I have setup the maps implementation at http://codebowl.homeip.net/eremaps/ The map portion works and i even made the drop down boxes submit the form when you change a value for either of them. However the map is not updating when i choose a drop down box. You can see in the log that the URL does change, there is a bug or something because if you load the url that the drop down gives it does not give any results so the markers should go away on the map. I am calling this function in the drop downs onchange event. function onChange(frm) { var bounds = map.getBounds(); var currentZoom = map.getZoom(); var southWest = bounds.getSouthWest(); var northEast = bounds.getNorthEast(); var getVars = 'ne=' + northEast.toUrlValue() + '&sw=' + southWest.toUrlValue() + '¤tZoom=' + map.getZoom(); var request = GXmlHttp.create(); for (var i = 0; i < frm.length; i++) { getVars = getVars + '&' + frm[i].name + '=' + frm[i].value; } GLog.writeUrl('server.php?' + getVars); request.open('GET', 'server.php?'+getVars, true); request.onreadystatechange = function() { if (request.readyState == 4) { var jscript = request.responseText; eval(jscript); } } request.send(null); } This is very similar to what is happening in the updateMarkers function however I am not sure how to make the map update with these drop downs? Please do not flame me for the code, i know pretty much nothing about JS (learned a lot over the last few days) but have pieced this application together in about 4 days part time. Thanks, -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. http://www.codebowl.com/ Blog: http://www.josephcrawford.com/ 1-802-671-2021 codebowl@gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.lists.nyphp.org/pipermail/front-end/attachments/20070302/084ee5d3/attachment.html From codebowl at gmail.com Tue Mar 6 11:39:49 2007 From: codebowl at gmail.com (Joseph Crawford) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] Retaining Values using AJAX Message-ID: <8d9a42800703060839s6301c0ct1884032b13a23333@mail.gmail.com> Hello, I am going to try to explain this the best i can and even give walk through instructions the best way for you to understand is to see what i am doing. http://codebowl.homeip.net/eremaps/ I have that map and upon the initial load it plots the markers for all conference attendees. Now this is where things get hairy, when you click a marker or change zooms it is using the MarkerManager to show different markers at different zooms. The states are shown at zoom leve 3, the cities at zoom level 5 and individual markers at zoom level 6. If you click a marker it will zoom you to the appropriate zoom level. Now what i am doing is trying to combine a few drop down boxes with the map so that when you select a value it will refine the markers that are plotted. For instance if you go to the map you can select Education from the drop down. The javascript reads the values for the form drop downs and refines the data. However that is done by it reading the form and looping over the form elements. What i am trying to do in a nutshell is this 1.) Load the main page 2.) refine to Education 3.) Click a marker (say California) now it should retain the industry=Education but for some reason it falls back to all and shows all markers in that area. In the top of server.php this is what i have $industry = ( isset( $_GET['industry'] ) ) ? $_GET['industry'] : 'all'; and at the bottom I have echo "var industry = '".$industry."';\n"; Now because server.php is called with the querystring server.php?ne=57.04073,-53.4375&sw=5.090944,- 134.648437¤tZoom=3&industry=Education&cosize=all industry should be set to Education right? In my updateMarkers event (executed when you click a marker) I have this var getVars = 'ne=' + northEast.toUrlValue() + '&sw=' + southWest.toUrlValue() + '¤tZoom=' + map.getZoom() + '&industry=' + industry + '&cosize=' + cosize; However for some reason industry is always set back to ALL. I am not quite sure why. To see what I mean do this (and keep watching the log) 1.) go to http://codebowl.homeip.net/eremaps/ 2.) Choose Education from the industry drop down 3.) Click the marker over California. Notice that when you click the industry is lost? Here is what my log looks like when i do the above steps. INITIAL LOAD 11:20:54:205 server.php?ne=57.04073,-53.4375&sw=5.090944,- 134.648437¤tZoom=3&industry=all&cosize=all INDUSTRY CHOICE 11:21:07:065 server.php?ne=57.04073,-53.4375&sw=5.090944,- 134.648437¤tZoom=3&industry=Education&cosize=all CALIFORNIA CLICK 11:21:14:557 server.php?ne=47.15984,-73.740234&sw=20.797201,- 114.345703¤tZoom=4&industry=all&cosize=all The way i see it working is this 1.) initial load, industry set to all because server.php is called without a query string 2.) industry choice, industry set to the appropriate industry because it is passed a query string 3.) marker click, it should retain the industry value from the last event because the page has not been reloaded. You can see the full source code here http://codebowl.homeip.net/eremaps.zip You will be interested in scripts/ere_functions.js, /index.php and /server.php Any help will be appreciated Thanks, -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. http://www.codebowl.com/ Blog: http://www.josephcrawford.com/ 1-802-671-2021 codebowl@gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.lists.nyphp.org/pipermail/front-end/attachments/20070306/6927573a/attachment.html From chsnyder at gmail.com Tue Mar 6 11:54:55 2007 From: chsnyder at gmail.com (csnyder) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] Retaining Values using AJAX In-Reply-To: <8d9a42800703060839s6301c0ct1884032b13a23333@mail.gmail.com> References: <8d9a42800703060839s6301c0ct1884032b13a23333@mail.gmail.com> Message-ID: On 3/6/07, Joseph Crawford wrote: > 1.) initial load, industry set to all because server.php is called without a > query string > 2.) industry choice, industry set to the appropriate industry because it is > passed a query string > 3.) marker click, it should retain the industry value from the last event > because the page has not been reloaded. You need to track state and make the code that sets up the get vars a little smarter. Find a place to hang state information: var state = { "industry":"all" } Whenever an industry is selected, change the state.industry property. state.industry = selectedIndustry; Now, whenever you build getVars, use the state.industry property: var getVars = ... + '&industry=' + state.industry + ... ; Hope that helps. -- Chris Snyder http://chxo.com/ From rmarscher at beaffinitive.com Tue Mar 6 12:01:11 2007 From: rmarscher at beaffinitive.com (Rob Marscher) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] Retaining Values using AJAX In-Reply-To: <8d9a42800703060839s6301c0ct1884032b13a23333@mail.gmail.com> References: <8d9a42800703060839s6301c0ct1884032b13a23333@mail.gmail.com> Message-ID: > 1.) Load the main page > 2.) refine to Education > 3.) Click a marker (say California) > > now it should retain the industry=Education but for some reason it > falls back to all and shows all markers in that area. Did you fix it already?? Seemed to work fine for me with Firefox on Mac. The markers don't show up for me in Safari though :( From codebowl at gmail.com Tue Mar 6 12:09:16 2007 From: codebowl at gmail.com (Joseph Crawford) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] Retaining Values using AJAX In-Reply-To: References: <8d9a42800703060839s6301c0ct1884032b13a23333@mail.gmail.com> Message-ID: <8d9a42800703060909t3d60b5b4hb9b0069492ad4f9d@mail.gmail.com> it was not fixed sorry i was messing around with making it read the form on every click and i think that is too much i should be able to retain state somewhow -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. http://www.codebowl.com/ Blog: http://www.josephcrawford.com/ 1-802-671-2021 codebowl@gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.lists.nyphp.org/pipermail/front-end/attachments/20070306/d062cd43/attachment.html From codebowl at gmail.com Tue Mar 6 12:10:41 2007 From: codebowl at gmail.com (Joseph Crawford) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] Retaining Values using AJAX In-Reply-To: References: <8d9a42800703060839s6301c0ct1884032b13a23333@mail.gmail.com> Message-ID: <8d9a42800703060910h7b0f7743j2c18bddcbe1d6a4@mail.gmail.com> Chris, While what you are suggesting might work, that is pretty much what i am doing on this page. if you look at the code you will notice that server.php reads the value from the query string and writes out var industry = 'Education'; which should be readable by the updateMarkers function. This is done in the onChange method because it reads the form and passes the value along to the server.php via query string. -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. http://www.codebowl.com/ Blog: http://www.josephcrawford.com/ 1-802-671-2021 codebowl@gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.lists.nyphp.org/pipermail/front-end/attachments/20070306/55d37e9f/attachment.html From codebowl at gmail.com Tue Mar 6 12:47:01 2007 From: codebowl at gmail.com (Joseph Crawford) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] Retaining Values using AJAX In-Reply-To: References: <8d9a42800703060839s6301c0ct1884032b13a23333@mail.gmail.com> Message-ID: <8d9a42800703060947o412aad93s37fb69401581b50d@mail.gmail.com> how would i do something like this? state.frm[i].name i need to make frm[i].name evaluate first since that will be industry or cosize etc. then it could do state.cosize etc. can that be done or am i thinking wrong here? On 3/6/07, csnyder wrote: > > On 3/6/07, Joseph Crawford wrote: > > > 1.) initial load, industry set to all because server.php is called > without a > > query string > > 2.) industry choice, industry set to the appropriate industry because it > is > > passed a query string > > 3.) marker click, it should retain the industry value from the last > event > > because the page has not been reloaded. > > You need to track state and make the code that sets up the get vars a > little smarter. > > Find a place to hang state information: > var state = { "industry":"all" } > > Whenever an industry is selected, change the state.industry property. > state.industry = selectedIndustry; > > Now, whenever you build getVars, use the state.industry property: > var getVars = ... + '&industry=' + state.industry + ... ; > > Hope that helps. > > -- > Chris Snyder > http://chxo.com/ > _______________________________________________ > New York PHP SIG: Front End Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/front-end > http://www.nyphp.org > -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. http://www.codebowl.com/ Blog: http://www.josephcrawford.com/ 1-802-671-2021 codebowl@gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.lists.nyphp.org/pipermail/front-end/attachments/20070306/cdf2d9db/attachment.html From rmarscher at beaffinitive.com Tue Mar 6 12:51:45 2007 From: rmarscher at beaffinitive.com (Rob Marscher) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] Retaining Values using AJAX In-Reply-To: <8d9a42800703060947o412aad93s37fb69401581b50d@mail.gmail.com> References: <8d9a42800703060839s6301c0ct1884032b13a23333@mail.gmail.com> <8d9a42800703060947o412aad93s37fb69401581b50d@mail.gmail.com> Message-ID: > how would i do something like this? > > state.frm[i].name > > i need to make frm[i].name evaluate first since that will be > industry or cosize etc. then it could do state.cosize etc. > > can that be done or am i thinking wrong here? I think you need to set frm[i].name to a temp var first: var formName = frm[i].name; state.formName (not totally positive on that... but I think that's the way you have to do it) From codebowl at gmail.com Tue Mar 6 12:54:07 2007 From: codebowl at gmail.com (Joseph Crawford) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] Retaining Values using AJAX In-Reply-To: References: <8d9a42800703060839s6301c0ct1884032b13a23333@mail.gmail.com> <8d9a42800703060947o412aad93s37fb69401581b50d@mail.gmail.com> Message-ID: <8d9a42800703060954p784b7ae9sdc0af67628d98587@mail.gmail.com> Rob, Thanks that worked however the end result is the same as it was before when i was using the variable industry before. when you click it resets to 'all' for some reason. Thanks, -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. http://www.codebowl.com/ Blog: http://www.josephcrawford.com/ 1-802-671-2021 codebowl@gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.lists.nyphp.org/pipermail/front-end/attachments/20070306/c1bc9f0f/attachment.html From codebowl at gmail.com Tue Mar 6 17:06:55 2007 From: codebowl at gmail.com (Joseph Crawford) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] Retaining Values using AJAX In-Reply-To: <8d9a42800703060954p784b7ae9sdc0af67628d98587@mail.gmail.com> References: <8d9a42800703060839s6301c0ct1884032b13a23333@mail.gmail.com> <8d9a42800703060947o412aad93s37fb69401581b50d@mail.gmail.com> <8d9a42800703060954p784b7ae9sdc0af67628d98587@mail.gmail.com> Message-ID: <8d9a42800703061406x724d34b8l55fa61184023025d@mail.gmail.com> So does anyone have any idea why this is happening? -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. http://www.codebowl.com/ Blog: http://www.josephcrawford.com/ 1-802-671-2021 codebowl@gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.lists.nyphp.org/pipermail/front-end/attachments/20070306/804b1e8c/attachment.html From codebowl at gmail.com Wed Mar 7 12:30:27 2007 From: codebowl at gmail.com (Joseph Crawford) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] Retaining Values using AJAX In-Reply-To: <8d9a42800703061406x724d34b8l55fa61184023025d@mail.gmail.com> References: <8d9a42800703060839s6301c0ct1884032b13a23333@mail.gmail.com> <8d9a42800703060947o412aad93s37fb69401581b50d@mail.gmail.com> <8d9a42800703060954p784b7ae9sdc0af67628d98587@mail.gmail.com> <8d9a42800703061406x724d34b8l55fa61184023025d@mail.gmail.com> Message-ID: <8d9a42800703070930x2d3b74e7p1faeeac368d3d751@mail.gmail.com> Am I thinking wrong about JavaScript, can this not be completed the way I am thinking? I as going to use PHP Session variables to retain the state but I do not feel that would be the best method, we are trying to refrain from using the sessions. We are also trying to refrain from reading the form with every movement of the map. Pretty much it boils down to this. When the page loads industry is set to 'all' When you select an industy such as Education it is set to Education in the onChange function this is done by the function reading the form values and passing them off to server.php via a query string. This file then outputs a dynamic javascript file and var industry = 'Education'; Now when you move the map or click a marker the updateMarkers method is called and the value of industry is 'all' again. I am not sure why that is. I thought maybe the updateMarkers function was passing industry=&cosize= which would make the PHP reset the javascript variables to "all" but i threw in an alert before the query string and it still is set to 'all' Any help with this situation would be very appreciated. -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. http://www.codebowl.com/ Blog: http://www.josephcrawford.com/ 1-802-671-2021 codebowl@gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.lists.nyphp.org/pipermail/front-end/attachments/20070307/200d64b7/attachment.html From ashaw at polymerdb.org Wed Mar 7 12:46:24 2007 From: ashaw at polymerdb.org (Allen Shaw) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] Retaining Values using AJAX In-Reply-To: <8d9a42800703070930x2d3b74e7p1faeeac368d3d751@mail.gmail.com> References: <8d9a42800703060839s6301c0ct1884032b13a23333@mail.gmail.com> <8d9a42800703060947o412aad93s37fb69401581b50d@mail.gmail.com> <8d9a42800703060954p784b7ae9sdc0af67628d98587@mail.gmail.com> <8d9a42800703061406x724d34b8l55fa61184023025d@mail.gmail.com> <8d9a42800703070930x2d3b74e7p1faeeac368d3d751@mail.gmail.com> Message-ID: <45EEFA70.50406@polymerdb.org> Joseph Crawford wrote: > Any help with this situation would be very appreciated. Hey there, Joseph, I haven't seen this particular kind of problem before, so I can't guess about it, but in your situation I would just be adding a lot more debugging steps to the code -- print to your custom debug log, or alerts (yuck), or use "debugger;" statements and turn on debugging in firebug. Then watch the code at every little step until you figure it out. You're probably already doing something like this, but in your shoes I think I would probably just do more of it. Wish I could offer something more specific, though... - A. -- Allen Shaw Polymer (http://polymerdb.org) slidePresenter (http://slides.sourceforge.net) From codebowl at gmail.com Wed Mar 7 13:19:05 2007 From: codebowl at gmail.com (Joseph Crawford) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] Retaining Values using AJAX In-Reply-To: <45EEFA70.50406@polymerdb.org> References: <8d9a42800703060839s6301c0ct1884032b13a23333@mail.gmail.com> <8d9a42800703060947o412aad93s37fb69401581b50d@mail.gmail.com> <8d9a42800703060954p784b7ae9sdc0af67628d98587@mail.gmail.com> <8d9a42800703061406x724d34b8l55fa61184023025d@mail.gmail.com> <8d9a42800703070930x2d3b74e7p1faeeac368d3d751@mail.gmail.com> <45EEFA70.50406@polymerdb.org> Message-ID: <8d9a42800703071019o63f656eg8f135edf2c318e04@mail.gmail.com> I am thinking that the issue is that JavaScript variables are cleared when the page is done loading so when the user triggers a new event that variable no longer exists and is set to 'all' again. The way i am going to have to use is reading the form on every event which i think is overkill but.... -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. http://www.codebowl.com/ Blog: http://www.josephcrawford.com/ 1-802-671-2021 codebowl@gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.lists.nyphp.org/pipermail/front-end/attachments/20070307/51fdb463/attachment.html From suzerain at suzerain.com Mon Mar 12 15:22:38 2007 From: suzerain at suzerain.com (Marc Antony Vose) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] weird JS style setting problem... Message-ID: <6FC2E0A1-C285-44A8-A5F1-02AF59B56A01@suzerain.com> Hi there: I'm having bizarre trouble setting styles that I've never had before. I'm using the YUI stuff to do various things, like animation and so forth, and here's some very simple stuff I've started doing: In the code below, what's happening in Firefox is that it is changing the backgroundImage (i.e., I can see it change), but then it complains in the javascript console: "error analyzing the value for the property "background-image". declaration abandoned" (I'm translating the error from french, so it might be slightly different.) I don't get the error when setting the backgroundColor property, BTW... In Safari, there is no change of image, and nothing shows in the JavaScript console... I know I must be doing something very simple wrong... /* ACTIONS: VIEW CAMPAIGNS */ var rolloverViewCampaigns = function(e){ switch( e.type ){ case 'mouseover': SSSetElementStyle( 'obe_action_view_campaigns','cursor','pointer' ); SSSetElementStyle( 'obe_action_view_campaigns','backgroundImage','/ _gr/_obe_bar/btn_view_campaigns_over.png'); SSSetElementStyle ( 'obe_action_view_campaigns','backgroundColor','blue'); break; case 'mouseout': SSSetElementStyle ( 'obe_action_view_campaigns','backgroundImage','http:// www.servername.com/_gr/_obe_bar/btn_view_campaigns_off.png'); SSSetElementStyle ( 'obe_action_view_campaigns','backgroundColor','green'); break; default: break; } }; YAHOO.util.Event.addListener ("obe_action_view_campaigns","mouseover",rolloverViewCampaigns); YAHOO.util.Event.addListener ("obe_action_view_campaigns","mouseout",rolloverViewCampaigns); /* END ACTIONS: VIEW CAMPAIGNS */ /* GENERIC FUNCTION TO CHANGE A STYLE DECLARATION */ function SSSetElementStyle( id, prop, val ){ var the_el = null; if( the_el = document.getElementById(id) ){ //alert( the_el ); // handle different style types switch( prop ){ case 'cursor': the_el.style[prop] = val; break; case 'backgroundImage': the_el.style[prop] = 'url("' + val + '")'; default: the_el.style[prop] = val; } } } /* END GENERIC FUNCTION TO CHANGE A STYLE DECLARATION */ Thanks much, Marc From suzerain at suzerain.com Mon Mar 12 15:25:53 2007 From: suzerain at suzerain.com (Marc Antony Vose) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] weird JS style setting problem...[FIXED] Message-ID: Hi again: So, sometimes what I have to do is embarrass myself in a public forum, and then I get the answer. I forgot a simple 'break;' line in my switch statement... You should try this technique of finding your problems...apparently it works. Cheers, Marc From dorgan at optonline.net Mon Mar 12 15:29:12 2007 From: dorgan at optonline.net (Donald J Organ IV) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] weird JS style setting problem...[FIXED] In-Reply-To: References: Message-ID: <45F5AA08.4030407@optonline.net> I believe most of us, have tried that technique at one point or another :) Marc Antony Vose wrote: > Hi again: > > So, sometimes what I have to do is embarrass myself in a public forum, > and then I get the answer. I forgot a simple 'break;' line in my > switch statement... > > You should try this technique of finding your problems...apparently it > works. > > Cheers, > > Marc > _______________________________________________ > New York PHP SIG: Front End Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/front-end > http://www.nyphp.org > From ashaw at polymerdb.org Wed Mar 14 19:14:33 2007 From: ashaw at polymerdb.org (Allen Shaw) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] CSS: problem containing floated elements Message-ID: <45F881D9.7010102@polymerdb.org> Can't seem to google long enough to find what I'm doing wrong here. The following code is intended to create a div with a thin green border containing two buttons, floated right.
What it actually results in is a green-bordered box 0px high and the width of the viewport, followed by two buttons floated right. I'm wracking my brain to find a way to float these two buttons and still have the containg div render as if it's containing them. Obviously I'm going about it the wrong way; testing on FF/Linux, FF/Win, and IE7 show the same thing, so I can't easily blame it on the browser. Any clues, anybody? Thanks, Allen -- Allen Shaw Polymer (http://polymerdb.org) slidePresenter (http://slides.sourceforge.net) From list at adamesdesigns.com Wed Mar 14 19:23:36 2007 From: list at adamesdesigns.com (Karina) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] CSS: problem containing floated elements In-Reply-To: <45F881D9.7010102@polymerdb.org> References: <45F881D9.7010102@polymerdb.org> Message-ID: <4866F042-1CFD-4931-BF82-217C11C36DBB@adamesdesigns.com> Add a height to the div. The problem you are running into is that when you float the buttons they are no longer on the same level as the div. so you have to tell the div what height it needs to be since it can no longer reference the buttons. You can also add padding and other things to make it look the way you want it to.
Karina On Mar 14, 2007, at 7:14 PM, Allen Shaw wrote: > Can't seem to google long enough to find what I'm doing wrong > here. The following code is intended to create a div with a thin > green border containing two buttons, floated right. > >
> > >
> > What it actually results in is a green-bordered box 0px high and > the width of the viewport, followed by two buttons floated right. > > I'm wracking my brain to find a way to float these two buttons and > still have the containg div render as if it's containing them. > Obviously I'm going about it the wrong way; testing on FF/Linux, FF/ > Win, and IE7 show the same thing, so I can't easily blame it on the > browser. > > Any clues, anybody? > > Thanks, > Allen > > -- > Allen Shaw > Polymer (http://polymerdb.org) > slidePresenter (http://slides.sourceforge.net) > _______________________________________________ > New York PHP SIG: Front End Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/front-end > http://www.nyphp.org > > From enolists at gmail.com Wed Mar 14 19:35:04 2007 From: enolists at gmail.com (Mark Armendariz) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] CSS: problem containing floated elements In-Reply-To: <4866F042-1CFD-4931-BF82-217C11C36DBB@adamesdesigns.com> References: <45F881D9.7010102@polymerdb.org> <4866F042-1CFD-4931-BF82-217C11C36DBB@adamesdesigns.com> Message-ID: <00bf01c76691$64ffb840$6400a8c0@enobrev> Mixing floated and non-floated elements can get sticky. Try floating the div:
Should make the box 'surround' the buttons dynamically (setting the height will fake it, but if you add more buttons or content to the box you'll have to change the height more). From jekillen at prodigy.net Thu Mar 15 00:34:38 2007 From: jekillen at prodigy.net (jekillen) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] CSS: problem containing floated elements In-Reply-To: <45F881D9.7010102@polymerdb.org> References: <45F881D9.7010102@polymerdb.org> Message-ID: On Mar 14, 2007, at 3:14 PM, Allen Shaw wrote: > Can't seem to google long enough to find what I'm doing wrong here. > The following code is intended to create a div with a thin green > border containing two buttons, floated right. > >
> > >
> > What it actually results in is a green-bordered box 0px high and the > width of the viewport, followed by two buttons floated right. > > I'm wracking my brain to find a way to float these two buttons and > still have the containg div render as if it's containing them. > Obviously I'm going about it the wrong way; testing on FF/Linux, > FF/Win, and IE7 show the same thing, so I can't easily blame it on the > browser. > > Any clues, anybody? > > Thanks, > Allen > two things; 1: you may have to give width and height attributes to the div tag and 2: 1px solid green should be something like border: 1px; color: solid green Also check browser css compatibility. Hope that helps. Jeff K from L.A. (I don't know why I started receiving main from this list, but I am on the LAMP-SIG list in L.A.) From dorgan at optonline.net Wed Mar 14 23:39:02 2007 From: dorgan at optonline.net (Donald J. Organ IV) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] CSS: problem containing floated elements In-Reply-To: References: <45F881D9.7010102@polymerdb.org> Message-ID: <45F8BFD6.7080906@optonline.net> border: 1px solid green; is valid CSS so i would assume you just need to set a width and height, and you should be good. jekillen wrote: > > On Mar 14, 2007, at 3:14 PM, Allen Shaw wrote: > >> Can't seem to google long enough to find what I'm doing wrong here. >> The following code is intended to create a div with a thin green >> border containing two buttons, floated right. >> >>
>> >> >>
>> >> What it actually results in is a green-bordered box 0px high and the >> width of the viewport, followed by two buttons floated right. >> >> I'm wracking my brain to find a way to float these two buttons and >> still have the containg div render as if it's containing them. >> Obviously I'm going about it the wrong way; testing on FF/Linux, >> FF/Win, and IE7 show the same thing, so I can't easily blame it on >> the browser. >> >> Any clues, anybody? >> >> Thanks, >> Allen >> > two things; > 1: you may have to give width and height attributes to the div tag and > 2: 1px solid green should be something like border: 1px; color: solid > green > Also check browser css compatibility. > Hope that helps. > Jeff K > from L.A. (I don't know why I started receiving main from this list, but > I am on the LAMP-SIG list in L.A.) > > _______________________________________________ > New York PHP SIG: Front End Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/front-end > http://www.nyphp.org > From kenrbnsn at rbnsn.com Wed Mar 14 23:48:52 2007 From: kenrbnsn at rbnsn.com (Ken Robinson) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] CSS: problem containing floated elements In-Reply-To: <45F881D9.7010102@polymerdb.org> References: <45F881D9.7010102@polymerdb.org> Message-ID: At 07:14 PM 3/14/2007, Allen Shaw wrote: >Can't seem to google long enough to find what I'm doing wrong >here. The following code is intended to create a div with a thin >green border containing two buttons, floated right. > >
> > >
> >What it actually results in is a green-bordered box 0px high and the >width of the viewport, followed by two buttons floated right. What I usually do is put a clearing div before the end of the "div" in question:
 
Since I use this so often, I name it in the then you can just do:
 
Ken From ashaw at polymerdb.org Thu Mar 15 10:15:07 2007 From: ashaw at polymerdb.org (Allen Shaw) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] CSS: problem containing floated elements In-Reply-To: <00bf01c76691$64ffb840$6400a8c0@enobrev> References: <45F881D9.7010102@polymerdb.org> <4866F042-1CFD-4931-BF82-217C11C36DBB@adamesdesigns.com> <00bf01c76691$64ffb840$6400a8c0@enobrev> Message-ID: <45F954EB.6020904@polymerdb.org> Mark Armendariz wrote: > Try floating the div: > >
> > >
> > Should make the box 'surround' the buttons dynamically (setting the height > will fake it, but if you add more buttons or content to the box you'll have > to change the height more). This is a winner, Mark. Never would have thought of it, though it makes sense now. I had thought about setting height to the div, but couldn't think of it as a "real" solution because of just the issues you mentioned. Thanks! - A. -- Allen Shaw Polymer (http://polymerdb.org) slidePresenter (http://slides.sourceforge.net) From rmarscher at beaffinitive.com Thu Mar 15 11:29:48 2007 From: rmarscher at beaffinitive.com (Rob Marscher) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] CSS: problem containing floated elements In-Reply-To: <45F954EB.6020904@polymerdb.org> References: <45F881D9.7010102@polymerdb.org> <4866F042-1CFD-4931-BF82-217C11C36DBB@adamesdesigns.com> <00bf01c76691$64ffb840$6400a8c0@enobrev> <45F954EB.6020904@polymerdb.org> Message-ID: <84AA483C-504E-42DC-BD62-A91C2D4696E8@beaffinitive.com> My favorite way to do this is the "clearfix" method: http://www.positioniseverything.net/easyclearing.html .clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
The only caveat to this method is that you need to add some css specific to IE6 and lower and IE-Mac (also, I really don't think we all need to support IE-Mac anymore). The way they describe adding IE6 specific css it is outdated. To add css specific to IE6 and below... use conditional comments in your head: If you really care about IE-Mac... I think the best way is still Tantek's hack: http://tantek.com/log/2004/07.html#ie5macbandpass /*\*//*/ .clearfix {display: inline-block;} /* */ ------------------ Rob Marscher Software Engineer rmarscher@beaffinitive.com 212.684.9100x17 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.lists.nyphp.org/pipermail/front-end/attachments/20070315/79650df3/attachment.html From suzerain at suzerain.com Fri Mar 16 14:57:04 2007 From: suzerain at suzerain.com (Marc Antony Vose) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] dynamically add xhtml snippet to DOM In-Reply-To: <84AA483C-504E-42DC-BD62-A91C2D4696E8@beaffinitive.com> References: <45F881D9.7010102@polymerdb.org> <4866F042-1CFD-4931-BF82-217C11C36DBB@adamesdesigns.com> <00bf01c76691$64ffb840$6400a8c0@enobrev> <45F954EB.6020904@polymerdb.org> <84AA483C-504E-42DC-BD62-A91C2D4696E8@beaffinitive.com> Message-ID: <90CD0A89-D3A3-4A55-8332-495767D50131@suzerain.com> Hi there: I'm trying to load some data through AJAX, which is working fine. I have valid xhtml snippets coming in from outside, and I'm rendering them with innerHTML. The problem I'm having is that I need the loaded data to have dynamic DOM-related actions, and my understand (and indeed testing) seems to show that stuff added via innerHTML is not actually part of the page's DOM, and thus can't be played with in that fashion. So, does anyone have or know of a premade class that will loop recursively through some XHTML block and add everything to another document or element using the DOM, so that I will actually have the loaded content as part of the parent page's DOM? Thanks much, Marc Vose http://www.suzerain.com From lists at enobrev.com Fri Mar 16 15:37:38 2007 From: lists at enobrev.com (Mark Armendariz) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] dynamically add xhtml snippet to DOM In-Reply-To: <90CD0A89-D3A3-4A55-8332-495767D50131@suzerain.com> References: <45F881D9.7010102@polymerdb.org> <4866F042-1CFD-4931-BF82-217C11C36DBB@adamesdesigns.com><00bf01c76691$64ffb840$6400a8c0@enobrev><45F954EB.6020904@polymerdb.org><84AA483C-504E-42DC-BD62-A91C2D4696E8@beaffinitive.com> <90CD0A89-D3A3-4A55-8332-495767D50131@suzerain.com> Message-ID: <007c01c76802$8e4d1c70$6400a8c0@enobrev> > [mailto:front-end-bounces@lists.nyphp.org] On Behalf Of Marc > Antony Vose > The problem I'm having is that I need the loaded data to have > dynamic DOM-related actions, and my understand (and indeed > testing) seems to show that stuff added via innerHTML is not > actually part of the page's DOM, and thus can't be played > with in that fashion. > In my experience, innerHTML needs a moment to 'parse in' the browser and then can be accessed through normal js methods (not exactly sure about specific DOM methods). I haven't read this anywhere or researched it.. Just figured it out through trial and error and has been working for me on multiple projects. For larger blocks, I usually give it a few milliseconds (using a timeout loop checking until getElementById('addedElement') !== undefined). If anyone knows better, let me know if I deserve to die a slow painful death for working in such a way. Mark Armendariz From codebowl at gmail.com Fri Mar 16 16:36:55 2007 From: codebowl at gmail.com (Joseph Crawford) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] JavaScript Assistance Message-ID: <8d9a42800703161336v497fba3tfc0bc86dbd103bbd@mail.gmail.com> Guys i have a function that populates some drop down boxes with data, when the value of the drop down is changed an onchange event is fired and the drop downs are populated again (retaining the selected value) I am doing this because the lists contain counts and they need to be updated. If you look at this page http://www.ereexpoblog.com/attendees/ you will see an industry and company size drop down box. When you select say 25 - 49 from the company size drop down box the industries drop down should repopulate with the updated counts. now when you change the drop down value the data does infact change which you can see at this url http://www.ereexpoblog.com/map-server.php?ne=57.136239,-53.261719&sw=4.915833,-134.824219¤tZoom=3&auth=0&industry=all&cosize=1 you can see the counts are updating. I have the populateDropDowns() function called after the data is updated via AJAX but the drop down does not seem to "really" update. you can see the source code here http://www.ereexpoblog.com/wp-content/themes/expoblog/scripts/ere_functions.js The industry, cosize etc. is dynamically generated by the map-server.phpfile. If you go to the map and change a drop down you will see that the drop down is not updating. However if you go to the map-server.php url in the log window you will see the values are changed there. in the JS file you are interested in the onChange function and the populateDropDowns() function. Everything else seems to work just fine. If you have any suggestions on how i can better do something please let me know as I am a beginner with JavaScript. Thanks, -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. http://www.codebowl.com/ Blog: http://www.josephcrawford.com/ 1-802-671-2021 codebowl@gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.lists.nyphp.org/pipermail/front-end/attachments/20070316/8537c6b6/attachment.html From lists at enobrev.com Fri Mar 16 17:14:23 2007 From: lists at enobrev.com (Mark Armendariz) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] JavaScript Assistance In-Reply-To: <8d9a42800703161336v497fba3tfc0bc86dbd103bbd@mail.gmail.com> References: <8d9a42800703161336v497fba3tfc0bc86dbd103bbd@mail.gmail.com> Message-ID: <58f08dcf0703161414pd28f957w9e13d8614c69e471@mail.gmail.com> On 3/16/07, Joseph Crawford wrote: > I have the populateDropDowns() function called after the data is updated via > AJAX but the drop down does not seem to "really" update. you can see the > source code here > http://www.ereexpoblog.com/wp-content/themes/expoblog/scripts/ere_functions.js > > If you go to the map and change a drop down you will see that the drop down > is not updating. However if you go to the map-server.php url in the log > window you will see the values are changed there. > > in the JS file you are interested in the onChange function and the > populateDropDowns() function. > I'm just taking a guess as it seems it would be a good deal of effort to run this locally, but it looks like it might be a scope issue. your function is using the global variable 'industries'. if you use firebug, set a breakpoint in the beginning of populateDropDowns and 'watch' industries, you'll see that it still has the old original variable values instead of the new shiny eval'd values from the backend. i'm thinking that your 'eval(jscript)' in onChange is setting the industries var to be local to the request.onreadystatechange function instead of properly replacing the global variable. The easiest way to test this out would be to pass the variable to populateDropDowns try something like this: function populateDropDowns(newIndustryValues) { if (newIndustryValues !== undefined) { industries = newIndustryValues; } // the rest of your script } then later in onChange call: populateDropDowns(industries); this should do well not to interfere with the rest of your script. I'm not 100% on this but that's where I would start. Otherwise, you're going to have to try to figure out why your ajax response isn't replacing your global variable. Try getting rid of the 'var' before industries in the response. That should hopefully replace the already existent variable properly instead of creating a new local variable. one minor extra tip, instead of clearList(), you can do this: selected.options.length = 0; here's a great tutorial for working with selects in js: http://www.quirksmode.org/js/options.html Mark Armendariz From codebowl at gmail.com Fri Mar 16 17:39:57 2007 From: codebowl at gmail.com (Joseph Crawford) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] JavaScript Assistance In-Reply-To: <58f08dcf0703161414pd28f957w9e13d8614c69e471@mail.gmail.com> References: <8d9a42800703161336v497fba3tfc0bc86dbd103bbd@mail.gmail.com> <58f08dcf0703161414pd28f957w9e13d8614c69e471@mail.gmail.com> Message-ID: <8d9a42800703161439u10153ef7g98cdd0d6676fcd0c@mail.gmail.com> Mark, Thanks for your wise advice. removing var from the global variable in map-server.php did the trick. It seems that with the var and the eval it was creating a local variable for the onchange function. I did not know it would work like that. I guess that is an obvious gotcha for an advanced javascript developer. I appreciate your help Thanks, -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. http://www.codebowl.com/ Blog: http://www.josephcrawford.com/ 1-802-671-2021 codebowl@gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.lists.nyphp.org/pipermail/front-end/attachments/20070316/cce153fd/attachment.html From lists at enobrev.com Fri Mar 16 17:49:00 2007 From: lists at enobrev.com (Mark Armendariz) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] JavaScript Assistance In-Reply-To: <8d9a42800703161439u10153ef7g98cdd0d6676fcd0c@mail.gmail.com> References: <8d9a42800703161336v497fba3tfc0bc86dbd103bbd@mail.gmail.com> <58f08dcf0703161414pd28f957w9e13d8614c69e471@mail.gmail.com> <8d9a42800703161439u10153ef7g98cdd0d6676fcd0c@mail.gmail.com> Message-ID: <58f08dcf0703161449s6eec03b8t3cbeadb1b0e6461c@mail.gmail.com> On 3/16/07, Joseph Crawford wrote: > removing var from the global variable in map-server.php did the trick. It > seems that with the var and the eval it was creating a local variable for > the onchange function. > > I did not know it would work like that. I guess that is an obvious gotcha > for an advanced javascript developer. I dunno about obvious, but variable scope in javascript does tend to keep my bathroom cabinet and bar stocked with headache medicine. Usually a good place to look first, especially when working with events and functions inside functions. Glad it worked out! Mark p.s. What the hell is up with this snow?!?! From suzerain at suzerain.com Fri Mar 16 18:33:14 2007 From: suzerain at suzerain.com (Marc Antony Vose) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] dynamically add xhtml snippet to DOM In-Reply-To: <007c01c76802$8e4d1c70$6400a8c0@enobrev> References: <45F881D9.7010102@polymerdb.org> <4866F042-1CFD-4931-BF82-217C11C36DBB@adamesdesigns.com><00bf01c76691$64ffb840$6400a8c0@enobrev><45F954EB.6020904@polymerdb.org><84AA483C-504E-42DC-BD62-A91C2D4696E8@beaffinitive.com> <90CD0A89-D3A3-4A55-8332-495767D50131@suzerain.com> <007c01c76802$8e4d1c70$6400a8c0@enobrev> Message-ID: <4F8FBC02-03A6-44AF-933F-B2F33769B6BC@suzerain.com> Hey Mark: Thanks much for this note. Yeah, my code was trying to do something too fast. The stuff in innerHTML indeed goes into the DOM, although I also wrote my own recursion function, which had other issues, like IE 6 not displaying background-image styles in some of the passed divs. So, after taking a little detour, now I'm back with innerHTML and at least able to make some more progress. Cheers, Marc Le 17 mars 07 ? 03:37, Mark Armendariz a ?crit : >> [mailto:front-end-bounces@lists.nyphp.org] On Behalf Of Marc >> Antony Vose >> The problem I'm having is that I need the loaded data to have >> dynamic DOM-related actions, and my understand (and indeed >> testing) seems to show that stuff added via innerHTML is not >> actually part of the page's DOM, and thus can't be played >> with in that fashion. >> > > In my experience, innerHTML needs a moment to 'parse in' the > browser and > then can be accessed through normal js methods (not exactly sure about > specific DOM methods). I haven't read this anywhere or researched > it.. Just > figured it out through trial and error and has been working for me on > multiple projects. For larger blocks, I usually give it a few > milliseconds > (using a timeout loop checking until getElementById > ('addedElement') !== > undefined). > > If anyone knows better, let me know if I deserve to die a slow > painful death > for working in such a way. > > Mark Armendariz > > _______________________________________________ > New York PHP SIG: Front End Mailing List > AMP Technology > Supporting Apache, MySQL and PHP > http://lists.nyphp.org/mailman/listinfo/front-end > http://www.nyphp.org From codebowl at gmail.com Fri Mar 16 18:50:36 2007 From: codebowl at gmail.com (Joseph Crawford) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] JavaScript Assistance In-Reply-To: <58f08dcf0703161449s6eec03b8t3cbeadb1b0e6461c@mail.gmail.com> References: <8d9a42800703161336v497fba3tfc0bc86dbd103bbd@mail.gmail.com> <58f08dcf0703161414pd28f957w9e13d8614c69e471@mail.gmail.com> <8d9a42800703161439u10153ef7g98cdd0d6676fcd0c@mail.gmail.com> <58f08dcf0703161449s6eec03b8t3cbeadb1b0e6461c@mail.gmail.com> Message-ID: <8d9a42800703161550k74fef95fi76ffb7e4850ea65f@mail.gmail.com> Mark, I do appreciate the help however if i could get your assistance once more i am not sure how to read into IE errors i am getting a type mismatch which is obvious at what that means but not sure where can you look at the page in IE? -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. http://www.codebowl.com/ Blog: http://www.josephcrawford.com/ 1-802-671-2021 codebowl@gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.lists.nyphp.org/pipermail/front-end/attachments/20070316/f828efd4/attachment.html From lists at enobrev.com Fri Mar 16 19:21:13 2007 From: lists at enobrev.com (Mark Armendariz) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] JavaScript Assistance In-Reply-To: <8d9a42800703161550k74fef95fi76ffb7e4850ea65f@mail.gmail.com> References: <8d9a42800703161336v497fba3tfc0bc86dbd103bbd@mail.gmail.com><58f08dcf0703161414pd28f957w9e13d8614c69e471@mail.gmail.com><8d9a42800703161439u10153ef7g98cdd0d6676fcd0c@mail.gmail.com><58f08dcf0703161449s6eec03b8t3cbeadb1b0e6461c@mail.gmail.com> <8d9a42800703161550k74fef95fi76ffb7e4850ea65f@mail.gmail.com> Message-ID: <00a001c76821$ca8260a0$6400a8c0@enobrev> >> I do appreciate the help however if i could get your assistance once more i am not sure how to read into IE errors i am getting a type mismatch which is obvious at what that means but not sure where can you look at the page in IE? << In populateIndustries, your iselect.add line. The second parameter in the add is supposed to be an index. I'm guessing the null might be making ie angry. Try something like iselect.add(o, iselect.length); The same will probablhy go a couple lines down in the for loop. I recommend again the quirksmode link I sent earlier: http://www.quirksmode.org/js/options.html Hope that helps. Drinky time. If you need more help, I'll be working through the weekend. Mark From codebowl at gmail.com Fri Mar 16 19:41:20 2007 From: codebowl at gmail.com (Joseph Crawford) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] JavaScript Assistance In-Reply-To: <00a001c76821$ca8260a0$6400a8c0@enobrev> References: <8d9a42800703161336v497fba3tfc0bc86dbd103bbd@mail.gmail.com> <58f08dcf0703161414pd28f957w9e13d8614c69e471@mail.gmail.com> <8d9a42800703161439u10153ef7g98cdd0d6676fcd0c@mail.gmail.com> <58f08dcf0703161449s6eec03b8t3cbeadb1b0e6461c@mail.gmail.com> <8d9a42800703161550k74fef95fi76ffb7e4850ea65f@mail.gmail.com> <00a001c76821$ca8260a0$6400a8c0@enobrev> Message-ID: <8d9a42800703161641u5e0a02abi4be812cfd1d690e@mail.gmail.com> Mark, I changed that but it did not fix the issue i will read that article you posted. if you have any more ideas any help you can provide in your spare time would be great. have fun drinking :) Thanks, -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. http://www.codebowl.com/ Blog: http://www.josephcrawford.com/ 1-802-671-2021 codebowl@gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.lists.nyphp.org/pipermail/front-end/attachments/20070316/dd0a76cf/attachment.html From codebowl at gmail.com Fri Mar 16 19:55:33 2007 From: codebowl at gmail.com (Joseph Crawford) Date: Tue Mar 4 07:24:11 2008 Subject: [front-end] JavaScript Assistance In-Reply-To: <8d9a42800703161641u5e0a02abi4be812cfd1d690e@mail.gmail.com> References: <8d9a42800703161336v497fba3tfc0bc86dbd103bbd@mail.gmail.com> <58f08dcf0703161414pd28f957w9e13d8614c69e471@mail.gmail.com> <8d9a42800703161439u10153ef7g98cdd0d6676fcd0c@mail.gmail.com> <58f08dcf0703161449s6eec03b8t3cbeadb1b0e6461c@mail.gmail.com> <8d9a42800703161550k74fef95fi76ffb7e4850ea65f@mail.gmail.com> <00a001c76821$ca8260a0$6400a8c0@enobrev> <8d9a42800703161641u5e0a02abi4be812cfd1d690e@mail.gmail.com> Message-ID: <8d9a42800703161655l1e23bee3jb753e5d66a1e3d3c@mail.gmail.com> Mark, I lied using iselect.length etc did not work as it threw an exception for some reason in FireFox -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. http://www.codebowl.com/ Blog: http://www.josephcrawford.com/ 1-802-671-2021 codebowl@gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.lists.nyphp.org/pipermail/front-end/attachments/20070316/421e90ff/attachment.html From codebowl at gmail.com Fri Mar 16 21:03:00 2007 From: codebowl at gmail.com (Joseph Crawford) Date: Tue Mar 4 07:24:12 2008 Subject: [front-end] JavaScript Assistance In-Reply-To: <8d9a42800703161655l1e23bee3jb753e5d66a1e3d3c@mail.gmail.com> References: <8d9a42800703161336v497fba3tfc0bc86dbd103bbd@mail.gmail.com> <58f08dcf0703161414pd28f957w9e13d8614c69e471@mail.gmail.com> <8d9a42800703161439u10153ef7g98cdd0d6676fcd0c@mail.gmail.com> <58f08dcf0703161449s6eec03b8t3cbeadb1b0e6461c@mail.gmail.com> <8d9a42800703161550k74fef95fi76ffb7e4850ea65f@mail.gmail.com> <00a001c76821$ca8260a0$6400a8c0@enobrev> <8d9a42800703161641u5e0a02abi4be812cfd1d690e@mail.gmail.com> <8d9a42800703161655l1e23bee3jb753e5d66a1e3d3c@mail.gmail.com> Message-ID: <8d9a42800703161803k463dbf40v63556161f93cc54f@mail.gmail.com> Mark, I tried following the methods that web page showed but i could not get it to work. What it boils down to is this function here that I had to create as a work around for IE // this function was placed in because IE does not follow standards go figure. function addOptionHack(select, option) { try { // stendards compliant select.add(option, null); } catch(ex) { // work around for IE select.add(option); } } Thanks, -- Joseph Crawford Jr. Zend Certified Engineer Codebowl Solutions, Inc. http://www.codebowl.com/ Blog: http://www.josephcrawford.com/ 1-802-671-2021 codebowl@gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.lists.nyphp.org/pipermail/front-end/attachments/20070316/957a4de2/attachment.html From hananm at gmail.com Thu Mar 29 15:56:54 2007 From: hananm at gmail.com (Hanan) Date: Tue Mar 4 07:24:12 2008 Subject: [front-end] HTML CSS developer needed ASAP Message-ID: <8943575c0703291256t446c0d17h8f5545b7e182be24@mail.gmail.com> Hello everyone, We are looking for a frontend web developer who can create cross browser compatible pages (IE6, IE 7, and FireFox 2.0.x). This is a temporary 2-3 weeks gig. The candidate MUST be able to hand code tableless W3C compliant HTML/CSS(no WSIWYG) pages and experienced in cutting web images in Photoshop on a PC. You will be given layered Phostoshop files and will have to code in HTML/CSS. Familirity with ASP .NET would be nice as you'll be working with server side templates (But no server side coding is expeceted from you). MUST, must be able to work onsite in Manhattan (Chelsea). Pays $40/hr. Thanks for your time, Hanan Mahmood HananM@gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.lists.nyphp.org/pipermail/front-end/attachments/20070329/cdf26f92/attachment.html