• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Forms within table cells that hold data

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure what the best way to phrase the question I have is. I'm trying to create a weekly planner with 7 columns for each day and 24 rows in each column for each hour of the day. I want to be able to insert events into a table cell for each hour. If possible, I also want to be able to change the color of the cell while creating the event. I'd love to be able to do so that I could fill only half the column for a half-hour event, but that's probably not realistic. My functioning code is below. It's basically just the table with the ability to change themes through switching css stylesheets.

blue.css


orange.css


pink.css


index.html


script.js


I've had partial successes with getting data I input into forms to stay there, but I usually end up losing a value in the process. Consequently, I've stripped it back down to the basic framework. All I need to know is hot to fill in a single cell the way I want to. I'm sure I'll be able to extrapolate from that.

In case you missed the disclaimers, I had a lot of help from CSS Table Generator and the site wizard. I'm obviously not that good if I can't solve something like this, which I'm pretty sure seems trivial to most people here.
 
Anna Greene
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Should anyone be wondering what I mean by partial successes, try adding this within a <td></td> space.




and this in script.js


The value entered in the description field will not appear, but time works perfectly. I basically altered W3Schools tutorial code to get this, and I don't really understand how to pinpoint the error.
 
Marshal
Posts: 67447
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's way too much code to wade through. Can you make an SSCCE to post, or a jsFiddle, that demonstrates the problem?
 
Anna Greene
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is as simple as I seem to be able to make it.



I want to be able to fill in the cell for Wednesday with both time (duration really) and description. If you click the button, the input fields show just the way I want, but when you fill them in, the description itself does not show. I also ended up making it dependent on both wedFunction and almostFunction. In reality, I only wanted it dependent on a single function. Just run the above as a .html file to get the gist of what I'm talking about.
 
I'm not sure if I approve of this interruption. But this tiny ad checks out:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic