I've been asked to create a 100 by 100 grid, where each block can be clicked on and the color changed. Once they have what they want, you click save and it saves the pattern. Most of the ways I've thought to approach this have been "ugly" and not very efficient. This is also a bit difficult for a database design because of column limitations. I've thought about combining values in single columns and trimming it out but that seems very inefficient and long to load. This must be a web interface. As I said I know the ugly way to do this but hoping for a more reasonable solution/design.
5/31/2006 9:10:28 AM
java appletuse a two dimensional boolean arrayboolean[][] clickArray = new boolean[100][100];[Edited on May 31, 2006 at 9:21 AM. Reason : ]
5/31/2006 9:20:14 AM
columns could be x_pos, y_pos, color. print out 100x100 divs and have an onclick event that calls a javascript color chooser which sets the color of that div. when you submit, loop through the divs to get the positions and colors and do your queries.
5/31/2006 9:21:02 AM
uhhyou can't have a 100 column table?what kind of POS database are you using?
5/31/2006 11:18:25 AM
this isn't as much an application for a practical databaseit's more just an array that stores 100 individual color states arranged in a grid, then I'd just write all that stuff to a file or cookie using bools or ints, depending on how many color states you wantit's really basic java, easy stuff
5/31/2006 11:21:38 AM
yeah I've been told Java but I know --> <-- that much java. That looks to be the best option though, so guess it's time to learn Java!
5/31/2006 2:47:49 PM
i second kris's idea... simple java applet with a two-dimensional array and an onclick function that passes the cell clicked and returns the color it should be redrawn to.
5/31/2006 4:33:17 PM
As for what database this is a tool that needs to be portable from ACCESS/MSSQL/MySQL. Access has a limitation on columns.Learning Java now. ug...[Edited on June 6, 2006 at 11:00 AM. Reason : !]
6/6/2006 11:00:23 AM
what's wrong with php and a big html table(or divs, whatever)[Edited on June 6, 2006 at 11:16 AM. Reason : can most people even run java applets anymore?]
6/6/2006 11:15:48 AM
you don't have to use a java applet, you can just use javascriptAdditionally, if you are using Access for any real database application you should stop RIGHT NOW. It's extremely unstable if you've got anything more than a handful of users. Instability due to concurrency is not acceptable in a business enviroment, as there might be a chance someone could rip off your company by just making multiple accesses to the database.If you are using access, stop learning java, and start making an Oracle DB, then when you finish get back to learning java, it's the same as C/C++, so if you know that it should be easy.
6/6/2006 12:24:34 PM
like ^^ said, java pretty much sucks for web interfaces. especially something straightforward like this. java takes forever to load and you're lucky if it doesn't crash your browser. in my experience, anyways.seriously, i would just do a combination of php/css/javascript/mysql to do this. shouldn't be more than 50 lines.
6/6/2006 12:28:39 PM
I didn't know it was a web interface, doesn't really say that, which is why I suggested java
6/6/2006 12:41:21 PM
in the original post:
6/6/2006 1:10:44 PM
doesn't say it in the first sentencewhich is all I read
6/6/2006 1:24:22 PM
JavaScript and a table is the easiest way to do it.It really isn't hard to implement at all, unless you want to get really fancy with it.
6/6/2006 3:10:51 PM
Yea, I was trying to figure out what I'd missed, the way you fools were going on about java.
6/6/2006 4:31:28 PM
you could do it with flash and actionscript as well, but javascript is much easier
6/6/2006 5:49:19 PM
you could do it in vb with a web exe!
6/6/2006 6:21:58 PM
6/6/2006 6:34:36 PM