Download presentation
Presentation is loading. Please wait.
1
EE296 – Web-based Truth Table Program Jason Axelson Bryant Komo
2
Brief Overview We are doing a web based version of truth_table which was used in EE260 to create truth tables and create hex files for the eprom. We are doing a web based version of truth_table which was used in EE260 to create truth tables and create hex files for the eprom. Our project will be written mostly in JavaScript, which is an interpreted scripting language for the web Our project will be written mostly in JavaScript, which is an interpreted scripting language for the web We will also use cgi which is a script (we're going to use C, but many other languages are possible) that runs on the server. We will also use cgi which is a script (we're going to use C, but many other languages are possible) that runs on the server. Our program will be better than truth_table. Our program will be better than truth_table.
3
Overall Block Diagram
4
The Interface The Website The WebsiteThe Website
5
Assembling the HTML For each row For each row Add HTML for row label Add HTML for row label Add HTML for input cells Add HTML for input cells Add HTML for the border cell Add HTML for the border cell Add HTML for output cells Add HTML for output cells Write HTML to inside of a div tag Write HTML to inside of a div tag
6
Manipulating Rows If row is beyond table, add line at end of table If row is beyond table, add line at end of table save table to temp save table to temp add row to bottom add row to bottom redraw table with new height redraw table with new height open part of table that is above the row being added open part of table that is above the row being added open bottom half of table shifted down one open bottom half of table shifted down one
7
Events Uses onkeydown to capture key press. Uses onkeydown to capture key press. Uses onkeypress to capture key press. Uses onkeypress to capture key press. needs to use onkeypress for netscape, some old versions of firefox, and opera, and onkeydown for most other browsers. needs to use onkeypress for netscape, some old versions of firefox, and opera, and onkeydown for most other browsers. Uses onclick to capture mouse clicks. Uses onclick to capture mouse clicks. //Some browsers need to use onkeydown, some need to use onkeypress if(isKeyDown) { table_html += "onkeydown='return checkForKey(event, this)' "; table_html += "onkeydown='return checkForKey(event, this)' "; } else if(isKeyPress) { table_html += "onkeypress='return checkForKey(event, this)' "; table_html += "onkeypress='return checkForKey(event, this)' ";}
8
Browser Detection var browser = navigator.userAgent; var browser = navigator.userAgent; if(browser.indexOf("Firefox/1.0.2") != -1) { if(browser.indexOf("Firefox/1.0.2") != -1) { isFirefox1_0_2 = true; isFirefox1_0_2 = true; isKeyPress = true; isKeyPress = true; } else if(browser.indexOf("MSIE") != -1) { } else if(browser.indexOf("MSIE") != -1) { isIE = true; isIE = true; isKeyDown = true; isKeyDown = true; }
9
What Remains to Be Done Work on cgi interface to bool and wiliki/spectra accounts Work on cgi interface to bool and wiliki/spectra accounts Be able to convert to hex file Be able to convert to hex file Be able to save across sessions somehow. Be able to save across sessions somehow. Flesh out interface Flesh out interface
10
Basic Timeline for Completion Get Bryant's website up Get Bryant's website up Don't know how long this will take Don't know how long this will take Understand necessary parts of truth_table code Understand necessary parts of truth_table code Get exporting to.HEX working Get exporting to.HEX working Complete Error Checking module Complete Error Checking module Open/Save files Open/Save files Usability testing. Usability testing. Debug Debug Interface to bool. Interface to bool.
11
Gantt Chart
12
Problems The website only worked for certain browsers and certain versions of browsers The website only worked for certain browsers and certain versions of browsers The way we named the array cells were a little difficult to work with The way we named the array cells were a little difficult to work with Apparently, CGI has a small limit on its buffer size Apparently, CGI has a small limit on its buffer size
13
Problems We Expect Compatability issues Compatability issues Interfacing to Bool/Truthtable program Interfacing to Bool/Truthtable program Time Time
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.