Re: Solve the Problem, get the code!

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 37666
interpreted = N
texte = Jeff -You are already doing the right thing to insert leading cells prior to the first day of the month. Combine this with your code that determines whether to break to a new table row, add a little math, and your problem is solved...All you need to do is determine what day of the week the last day of the month falls on (0-6), subtract that number from 6, and if greater than zero then loop that many times inserting a   -- following your date loop and prior to your closing .Also, note that your code as it is written will insert an extra blank row in the table when the month ends on a Saturday (do a View Source on June 2001 and you'll see it). It doesn't cause any particular problems (in most browsers at least), but the resulting HTML is not as clean as it could be. The solution is to only to the [showif 6=[lookup... code if the current day is not equal to the last day of the month.- brianAt 10:07 AM 8/7/2001, Jeff Logan wrote: >Here is the whole code. > > > > >[search >db=days.db&neSKIPdata=find_all&asSKIPsort=1][founditems][/founditems][/search] >[loop start=1&end=[lookup >db=days.db&lookinfield=number&value=[math]({[the_month]/1/[the_year]}) >%7[/math]&returnfield=skip]][/loop] >[loop start=1&end=[math]{[math >date]{[the_month]/1/[the_year]}+{1/0/0000}[/math]}-{[the_month]/1/[the >_year]}[/math]] >[showif 6=[lookup >db=days.db&lookinfield=number&value=[math]({[the_month]/[index]/[the_y >ear]})%7[/math]&returnfield=skip¬found=Day]][/showif] >[/loop] > >
color=#990000>[lookup >db=months.db&lookinfield=number&value=[format >f][the_month][/format]&returnfield=name¬found=Month] >[the_year]
align=center width=84 >bgcolor=#eeeeee>[day]
  > > >href=index.html?action=day&day=[url][the_month]/[index]/[the_year][/u >rl]>[index]
>[search >db=log.db&MEETDATEtype=date&eqMEETDATEdatarq=[the_month]/[index]/[the_ >year]&asMEETTIMEsort=1&MEETTIMEtype=time][founditems] >[format seconds_to_time %I:%M >%p][math]{[MEETTIME]}[/math][/format]
href=index.html?action=Edit&sku=[sku]>[whomeet]
>[/founditems][/search] > >  > >
> > >Jeff > > >>Can you post the code from [loop] to [/loop], so I can take a look? >> >>Jeff Logan wrote: >> >>>Here is the code from the calender. All of the cells are dynamic and >>>change with the month. >>> >>>[showif 6=[lookup >>>db=days.db&lookinfield=number&value=[math]({[the_month]/[index]/[the_y >>>ear]})%7[/math]&returnfield=skip¬found=Day]][/showif] >>>[/loop] >>> >>>So inserting a space does not make the extra cell's show up. The >>>just don't show up because know code is written for them. >> >>------------------------------------------------------------- >>This message is sent to you because you are subscribed to >> the mailing list . >>To unsubscribe, E-mail to: >>To switch to the DIGEST mode, E-mail to >> >>Web Archive of this list is at: http://search.smithmicro.com/ > > >------------------------------------------------------------- >This message is sent to you because you are subscribed to > the mailing list . >To unsubscribe, E-mail to: >To switch to the DIGEST mode, E-mail to > >Web Archive of this list is at: http://search.smithmicro.com/ ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Solve the Problem, get the code! (Jeff Logan 2001)
  2. Re: Solve the Problem, get the code! (Marc Kaiwi 2001)
  3. Re: Solve the Problem, get the code! (Marc Kaiwi 2001)
  4. Re: Solve the Problem, get the code! (Alex McCombie 2001)
  5. Re: Solve the Problem, get the code! (Jeff Logan 2001)
  6. Re: Solve the Problem, get the code! (Alex McCombie 2001)
  7. Re: Solve the Problem, get the code! (Stuart Tremain 2001)
  8. Re: Solve the Problem, get the code! (Jeff Logan 2001)
  9. Re: Solve the Problem, get the code! (Daniel Smith 2001)
  10. Re: Solve the Problem, get the code! (Jeff Logan 2001)
  11. Re: Solve the Problem, get the code! (Dale Therio 2001)
  12. Re: Solve the Problem, get the code! (Marc Kaiwi 2001)
  13. Re: Solve the Problem, get the code! (Jeff Logan 2001)
  14. Re: Solve the Problem, get the code! (Anne Varner 2001)
  15. Re: Solve the Problem, get the code! (Brian Fries 2001)
  16. Re: Solve the Problem, get the code! (Celeste Paul 2001)
  17. Re: Solve the Problem, get the code! (Tom Duke 2001)
  18. Re: Solve the Problem, get the code! (Jeff Logan 2001)
  19. Re: Solve the Problem, get the code! (Jeff Logan 2001)
  20. Re: Solve the Problem, get the code! (Marc Kaiwi 2001)
  21. Re: Solve the Problem, get the code! (adam@inos.com (O'Connor, Adam) 2001)
  22. Re: Solve the Problem, get the code! (adam@inos.com (O'Connor, Adam) 2001)
  23. Re: Solve the Problem, get the code! (Marc Kaiwi 2001)
  24. Solve the Problem, get the code! (Jeff Logan 2001)
Jeff -You are already doing the right thing to insert leading cells prior to the first day of the month. Combine this with your code that determines whether to break to a new table row, add a little math, and your problem is solved...All you need to do is determine what day of the week the last day of the month falls on (0-6), subtract that number from 6, and if greater than zero then loop that many times inserting a   -- following your date loop and prior to your closing .Also, note that your code as it is written will insert an extra blank row in the table when the month ends on a Saturday (do a View Source on June 2001 and you'll see it). It doesn't cause any particular problems (in most browsers at least), but the resulting HTML is not as clean as it could be. The solution is to only to the [showif 6=[lookup... code if the current day is not equal to the last day of the month.- brianAt 10:07 AM 8/7/2001, Jeff Logan wrote: >Here is the whole code. > > > > >[search >db=days.db&neSKIPdata=find_all&asSKIPsort=1][founditems][/founditems][/search] >[loop start=1&end=[lookup >db=days.db&lookinfield=number&value=[math]({[the_month]/1/[the_year]}) >%7[/math]&returnfield=skip]][/loop] >[loop start=1&end=[math]{[math >date]{[the_month]/1/[the_year]}+{1/0/0000}[/math]}-{[the_month]/1/[the >_year]}[/math]] >[showif 6=[lookup >db=days.db&lookinfield=number&value=[math]({[the_month]/[index]/[the_y >ear]})%7[/math]&returnfield=skip¬found=Day]][/showif] >[/loop] > >
color=#990000>[lookup >db=months.db&lookinfield=number&value=[format >f][the_month][/format]&returnfield=name¬found=Month] >[the_year]
align=center width=84 >bgcolor=#eeeeee>[day]
  > > >href=index.html?action=day&day=[url][the_month]/[index]/[the_year][/u >rl]>[index]
>[search >db=log.db&MEETDATEtype=date&eqMEETDATEdatarq=[the_month]/[index]/[the_ >year]&asMEETTIMEsort=1&MEETTIMEtype=time][founditems] >[format seconds_to_time %I:%M >%p][math]{[MEETTIME]}[/math][/format]
href=index.html?action=Edit&sku=[sku]>[whomeet]
>[/founditems][/search] > >  > >
> > >Jeff > > >>Can you post the code from [loop] to [/loop], so I can take a look? >> >>Jeff Logan wrote: >> >>>Here is the code from the calender. All of the cells are dynamic and >>>change with the month. >>> >>>[showif 6=[lookup >>>db=days.db&lookinfield=number&value=[math]({[the_month]/[index]/[the_y >>>ear]})%7[/math]&returnfield=skip¬found=Day]][/showif] >>>[/loop] >>> >>>So inserting a space does not make the extra cell's show up. The >>>just don't show up because know code is written for them. >> >>------------------------------------------------------------- >>This message is sent to you because you are subscribed to >> the mailing list . >>To unsubscribe, E-mail to: >>To switch to the DIGEST mode, E-mail to >> >>Web Archive of this list is at: http://search.smithmicro.com/ > > >------------------------------------------------------------- >This message is sent to you because you are subscribed to > the mailing list . >To unsubscribe, E-mail to: >To switch to the DIGEST mode, E-mail to > >Web Archive of this list is at: http://search.smithmicro.com/ ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Brian Fries

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Authenticate (1997) Software Update OSX (2003) using showpage and showcart commands (1996) RE: Sum of Quantities (1997) Field name-subcategory (1997) Smith Micro - no competition (2000) PSC recommends what date format yr 2000??? (1997) CommandSecurity? (1997) SSL and reg web*L and reg web* (1997) shipcost (1997) [delete] problem (1997) Norton Antivirus (1999) Decimal point in search.... (2004) WC Host Needed (2000) Signal Raised Error (Part III) (1997) problems with 2 tags (1997) Setting variables. (1998) [WebDNA] WebDNA code validator (2011) Help name our technology! I found it (1997) RequiredFields template (1997)