JavaScript - How Do I Randomly Select A Javascript File To Run
I have the following code but it simply writes the path to the webpage. I actually want it to randomly select the .js code in that path and run it. Help please!
Code: jsFiles= new Array(3) jsFiles[0]=["assets/base/scripts/itmpiscripts/popupad1/script.js"] jsFiles[1]=["assets/base/scripts/itmpiscripts/popupad2/script.js"] jsFiles[2]=["assets/base/scripts/itmpiscripts/popupad3/script.js"] randno = Math.floor ( Math.random() * jsFiles.length ); document.write(jsFiles[randno]); Thanks Similar TutorialsHello geniuses. I really need your help and didn't know who else to turn to. Using JavaScript, I require a code that allows me to play .wav sound files randomly and automatically on page start-up, I also need them to loop as they are drum beats. The plan: to load my web page and hear a random drum beat that loops continuously. I need it to be compatible with most, if not all Internet browsers (Chrome, Internet Explorer, Firefox and Opera are crucial) and to state what sound file is playing on the page (allowing me to identify the looping drum beat/sound file), and if possible to provide a link to the actual sound file for download. I've tried endlessly trying to find code to build upon but have failed miserably, I would appreciate any code submissions as it would help me out massively. It's a lot to ask I know, but it would be so very appreciated. My knowledge with JavaScript is sadly minimal. I've also got a quick question, how would I prevent Google Chrome from putting a pause after each sound loop? Of course, being drum beats; I require it to loop in sync and it appears only Google Chrome puts a 1 second period after each play. Please help, I am so stuck. Anyway guys, thanks for reading! Hello geniuses. I really need your help and didn't know who else to turn to. Using JavaScript, I require a code that allows me to play .wav sound files randomly and automatically on page start-up, I also need them to loop as they are drum beats. The plan: to load my web page and hear a random drum beat that loops continuously. I need it to be compatible with most, if not all Internet browsers (Chrome, Internet Explorer, Firefox and Opera are crucial) and to state what sound file is playing on the page (allowing me to identify the looping drum beat/sound file), and if possible to provide a link to the actual sound file for download. I've tried endlessly trying to find code to build upon but have failed miserably, I would appreciate any code submissions as it would help me out massively. It's a lot to ask I know, but it would be so very appreciated. My knowledge with JavaScript is sadly minimal. I've also got a quick question, how would I prevent Google Chrome from putting a pause after each sound loop? Of course, being drum beats; I require it to loop in sync and it appears only Google Chrome puts a 1 second period after each play. Please help, I am so stuck. Anyway guys, thanks for reading! Hi all, I want to display varying company information from a javascript array randomly each time the page is refreshed. My problem is that the each piece of company information must be split up into 3-4 array elements since I have set up spans in the body where the information go accordingly and as such I don't how to randomize that. The relevant code is (I will only give two company examples as it's a long list): Code: <script type="text/javascript" language='javascript'> function compInfo(comp){ var companyInfo = new Array(); if(comp == document.getElementById('test').innerHTML) { //insert business name here. companyInfo[0] = 'Test'; //insert business type here. companyInfo[1] = 'Media'; //insert street name here. companyInfo[2] = 'Test Road.'; //insert actual opening time here. companyInfo[3] = '5am - 10pm'; //insert actual closing time here. companyInfo[4] = 'Christmas'; //insert contact info here. companyInfo[5] = 'test'; //insert web address here. companyInfo[6] = '<a href="http://www.test.com" style="color: #0092DD; text-decoration: none;">test.com</a>'; //insert image link here. companyInfo[7] = 'images/test.jpg'; } if(comp == document.getElementById('test1').innerHTML) { //insert business name here. companyInfo [0] = 'Test1'; //insert business type here. companyInfo [1] = 'Club'; //insert street name here. companyInfo[2] = 'Test1 Road.'; //insert actual opening time here. companyInfo[3] = '5am - 10pm'; //insert actual closing time here. companyInfo[4] = 'Christmas'; //insert contact info here. companyInfo[5] = 'test1'; //insert web address here. companyInfo[6] = '<a href="http://www.test1.com" style="color: #0092DD; text-decoration: none;">test1.com</a>'; //insert image link here. companyInfo[7] = 'images/test1.jpg'; } document.getElementById('title').innerHTML =companyInfo[0]; document.getElementById('name').innerHTML = companyInfo[1]; document.getElementById('street').innerHTML = companyInfo[2]; document.getElementById('open').innerHTML = 'Open'; document.getElementById('otime').innerHTML = companyInfo[3]; document.getElementById('close').innerHTML = 'Closed' document.getElementById('ctime').innerHTML = companyInfo[4]; document.getElementById('contact').innerHTML = 'Contact'; document.getElementById('cinfo').innerHTML = companyInfo[5]; document.getElementById('web').innerHTML = companyInfo[6]; document.getElementById('image').style.display = 'block'; document.getElementById('image').src = companyInfo[7]; } </script> </head> <body> <SPAN ID='test' onclick="compInfo(document.getElementById('test').innerHTML);"><b>Test</b></SPAN> <SPAN ID='test1' onclick="compInfo(document.getElementById('test1').innerHTML);"><b>Test1</b></SPAN> //info shown he <div style='text-overflow: ellipsis;'> <table cellpadding='0' cellspacing='0' border='0' style='height:178px; width:185px;'> <tr> <td align="left" style='height:25px;'> <b><SPAN ID='title' ></SPAN></b> </td> </tr> <tr> <td align="left" > <SPAN ID='name' ></SPAN> <br /> <SPAN ID='street'></SPAN> <div style='height:8px;'> </div> <SPAN ID='open'></SPAN> <br /> <SPAN ID='otime'></SPAN> <br /> <SPAN ID='close'></SPAN> <br /> <SPAN ID='ctime'></SPAN> <br /> <div style='height:8px;'> </div> <SPAN ID='contact'></SPAN> <br /> <SPAN ID='cinfo'></SPAN> <SPAN ID='web'></SPAN> <img ID='image' style='display:none;'></img> </td> </tr> </table> </div> </body> So essentially the process is: 1. The person clicks on the company name. 2. Relevant information from the array is shown in the div. But what I want is that on startup, information about a random company is shown automatically. How can I achieve this? Thanks. want to get selected text and image values .Since there is an randomly changed text and image on my page.I used window.getSelection() but this will return only selected text values not images ..so please guide me to solve this problem.
All -- I have a JavaScript config file called gameSetting.js which contains a bunch of variables which configures a particular game. I also have a shared JavaScript library which uses the variables in gameSetting.js, which I include like so: <script type="text/javascript" src="gameSetting.js" ></script> <script type="text/javascript" src="gameLibrary.js" ></script> In gameSetting.js I have: $(document).ready(function() { // call some functions / classes in gameLibrary.js } in Firefox, Safari, and Chrome, this works fine. However, in IE, when it's parsing gameSetting.js, it complains that the functions that live in gameLibrary.js aren't defined. When it gets to parsing gameLibrary.js, the variables in gameSetting.js are reported as not being defined. I've tried dynamically bootstrapping the gameLibrary file using this function in document.ready for dynamic load... $.getScript("gameLibrary.js"); However, the same problem still happens in IE, where when it parses the files individually it's not taking into context the file/variables that came before, so it's not an out of load order problem. My options a 1) collapsing all the functions in gameLibrary.js and variables in gameSetting.js into one file. However, this is not practical because this is dealing with literally hundreds of games, and having a gameLibrary.js in ONE location for ONE update is what makes most logical sense. 2) figure out a way to get this to work where variables in file1 are accessible to file2 in IE (as it seems they are in other browsers). jQuery seems to be able to have multiple plugins that all refer to the based jQuery-1.3.2.js, so I know there is a way to get this to work. Help appreciated. Nero Ok so I'm making this form which when a selection is made in one box it will run through the javascript(function getMgmtHours), and update the div(mgmthours). Then another box shows up allowing another selection to be made which runs through the javascript(function getDays) and updates another div(mgmtdate). My problem is that when I use the second box to run through javascript, it overwrites what shows up in the first div (mgmthours) when it should be updating a different div (mgmtdate). Any ideas what I can do to get it update the relevant div and not overwrite the other one? Here is part of the javascript I have in my page head: Code: function getMgmtHours(str) { if (str=="") { document.getElementById("mgmthours").innerHTML=""; return; } if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("mgmthours").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","getmgmthours.php?dist="+str,true); xmlhttp.send(); } function getDays(str) { if (str=="") { document.getElementById("mgmtdate").innerHTML=""; return; } if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("mgmtdate").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","getdates.php?sunday="+str,true); xmlhttp.send(); } Here is the HTML/PHP portion being used: PHP Code: echo "<p>"; echo "Submit hours:"; echo "<form>"; echo "<select name='district' onchange='getMgmtHours(this.value)'>"; echo "<option value=''>Select a district:</option> <option value='1'>1</option> <option value='3'>3</option> <option value='4'>4</option>"; echo "</select>"; echo "</form>"; echo "</p>" echo "<p>"; echo "<form action='./hours.php' method='post' onSubmit='return checkMgmtHours'>"; echo "Weekending Day: "; echo "<select name='weekending' onchange='getDays(this.value)'>"; echo "<option value=''>Choose a Date:</option>"; while ($week < 32) { $nextsunday = strtotime("next Sunday"); if ($week > 0) { $timestamp = strtotime("-" . $week . " week", $nextsunday); } else { $timestamp = $nextsunday;} $weekending = date('M. d, Y', $timestamp); echo "<option value='" . $weekending . "'>" . $weekending . "</option>"; $week = $week + 1; } echo "</select>"; echo "<div id='mgmtdate' />"; echo "<div id='mgmthours' />"; echo "</p>"; Edit: Also, after getMgmtHours() runs, I can still use both getDays and getMgmtHours, howeer once I used getDays, I am no longer able to use getMgmtHours w/o refreshing the page. Hi Everyone, I'm trying to allow a user to select an XML file so that my javascript can parse it and create some pins for a google map. It works fine in Firefox, and by using FireBug I can see that the file is being accessed as expected. IE on the other hand tells me that "'files.0' is null or not an object" on line 68 of address-locator.php... PHP Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Address Locator</title> <style type="text/css"> #map_canvas { width:690px; height:400px; float: left; clear: right; margin: 0px auto 10px 20px; } </style> <script src="http://www.google.com/jsapi"></script> <script type="text/javascript"> var map = null; var geocoder = null; var establishmentList; // holds the XML list of all the establishments var mapPins = []; // holds a listing of all the map pins google.load('maps', '3', { other_params: 'sensor=false' }); google.setOnLoadCallback(gmapInit); // initialize the google map function gmapInit() { var latlng = new google.maps.LatLng(42.204799,-111.619917); // 45.332245,-99.507536 center of north america var myOptions = { zoom: 4, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); } // includes all the information needed to create a pin with a pop up window function mapPin(pinName, pinAddress, pinPhone, pinWebsite, pinLat, pinLng, geocodeSuccess){ this.pName = pinName; this.pAddress = pinAddress; this.pPhone = pinPhone; this.pWebsite = pinWebsite; this.pLat = pinLat; this.pLng = pinLng; this.success = geocodeSuccess; } // gets the lat and lng of an address and adds a pin to the mapPins array. function getLocation(theName, theAddress, thePhoneNumber, theWebsite){ /* geocoder = new google.maps.Geocoder(); geocoder.geocode({'address': theAddress}, function(results, status){ if (status == google.maps.GeocoderStatus.OK) { mapPins.push(new mapPin(theName, theAddress, thePhoneNumber, theWebsite, results[0].geometry.location, true)); } else { mapPins.push(new mapPin(theName, theAddress, thePhoneNumber, theWebsite, 0, 0, false)); alert("Geocode was not successful for the following reason: " + status); } }); */ // remove after working mapPins.push(new mapPin(theName, theAddress, thePhoneNumber, theWebsite, 42.204799, -111.619917, true)); // end removing code } /* loadAddressFile() * opens an XML file which contains descriptions (names), addresses, phone numbers, * and websites for a business and loads the pertetinent information into the global * variable establishmentList. Starts the call chain to have the data processed */ function loadAddressFile() { // open the file selected by the user var finput = document.getElementById("userAddressFile"); var theFile = finput.files[0]; if (theFile) { var fileReader = new FileReader(); fileReader.onload = function(e){ var xmlDoc; // parse (or load) the xml into xmlDoc. if (window.DOMParser){ parser = new DOMParser(); xmlDoc = parser.parseFromString(e.target.result,"text/xml"); } else { // Internet Explorer xmlDoc=new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async="false"; xmlDoc.loadXML(e.target.result); } // listing of the establishments establishmentList = xmlDoc.getElementsByTagName("establishment"); processEstablishment(0, 1000); } fileReader.readAsText(theFile); } else { alert("Failed to load file"); } } // checks to see if the index parameter is less than the length of the list of establishments and processes the establishment at that index in the list if it is. function processEstablishment(index, delay){ if(index < establishmentList.length){ // data from the XML file var theName = establishmentList[index].getElementsByTagName("name")[0].textContent; var theAddress = establishmentList[index].getElementsByTagName("address")[0].textContent; var thePhoneNumber = establishmentList[index].getElementsByTagName("phone")[0].textContent; var theWebsite = establishmentList[index].getElementsByTagName("website")[0].textContent; // get the current addresses geocoding and add the pin to the list getLocation(theName, theAddress, thePhoneNumber, theWebsite); // check to see if the attempt was successfull - if it was not and we are denied our data - increase the hold time and retry the previous attempt if(!mapPins[index].success){ index--; delay += 5000; } // attempt (or re-attempt) the next establishment window.setTimeout(function() { processEstablishment(index+1, delay); document.getElementById("data").innerHTML += mapPins[mapPins.length-1].pName + "<br />"; }, delay); } } </script> <!-- open the file of addresses if it exists and create a javascript array of the addresses --> </head> <body> <!-- This page is set up to allow the user to load an XML file which contains information about businesses and creates the data required to locate that business on a map --> <div id="map_canvas"></div> <div style="clear:left"> <div style="float:left"> <!-- User the file type to allow the user to select the file, then pass this information to javascript via accessing userAddressFile via document.getElementById("userAddressFile") in loadAddressFile() above --> <form id="addresses" action="address-locator.php" method="post" enctype="multipart/form-data"> Select file: <input name="userAddressFile" id="userAddressFile" type="file" /> <input value="Upload" type="button" onclick="loadAddressFile()" /> </form> </div> <div id="data" style="clear:left"></div> </div> </body> </html> and a sampling of the XML file I'm loading: Code: <?xml version="1.0" encoding="UTF-8"?> <barList> <establishment> <name>21-Seven Bar and Grill</name> <address>217 E Street,Davis, CA</address> <phone>530.757.1733</phone> <website>http://www.myspace.com/21seven_davis</website> </establishment> <establishment> <name>Beach Hut Deli</name> <address>109 E Street, Davis, CA</address> <phone>530.758.7873</phone> <website>http://www.beachhutdeli.com/</website> </establishment> <establishment> <name>Bistro 33 Davis</name> <address>226 F Street, Davis, CA</address> <phone>530.756.4556</phone> <website>www.bistro33.com</website> </establishment> </barList> I've spent the entire afternoon in Goo-gle-land - so any help is most appreciated! If I've missed anything or you have any questions please let me know. Thanks in advance! Dave. Hello, I'm trying to populate an HTML drop down list with data from an XML file but have failed miserably so far using examples I've found. Please help. Thanks, Richard I can get this code to take two separate sections of a file which are not beside each other and write them into another file. It always comes up as a single full line of the code instead of the sections I want. The code includes the student number first name last name and three results of assignments. I want the code to write the student number and three results of all the students into a file and then work out the average of the student results. Can you help? Code: try{ while (in.hasNextLine()) { String line = in.nextLine(); out.println( line); int i=0; if(!Character.isDigit(line.charAt(i))) { i++; } studentStringNumber = line.substring(0, i); String stringResult = line.substring(i); studentStringNumber = studentStringNumber.trim(); stringResults = stringResults.trim(); double stringResultsValue = Double.parseDouble(stringResults.trim()); stringResults = in.nextLine(); studentStringNumber = in.nextLine(); studentNumber = Integer.parseInt(studentStringNumber); if(in.hasNextInt()) { int value = in.nextInt(); } results = Double.parseDouble(stringResults); if(in.hasNextDouble()) { double value = in.nextDouble(); } Scanner lineScanner = new Scanner(line); studentStringNumber = lineScanner.next(); while(!lineScanner.hasNextDouble()) { studentStringNumber = studentStringNumber+ " " +lineScanner.next(); } stringResultsValue = lineScanner.nextDouble(); } } Does anyone know how to accomplish this? I got the html file to show but none of the text in the file will show.
Hi i am using javascript for the first time and i have a problem .I have 2 files html and javascript file in seperate but i donot know how to make them work .the code is down below .Thanks in advance for help. HTML <!DOCTYPE html> <html> <head> <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <meta name="description" content="Instagram API - usage" /> <meta charset=utf-8 /> <title></title> </head> <body> <input id="lat_input" type="number" value="60.221374"/> <input id="lng_input" type="number" value="24.805391"/> <button id="search_location">Search</button><br/> <button id="get_popular">Get popular</button> <div id="images"></div> </body> </html> Javascript file // API DOCUMENTATION: // Instagram Developer Documentation var clientId = 'e7538f47e197479d8d32a63ae3ae4cd2'; $('#search_location').click(function () { getMediaByLocation($('#lat_input').val(), $('#lng_input').val()); }); $('#get_popular').click(function () { getPopularImages(); }); function getMediaByLocation(lat, lng) { var o = { lat: lat, lng: lng, client_id: clientId }; $.getJSON('https://api.instagram.com/v1/media/search?callback=?', o, function (response) { processImages(response.data); }); } function getPopularImages() { var o = { client_id: clientId }; $.getJSON('https://api.instagram.com/v1/media/popular?callback=?', o, function (response) { processImages(response.data); }); } function processImages(array) { $('#images').empty(); $.each(array, function (index, element) { var fs = $('<fieldset>').appendTo('#images'); $('<img>').attr('src', element.images.low_resolution.url).appendTo(fs); if (element.caption) { $('<pre>').text(element.caption.text).appendTo(fs); } $.each(element.comments.data, function (index, comment) { $('<pre>').text('Comment from ' + comment.from.full_name + ': ' + comment.text).appendTo(fs); }); }); } Hi all, I am a newbie to JS. So please extend your help suggesstion to solve this problem I have. I have 2 select boxes. Data in one select box is corresponding to the data in the other select box. When the user comes in and selects example the 3rd element from the first or second select box the correspoinding 3rd element from the other select box should be selected. Please help with the solution.Thanks in advance I have got this piece of code where JavaScript will change a FORM OPTION if it has been selected before (incase the user returns to the page - doesn't have to refill in things), but its not working and my web browser reports this error: Quote: Error: document.getElementById("Dr") is null This is the code: Code: <SCRIPT type="text/javascript"> document.getElementById("<?php echo $_SESSION['recipient']['title']; ?>").selected = "selected"; </SCRIPT> Code: <FORM action="process.html" method="post"> <DIV class="deliveryinformationdata"> <DIV> <B>Title:</B> <SELECT name="title"> <OPTION></OPTION> <OPTION id="Dr">Dr</OPTION> <OPTION id="Miss">Miss</OPTION> <OPTION id="Mr">Mr</OPTION> <OPTION id="Mrs">Mrs</OPTION> <OPTION id="Ms">Ms</OPTION> </SELECT> </DIV> <INPUT type="submit" value="Submit"> </DIV> </FORM> Can anyone see a problem? Hello guys, I am working with javascript and currently have the below code set up. This works well, however I would like to change the "select box" to a "search box"- When the user enters a search string, the matching DIV appears. If there is no matching DIV then "sorry nothing found" appears. Is this possible at all? Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta http-equiv="Content-Style-Type" content="text/css"> <meta http-equiv="Content-Script-Type" content="text/javascript"> </head> <body> <script type="text/javascript"> function show(obj) { no = obj.options[obj.selectedIndex].value; count = obj.options.length; for(i=1;i<=count;i++) document.getElementById('fleet'+i).style.display = 'none'; if(no>0) document.getElementById('fleet'+no).style.display = 'block'; } </script> <form name="myForm"> <select onchange="show(this)"> <option value="1">Please Choose</option> <option value="2">120</option> <option value="3">121</option> <option value="4">122</option> </select> </form> <div id="fleet1" style="display:block">Please Choose <br> </div> <div id="fleet2" style="display:none"> <br> <table valign="top" align="center" border="0" width="690" style="border-collapse: collapse" cellpadding="0" cellspacing="0" bgcolor="#336699"> <TR border="0" bordercolor="#FFFFFF"> <TD valign="top"> <?php include("php/fleet/includes/table.php"); ?> <?php $path = $_SERVER['DOCUMENT_ROOT']; $path .= "/php/fleet/120.php"; include_once($path); ?></tr></table> </td> </tr> </table></div> <div id="fleet3" style="display:none"> <br> <table valign="top" align="center" border="0" width="690" style="border-collapse: collapse" cellpadding="0" cellspacing="0" bgcolor="#336699"> <TR border="0" bordercolor="#FFFFFF"> <TD valign="top"> <?php include("php/fleet/includes/table.php"); ?> <?php $path = $_SERVER['DOCUMENT_ROOT']; $path .= "/php/fleet/121.php"; include_once($path); ?></tr></table> </td> </tr> </table></div> <div id="fleet4" style="display:none"> <br> <table valign="top" align="center" border="0" width="690" style="border-collapse: collapse" cellpadding="0" cellspacing="0" bgcolor="#336699"> <TR border="0" bordercolor="#FFFFFF"> <TD valign="top"> <?php include("php/fleet/includes/table.php"); ?> <?php $path = $_SERVER['DOCUMENT_ROOT']; $path .= "/php/fleet/122.php"; include_once($path); ?></tr></table> </td> </tr> </table></div> </body> </html> demo can be seen he http://www.nctfleetlist.co.uk/div.php Hey, how do I make the following accessible if JS is disabled? Code: <select onchange="if (this.selectedIndex > 0) location.href=this[this.selectedIndex].value;"> <option value="www.domain.com">Your Domain</option> </select> Hi Guys, I am posting this to see if anyone has any ideas or sample code that has worked in the past. What i am aiming at doing is having two tables, with the same amount of rows side by side, effectively rendering them the same. I wish then to select a row on the one table, and this event would trigger the same row on the 2nd table to be selected too. Has anyone done something like this before? Appreciate any feedback! Thanks. Hi all, I am newbie to JS. I have the below task. Please advise. I have a result set of a query being displayed on a page. (5000+ rows). I have to provide a search capability, a search box which will enable to enter a position ID number and the entered position ID by the user should be selected from the results in a different color. Can you please help me with the above. Thanks in advance Calculating quiz answers? Code: var correctAnswers = new Array(); correctAnswers[1] = "Extensible Hypertext Markup Language"; correctAnswers[2] = "<p></p>"; correctAnswers[3] = "<br />"; function checkAnswers(){ var score = 0; for (i=1; i<4; i++){ correctAnswers = getSelectValue("quiz","q" + i); if (correctAnswers == correctAnswers[i]){ score++; } } Hi, would someone know how to convert the left side (textbox) into the same thing as the right has (select box) also by modifying the JS code from the example of this URL: http://www.mredkj.com/tutorials/tableaddrow.html ? It would be a really good feature to have if two select options were used from side-to-side rather than a textbox and a select list. |