JavaScript - Building A Cell Controlled Grid In Js
Hi Peers,
i am trying to build a template for my work. 1- it consists of 3 rows of data pulled from a databse based on 3 parameters entered in a form. those 2 rows includes 60 cells each ( 60 columns : 60 months) 2- i will have another 2 empty rows where i have to call another data from another table or enter it manually.. 3- i ll have the last row that will hold calculation results based on the above rows.. Any idea on how to build that ? \please let me know if you need more details or mock up .. it almost like an excel web spreadsheet except that sopme data is pulled directly from a database.. thank you Similar TutorialsPlaying with code again and Im sure im skipping something but today im playing with the sentinel controlled loop. which tell me if im wrong is just a while loop until it meets the sentinel? but what say i have three or more options. 1. function#1 2. function #2 3. Exit is there a way to create this? This is what i keep coming up with. Code: // Priming input userInput = parseInt(prompt('0. Exit 1. function 1 2. Function 2')); // Process inputs until sentinel while(userInput != SENTINEL ) { if (userInput ==1) { function1() } else if (userInput ==2) { function2() } document.write('hello') } but obviously when in a while statement its just going to keep looping so what i want to know is there a way to make it work? Thanks Hi there, I am attempting to set up a very basic menu to drive a program for two different games. I need the menu to process using a primed sentinel controlled loop (where the quit option is the sentinel). I have already set up a function for each game and was hoping to call the function when the user selects a game. I also want to both (a) keep a count of the number of games played and (b) keep a points score, which is to be displayed before the menu is shown agin. When the user quits, I want the final number of points and games played written to document body. I have only very basic knowledge of JavaScript so I realise this is probably a simple answer but I've spent a heap of time on it so far and the menu still has glitches. Any help would be greatly appreciated! This is what I have so far: SENTINEL = 0; MESSAGE_MENU = 'Menu: 1. Pattern Game, 2. Guessing Game, 0. Quit' userInput = parseInt(prompt(MESSAGE_MENU)); while(userInput != SENTINEL) { userInput = parseInt(prompt(MESSAGE_MENU)); if(userInput == 1) { patternGame(); gamesPlayed++; alert('Number of Games Played: '+gamesPlayed) alert('Total Points Scored: '+totalPoints) } else if(userInput == 2) { guessingGame(); gamesPlayed++; alert('Number of Games Played: '+gamesPlayed) alert('Total Points Scored: '+totalPoints) } else { alert('Not a valid input. '+MESSAGE_MENU); } } document.writeln('Total Points: '+totalPoints); document.writeln('Games Played: '+gamesPlayed); <script language="JavaScript"> function changeColor(cell_id){var state1="#dde6ed"; var state2="#ffc20e"; var cellid = new Array ("id1", "id2", "id3", "id4", "id5", "id6"); for(var i = 0; i < cellid.length; i++){var nav = document.getElementById(cellid[i]); if(cellid == nav.id){nav.style.backgroundColor=state2;} else {nav.style.backgroundColor=state1;}}} </script> Can anyone tell me what is wrong with this script. I put an onClick= changeColor(this);" in my <td> tag to call the script but still not working. Hi I had a problem earlier with the dom, which I have resolved. I was just wondering if anyone new how to use the dom, to create a table styled effect, a 3x5 grid. I find that I can create div elements and add them to the document, but they are only added vertically and not in the horizontal. This is my code Code: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META name="generator" content="Free Script Editor, see www.freescripteditor.com"> <TITLE>Email Client</TITLE> <link rel="stylesheet" type="text/css" href="http://localhost/email/styles/style1.css"/> <script src="javascript/prototype.js" type="text/javascript"></script> <script src="javascript/scriptaculous.js" type="text/javascript"></script> <script src="javascript/dragdrop.js" type="text/javascript"></script> <script src="javascript/controls.js" type="text/javascript"></script> <script src="javascript/effects.js" type="text/javascript"></script> <script src="javascript/builder.js" type="text/javascript"></script> <script type="text/javascript"> var xmlhttp = false; //check if we are using IE try { //If the javascript version is greater than 5. xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); alert ("You are using Microsoft Internet Explorer."); } catch(e) { //if not, then use the older active x object. try { //if we are using Internet Explorer xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); alert("You are using Microsoft Internet Explorer"); } catch (E) { xmlhttp = false; } } //If we are using a non-IE browser, crea a javascript instance of the object if(!xmlhttp && typeof XMLHttpRequest != 'undefined') { xmlhttp = new XMLHttpRequest(); alert ("You are not using Microsoft Internet Explorer"); } function createTable() { var divright, div1, div2, div3, div4, div5, div6, div7, div8, div9, div10, div11, div12, div13, div14, div15; divright = document.getElementById('right'); div1 = document.createElement('div'); div1.className = 'droparea'; div1.setAttribute('id', 'sortList1'); div2 = document.createElement('div'); div2.className = 'droparea'; div2.setAttribute('id', 'sortList2'); div3 = document.createElement('div'); div3.className = 'droparea'; div3.setAttribute('id', 'sortList3'); div4 = document.createElement('div'); div4.className = 'droparea'; div4.setAttribute('id', 'sortList4'); div5 = document.createElement('div'); div5.className = 'droparea'; div5.setAttribute('id', 'sortList5'); div6 = document.createElement('div'); div6.className = 'droparea'; div6.setAttribute('id', 'sortList6'); div7 = document.createElement('div'); div7.className = 'droparea'; div7.setAttribute('id', 'sortList7'); div8 = document.createElement('div'); div8.className = 'droparea'; div8.setAttribute('id', 'sortList8'); div9 = document.createElement('div'); div9.className = 'droparea'; div9.setAttribute('id', 'sortList9'); div10 = document.createElement('div'); div10.className = 'droparea'; div10.setAttribute('id', 'sortList10'); div11 = document.createElement('div'); div11.className = 'droparea'; div11.setAttribute('id', 'sortList11'); div12 = document.createElement('div'); div12.className = 'droparea'; div12.setAttribute('id', 'sortList12'); var div13 = document.createElement('div'); div13.className = 'droparea'; div13.setAttribute('id', 'sortList13'); div14 = document.createElement('div'); div14.className = 'droparea'; div14.setAttribute('id', 'sortList14'); div15 = document.createElement('div'); div15.className = 'droparea'; div15.setAttribute('id', 'sortList15'); divright.appendChild(div1); divright.appendChild(div2); } function getmessage(inbox_id) { var object = document.getElementById('content'); var server = "getmessage.php?inbox_id=" +inbox_id; xmlhttp.open("GET", server); xmlhttp.onreadystatechange = function() { if(xmlhttp.readyState == 4 && xmlhttp.status == 200) { object.innerHTML = xmlhttp.responseText; } } xmlhttp.send(null); } function createSortables() { Sortable.create('container1', {tag: 'div', only: 'draggable', constraint: false, containment: ['container1', 'sortList1', 'sortList2', 'sortList3', 'sortList4', 'sortList5', 'sortList6', 'sortList7' , 'sortList8', 'sortList9', 'sortList10', 'sortList11', 'sortList12', 'sortList13', 'sortList14', 'sortList15'], dropOnEmpty: true}); Sortable.create('sortList1', {tag: 'div', only: 'draggable', constraint: false, containment: ['container1', 'sortList1', 'sortList2', 'sortList3', 'sortList4', 'sortList5', 'sortList6', 'sortList7', 'sortList8', 'sortList9', 'sortList10', 'sortList11', 'sortList12', 'sortList13', 'sortList14', 'sortList15'], dropOnEmpty: true}); Sortable.create('sortList2', {tag: 'div', only: 'draggable', constraint: false, containment: ['container1', 'sortList1', 'sortList2', 'sortList3', 'sortList4', 'sortList5', 'sortList6', 'sortList7', 'sortList8', 'sortList9', 'sortList10', 'sortList11', 'sortList12', 'sortList13', 'sortList14', 'sortList15'], dropOnEmpty: true}); Sortable.create('sortList3', {tag: 'div', only: 'draggable', constraint: false, containment: ['container1', 'sortList1', 'sortList2', 'sortList3', 'sortList4', 'sortList5', 'sortList6', 'sortList7', 'sortList8', 'sortList9', 'sortList10', 'sortList11', 'sortList12', 'sortList13', 'sortList14', 'sortList15'], dropOnEmpty: true}); Sortable.create('sortList4', {tag: 'div', only: 'draggable', constraint: false, containment: ['container1', 'sortList1', 'sortList2', 'sortList3', 'sortList4', 'sortList5', 'sortList6', 'sortList7', 'sortList8', 'sortList9', 'sortList10', 'sortList11', 'sortList12', 'sortList13', 'sortList14', 'sortList15'], dropOnEmpty: true}); Sortable.create('sortList5', {tag: 'div', only: 'draggable', constraint: false, containment: ['container1', 'sortList1', 'sortList2', 'sortList3', 'sortList4', 'sortList5', 'sortList6', 'sortList7', 'sortList8', 'sortList9', 'sortList10', 'sortList11', 'sortList12', 'sortList13', 'sortList14', 'sortList15'], dropOnEmpty: true}); Sortable.create('sortList6', {tag: 'div', only: 'draggable', constraint: false, containment: ['container1', 'sortList1', 'sortList2', 'sortList3', 'sortList4', 'sortList5', 'sortList6', 'sortList7', 'sortList8', 'sortList9', 'sortList10', 'sortList11', 'sortList12', 'sortList13', 'sortList14', 'sortList15'], dropOnEmpty: true}); Sortable.create('sortList7', {tag: 'div', only: 'draggable', constraint: false, containment: ['container1', 'sortList1', 'sortList2', 'sortList3', 'sortList4', 'sortList5', 'sortList6', 'sortList7', 'sortList8', 'sortList9', 'sortList10', 'sortList11', 'sortList12', 'sortList13', 'sortList14', 'sortList15'], dropOnEmpty: true}); Sortable.create('sortList8', {tag: 'div', only: 'draggable', constraint: false, containment: ['container1', 'sortList1', 'sortList2', 'sortList3', 'sortList4', 'sortList5', 'sortList6', 'sortList7', 'sortList8', 'sortList9', 'sortList10', 'sortList11', 'sortList12', 'sortList13', 'sortList14', 'sortList15'], dropOnEmpty: true}); Sortable.create('sortList9', {tag: 'div', only: 'draggable', constraint: false, containment: ['container1', 'sortList1', 'sortList2', 'sortList3', 'sortList4', 'sortList5', 'sortList6', 'sortList7', 'sortList8', 'sortList9', 'sortList10', 'sortList11', 'sortList12', 'sortList13', 'sortList14', 'sortList15'], dropOnEmpty: true}); Sortable.create('sortList10', {tag: 'div', only: 'draggable', constraint: false, containment: ['container1', 'sortList1', 'sortList2', 'sortList3', 'sortList4', 'sortList5', 'sortList6', 'sortList7', 'sortList8', 'sortList9', 'sortList10', 'sortList11', 'sortList12', 'sortList13', 'sortList14', 'sortList15'], dropOnEmpty: true}); Sortable.create('sortList11', {tag: 'div', only: 'draggable', constraint: false, containment: ['container1', 'sortList1', 'sortList2', 'sortList3', 'sortList4', 'sortList5', 'sortList6', 'sortList7', 'sortList8', 'sortList9', 'sortList10', 'sortList11', 'sortList12', 'sortList13', 'sortList14', 'sortList15'], dropOnEmpty: true}); Sortable.create('sortList12', {tag: 'div', only: 'draggable', constraint: false, containment: ['container1', 'sortList1', 'sortList2', 'sortList3', 'sortList4', 'sortList5', 'sortList6', 'sortList7', 'sortList8', 'sortList9', 'sortList10', 'sortList11', 'sortList12', 'sortList13', 'sortList14', 'sortList15'], dropOnEmpty: true}); Sortable.create('sortList13', {tag: 'div', only: 'draggable', constraint: false, containment: ['container1', 'sortList1', 'sortList2', 'sortList3', 'sortList4', 'sortList5', 'sortList6', 'sortList7', 'sortList8', 'sortList9', 'sortList10', 'sortList11', 'sortList12', 'sortList13', 'sortList14', 'sortList15'], dropOnEmpty: true}); Sortable.create('sortList14', {tag: 'div', only: 'draggable', constraint: false, containment: ['container1', 'sortList1', 'sortList2', 'sortList3', 'sortList4', 'sortList5', 'sortList6', 'sortList7', 'sortList8', 'sortList9', 'sortList10', 'sortList11', 'sortList12', 'sortList13', 'sortList14', 'sortList15'], dropOnEmpty: true}); Sortable.create('sortList15', {tag: 'div', only: 'draggable', constraint: false, containment: ['container1', 'sortList1', 'sortList2', 'sortList3', 'sortList4', 'sortList5', 'sortList6', 'sortList7', 'sortList8', 'sortList9', 'sortList10', 'sortList11', 'sortList12', 'sortList13', 'sortList14', 'sortList15'], dropOnEmpty: true}); } window.onload = function() { this.createTable(); this.createSortables(); } </script> </HEAD> <BODY> <!--header div - for message 'new', 'reply' --> <div class="container" id="container"> <div class="header"> </div> <!-- end of header div--> <!--Begin the div class left - this will hold the inbox emails for review--> <div class="left" id='container1'> <?PHP include ($_SERVER['DOCUMENT_ROOT'].'\email\database_connect\connect.php'); $str = "id"; $i = 0; $inbox_query = "select i.inbox_id, i.to, i.subject, i.sent, i.message from inbox as i"; $inbox_result = mysql_query($inbox_query); while($row = mysql_fetch_array($inbox_result)) {//start while trainer query $inbox_id = $row['0']; $to = $row['1']; $subject= $row['2']; $sent = $row['3']; $message = $row['4']; $i++; echo "<div class='draggable' id='$str$i'> $inbox_id $to $sent <a href='#' onclick='getmessage($inbox_id)'>$subject</a> </div>"; }//end while inbox query ?> </div> <!--end left div--> <!--begin the right div - this is the right side of the screen frame for postponed email area--> <div class="right" id="right"> </div> <div class="content" id="content"> </div> </div> <!--end the right div element--> <!--begin the main content div - this will hold sent message--> </BODY> </HTML> I have created an editable grid based on: http://www.webismymind.be/editablegrid Although I have created a few basic sites - coding is still pretty new to me, but what I want to do is make this grid editable by an admin user - and then have other users who can view it but not edit it. I am trying to create a basic staff rota & any help would be much appreciated Thanks Hello, I have this idea, but I wouldn't want to reinvent the wheel if it's already been done. I want to generate perspective grid on canvas depending on browser window size, something like this, but without textures: http://www.123rf.com/photo_2651286_a...rspective.html Do someone of you guys know if some similar script already exists? Or at least some tips on how not to end up writing a 1000 lines script (At this point I would just drop the idea)? All thoughts appreciated. P.S. even an obscure algorithm would probably suffice, 'cause the main problem I'm struggling with is diminishing size perspective calculations Hi, I need s JavaScript component that will allow the user to edit small amounts of data (<20 rows and Cols) in a grid format. Any suggestions on what to use? Thanks Bob Hi, This is my plan. I want to create a 3x3 grid on the page. Each square needs to be the height and width of the page. I will then use jquery scroll.to to move the grid, dispalying a different square to the user. Am I right in thinking that I wont be able use 100% width and 100% height in my CSS for the single box, since there are actually going to 8 squares that are off the page? I am guessing therefore that I should use javascript to take the window width and height, and then use this value to create each of the gridbox's. Is this the right way of doing it? Hey, I have a script which uses an array of numbers to represent their position in a div. its 5 by 5 like so: Code: tileMap = [ [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1], ]; images = new Array(); images[1] = "no block"; images[3] = "brick.PNG"; Image[1] means you can move on the tile, 3 means you cannot (aka a collision). Now this is fine but i have issues regarding my movement of the image. I want to use WASD keyboard buttons which i can do using a CASE statement. But how do you make the image move Regarding Left/Right/Up/Down (also so that it stops moving when you stop holding down one of the keyboard buttons. I use this to detect the key button pressed: Code: function handleKeyMovement(keyValueDown) { switch(keyValueDown) { case 97: //A Move Left //move it left break; case 100: //D Move Right //move it right break; case 119: //W Move Up //move it up break; case 115: //S Move Down //move it down break; } } p.s ideally i would like to move the said image by certain pixel amounts so it looks more smooth in movement. Is it possible? Hope you can help ! Hello, I'm more looking for advice but any helpful examples would be great. So basically what I need to accomplish is a grid, that I can drop objects into, then save the coordinates. So let's say I have a 3x3 set of tiles which will represent "floor tiles", and I load from my MySql database a users "furniture", what's the best method of being able to take these dynamic items drop them on a tile which can be then saved in an xml file or something. What are the best j/s libraries for this? I know jQuery and mootools have drag and drop functions but can they accomplish what I'm looking for? Any feedback will help, I'm comfortable coding in js but I want to do it effeciently and there's got to be people who have done similar things. i am trying to change my background image after click on given in grid option. any body show me complete code in java script. resource: HP Laptop Repair and Solution Service Center in Delhi Hi forums, I'm building a website for my class and one of the things I was planning on doing is building a navigation where when you hover over the mouse, depending on which side, I wanted the content to scroll from that particular direction. The problem is, I am terrible at Javascript. I have nothing to work with, just the idea. This is an illustration to what I was referring to. Is there a term for this? All I really need is just something to work with, a redirect to an existing example that vaguely captures this idea along with the source is fine. I tried finding myself, but I only found and worked with one Javascript navigation and it didn't do what I was expecting to do. Any assistance is highly appreciated. Hi, I have an array but I'm not exactly sure how to finish the build using an if statement. I have 6 elements and need the build to load a different top image for each array that loads that matches the specific element. Here is what I have but it only shows the first top image no matter what: PHP Code: <LINK REL=StyleSheet HREF="scrolling_popup/scrolling_popup.css" TYPE="text/css"> <script type="text/javascript" language="javascript" src="scrolling_popup/scrolling_popup.js"></script> <script type="text/javascript" > var array = new Array(); array[0]='<a href="http://www.amateurmatch.com/in/?ainfo=MjI5MjR8Nnw3NDc=&atcc=0&_t=search3&id=489257" rel="nofollow" target="_blank"><img src="http://www.oohya.net/geoip/p/1.jpg" border="0" alt=""></a>'; array[1]='<a href="http://www.amateurmatch.com/in/?ainfo=MjI5MjR8Nnw3NDc=&atcc=0&_t=search3&id=489257" rel="nofollow" target="_blank"><img src="http://www.oohya.net/geoip/p/2.jpg" border="0" alt=""></a>'; array[2]='<a href="http://www.amateurmatch.com/in/?ainfo=MjI5MjR8Nnw3NDc=&atcc=0&_t=search3&id=489257" rel="nofollow" target="_blank"><img src="http://www.oohya.net/geoip/p/3.jpg" border="0" alt=""></a>'; array[3]='<a href="http://www.amateurmatch.com/in/?ainfo=MjI5MjR8Nnw3NDc=&atcc=0&_t=search3&id=489257" rel="nofollow" target="_blank"><img src="http://www.oohya.net/geoip/p/4.jpg" border="0" alt=""></a>'; array[4]='<a href="http://www.amateurmatch.com/in/?ainfo=MjI5MjR8Nnw3NDc=&atcc=0&_t=search3&id=489257" rel="nofollow" target="_blank"><img src="http://www.oohya.net/geoip/p/5.jpg" border="0" alt=""></a>'; array[5]='<a href="http://www.amateurmatch.com/in/?ainfo=MjI5MjR8Nnw3NDc=&atcc=0&_t=search3&id=489257" rel="nofollow" target="_blank"><img src="http://www.oohya.net/geoip/p/6.jpg" border="0" alt=""></a>'; var num=Math.floor(Math.random()*(array.length) ); var html_code = array[num]; if (array[0]) { buildPopup_HtmlCode(390, 329, '<img src="http://www.oohya.net/geoip/images/imtop1.png">', html_code); } else if (array[1]) { buildPopup_HtmlCode(390, 329, '<img src="http://www.oohya.net/geoip/images/imtop2.png">', html_code); } else if (array[2]) { buildPopup_HtmlCode(390, 329, '<img src="http://www.oohya.net/geoip/images/imtop3.png">', html_code); } else if (array[3]) { buildPopup_HtmlCode(390, 329, '<img src="http://www.oohya.net/geoip/images/imtop4.png">', html_code); } else if (array[4]) { buildPopup_HtmlCode(390, 329, '<img src="http://www.oohya.net/geoip/images/imtop5.png">', html_code); } else { buildPopup_HtmlCode(390, 329, '<img src="http://www.oohya.net/geoip/images/imtop6.png">', html_code); } </script> Any ideas? Hey all, I have an issue building a query string. Basically, I have this: /sites?order=site_numper_page=20& But I would like to convert it to this: /sites?order=site_num&per_page=20 I have tried this to check if the current iterator is less than the length of the object and if so, then add the "&", otherwise, don't. But it doesn't seem to work: Code: $.each(query_string, function(key,value){ params += key + '=' + value; if((value + 1) != query_string.length){ params += "&"; } }) Thanks for any response. Hello, I'm trying to build a simple API - it's running fine in Safari and Firefox but failing in IE and Opera. In order to isolate the problem I've stripped it right back 'til all the methods are just alerting their own name. Safari and Firefox give me loads of alerts, but in Opera and IE I just get one, LMSInitialize() when the page first loads - at least I know the browser is finding the API properly. IE also runs LMSCommit() and LMSFinish() when you close the browser window; that's good, but not enough. Opera doesn't even do that. The trigger for all this is a Flash movie created in Adobe Captivate, and published with a whole lot of its own JS which I can't touch - it's running in an iframe, and it's the parent window which includes the API. I need to work out whether there's an issue in my code, or if it's to do with the movie or the publication settings - that side of things is out of my control. Here's the full code of my test version of the API. I'd really appreciate any comments! Thanks, Ben Code: function SIScormAPI(){ this.version = '1.2'; this.LMSInitialize = LMSInitialize; this.LMSFinish = LMSFinish; this.LMSGetValue = LMSGetValue; this.LMSSetValue = LMSSetValue; this.LMSCommit = LMSCommit; this.LMSGetLastError = LMSGetLastError; this.LMSGetErrorString = LMSGetErrorString; this.LMSGetDiagnostic = LMSGetDiagnostic; } function LMSInitialize(){ var alertStr1 = 'LMSInitialize() - v.'+this.version; alert(alertStr1); } function LMSFinish(){ var alertStr2 = 'LMSFinish()'; alert(alertStr2); } function LMSGetValue(){ var alertStr3 = 'LMSGetValue()'; alert(alertStr3); } function LMSSetValue(){ var alertStr4 = 'LMSSetValue()'; alert(alertStr4); } function LMSCommit(){ var alertStr5 = 'LMSCommit()!!!!!'; alert(alertStr5); } function LMSGetLastError(){ var alertStr6 = 'LMSGetLastError()'; alert(alertStr6); } function LMSGetErrorString(){ var alertStr7 = 'LMSGetErrorString()'; alert(alertStr7); } function LMSGetDiagnostic(){ var alertStr8 = 'LMSGetDiagnostic()'; alert(alertStr8); } API = new SIScormAPI(); I work for a university in Texas, and recently my boss indicated he wanted me to build a "help button" widget for our computers. We run both Mac and Windows, and will be upgrading to Windows 7 soon, as I understand it supports widgets. According to the guide I'm working my way through, Widgets can built using a combination of HTML and Javascript. While I know HTML, I know next to nothing about Javascript, hence, my question. Here's what I need the script to do: Pull the logged in username, pull the machine name, pull the time and date, then throw up a dialogue box which will send everything to an e-mail address/server. Does anyone know a spot for me to begin? I must confess, I'm a little befuddled by Javascript. Thanks hello, I have a text input box where users can input values separated by a line break. What I need to do is to take those values and put them all into an array once they hit "submit". I can do this one line at a time, but I would like to be able to do it all in one hit. Can it be done in javascript? thanks in advance... So I am working on a fairly difficult project (for my level at least). I actually had this project planned before I even knew JavaScript so I specifically learned JavaScript in order to write this program! Here is my plan: I am writing a javascript program to help students prepare to take an exam (a standardized test). The test consists of 80 questions from various topics in history. The test covers three time spans (0-1000, 1000-1500, 1500-2000) and 4 different question types (ie. politics, culture, economics, foreign relations). Likewise, each question will cover a specific topic, maybe one will be about a specific war and another question will be about a leader. What I want the quiz to do is give a detailed report on the student's strengths and weaknesses. Once the student is done with the quiz and they select "grade" it will take them to the results page which will show them: 1. their score (percent correct) 2. percent correct for each of the time periods. 3. percent correct for each of the question types 4. a recommended chapter reading list based on the questions they got wrong. I did some search on the internet and found a basic script that ive been using. All it does is have the html code for the questions and the, "grade" button only shows the percent correct and which which questions were wrong. Its basically a simple quiz script without any of the advanced features I want. I figure I'll just add the advanced features to this existing script. Here is a link to the example script I am using. So far my script is 100% the same (except different questions and answers). What is the best route to modify that script to add all the features I want. From what I've read on javascript so far. I have to write a function to process each of the elements I want to display on the results page. I have no idea about how to do that though. I'm looking at building an interactive desktop gadget for our company computers that functions similar to Clippy (less annoying though). The idea is for users to be able to type in keywords or questions and have the gadget present links to pages on our intranet. So similar to a search engine but more focused on answering questions as opposed to just returning a hundred results. I've got a moderate understanding of java so I know I could do something like IF "Textbox" EQUALS "Keyword" THEN DO "THAT". Need a little more sophistication though, it should be able to accept multiple keywords and weigh the search results accordingly. I'm sort of picturing an updatable XML table like this: KEYWORD This is the result KEYWORD This is the result Or an array in a separate .js file. Maybe there's a better way than that actually but it's what I know. Has anyone got some advice on this? Thanks. |