• 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
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

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: 67280
170
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.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
create, convert, edit or print DOC and DOCX in Java
https://products.aspose.com/words/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!