Make A 2-d School Schedule From An Array?
Jan 2, 2011
How would a make a 2-D school schedule? The first row should have in it the days of the week and the first column should have the number of periods. The array should be 6 x 12. And how would I be able to ask the user what day/period they would like to know the schedule for? For example if they wanted to know what class was mondays 3rd period it would say math.
View 2 Replies
ADVERTISEMENT
Aug 8, 2011
Where can I find information on the release schedule? More specifically, when will 1.6.3 be released?
View 2 Replies
View Related
Sep 30, 2010
I'm trying to get it to display a document write on the website if the time is as specified and the day is.These are the times and days i want to display for:
Monday: CLOSED
Tuesday: 9AM - 5:30PM
[code]....
At the moment this script only writes for Monday to Friday, 8:30am to 6pm (GMT0). But as you can see from my times above i want to be able to show two unique times for 2 days tues-thurs and friday (open) / sat-sun (close).i assume the else statement would be used for both monday and sunday as it writes close? how to go about this, tried changing the the t_day but had no success
Code JavaScript:
var d = new Date();
var t_hour = d.getUTCHours(); // getUTC for GMT0
var t_min = d.getUTCMinutes();
var t_day = d.getUTCDay();
[code]....
View 17 Replies
View Related
Jan 9, 2011
I would like to create a calculator which can help parents when they calculate their student's school fees on our school's joomla web site. Ive attached our school's fee table.
View 1 Replies
View Related
Oct 26, 2011
- Create a function that prompts user for a number.
- Develop the program so that it continues to prompt until it receives valid information.
- Then create a multiplication table that displays the number multiplied by 1 through prompted number.
How to get the function to work.
View 5 Replies
View Related
Jun 2, 2010
So I have to display my school timetable, read the current time, and using javascript highlight the current lesson.
My teacher says i must use about 3/4 functions not switch cases.
View 6 Replies
View Related
Nov 19, 2010
To get to the chase,ihave a sort of lightbox-app and i need to make a multidimensional rray.
This is what i got sofar:
var imageNum = 0;
var linkArray= new Array;
[code]....
View 5 Replies
View Related
Feb 10, 2011
I have this loop:
for (var j = 0; j < gmarkers.length; j++) {
gmarkers[j].hide();
elabels[j].hide();
map.closeInfoWindow();
[Code]....
which was useful for passing the p variable when it was just one number.
but now I need to get that number every time j gets set (I understand that the j gets overwritten each time the loop goes through).
What would be ideal is if p could become an array, the contents of which match the values that j has passed though during the loop cycle.
I thought var p = new Array (j); minght do the trick, but obviously not...
View 4 Replies
View Related
Mar 17, 2010
See example at: [URL]. I want the thumbnails in 2 columns, not 1. Here is the javascript:
Code:
function ImgColumn() {
var str = '';
for (var i=0; i<imgArray.length; i++) {
str += '<div onMouseOver="Enlarge('+i+')">';
my_pic = 'mypic'+i;
// my_src = imgArray[i][0];// not used here
str += '<IMG id="'+my_pic+'" SRC="'+imgArray[i][0]+'" value="'+i+'"';
str += ' alt="'+imgArray[i][1]+'" BORDER="0" HEIGHT="70" WIDTH="70"><IMG SRC="images/spacer.gif" BORDER="0" HEIGHT="1" WIDTH="10"><br>';
str += '</div>';
} return str; }
And the HTML:
Code:
<table width="200" height="400" border="0" cellpadding="0" cellspacing="0">
<tr> <td><script type="text/javascript">
document.write(ImgColumn());
</script>
</td>
</tr>
</table>
View 14 Replies
View Related
Jul 30, 2011
I am starting to learn javascript and have been trying to make a image gallery. I was hoping to take an array of src and create a link for each one which when clicked on changes the src of an already existing img.My question though is how would I make the buttons for the numbers.I feel like a loop would work for this but I just can't seem to figure it out. I don't know how far off I am in thinking that through a loop I could create functions with a name plus the i variable.And in each function there could be something like:
Code:
document.images["destination"].src = images[i]
That would then produce an <a> with the href equal to the function name + "i" with the title being "i" as well.
Am I way off? How would I execute that? A little explanation about my code. I am going to be using a loop to add the images that will vary in amount for each page that is why I have the push function just for this test. And the document.ready is because I've been using some jQuery.
Code:
<script type="text/javascript">
$(document).ready(function(){[code]...............
View 2 Replies
View Related
Mar 17, 2010
See example at: [URL]I want the thumbnails in 2 columns, not 1. Here is the javascript:
[code]....
View 1 Replies
View Related
Jul 22, 2009
I have string and array:
text = "xxxxxxonexxxx"
array = ["one", "two"]
I need
if (text.match(array)) {...}
But it does not working. How can I check this?
View 1 Replies
View Related
Jan 11, 2011
I get a XmlHttpRequest responseText from a AJAX JSON call. This is a string. I created an example:
var testString = "{'desc':'text1','name':'text2'}";
$.each(testString, function(key, value) {
alert(key+': '+value);
});
[Code].....
Instead I get every char of the string each in one alert message. How can I transform the String to an Array, or get in this case the two key-value pairs?
View 1 Replies
View Related
Oct 6, 2011
I can't alert the history array of the index page or use that arrays indexOf to read and write it to go back to predetermend conditional index of that array? If I could alert the history array and read the array elements then I might be able to write and go to one of the history array elements specificaly? So I might be able to use window onload to create an array that stores the classname of a div every time the divs classname is changed then go back in page history to the classname specified? code...
View 8 Replies
View Related
Aug 11, 2010
I'm trying to make a link harvester for this Chatroom. Because my friends post way too many links and I never get to view them all. So I was trying to make something to fix that.
Html is roughly:
My javascript was:
I want to make sure that I'm not saving the same links over and over. So I want them to check through the array first. But I keep getting the value undefined.
The chat site is: [url] If that matters.
View 1 Replies
View Related
Oct 16, 2010
I have JS object w/ following structure:
PHP Code:
json_data_object.422.name
thta should of out put me "hello world" as it is what it is in array but it does not as there is 422 there That's my ID from database, and I gotta use itNow, if I change that ID to something in letters say to "i" then everything is fine. ex
PHP Code:
json_data_object.i.name
That one would work, but then I have to chnge JSON string thta pulls data from DB and i cant really do that...So the question is how can I make 422 (numbers) works the same way as just string values in the array/object tree?
View 4 Replies
View Related
Aug 30, 2010
I have an array like this:
I need to compare these array items to my site div id's and make an onblur functionality that changes the input field value.
It does not change the selected input field value(this.value). And it only alerts when blurring from the input field that is first in the array(id1). If i click to the input field id="id2" it does not alarm?
View 2 Replies
View Related
Sep 14, 2011
im trying to make a program that passes an array to a method. the method then finds the smallest number in the array and passes that number back to the main where its printed out. I am getting an error saying: "error: number cannot be resolved to a variable". I am using drjava. here is my code.
import java.util.*;
public class homeWorkTwo{
public static void main(String[] args)[code].....
View 6 Replies
View Related
Jan 27, 2010
My objective is to make a map that lets the user click the map to make a pin and write a description. Like this [URL]
View 13 Replies
View Related
Dec 8, 2011
I have several classes named 'ratings_colored'. They all contain a number from 1 to 10. If the number is below 5.5, the number should become red. If not it should become green.
The code below works, but if the first .ratings_colored is higher than 5.5 it will make ALL the classes green. Even the numbers below 5.5! I tried using the 'this' but it didn't work either.
$(document).ready(function () {
View 2 Replies
View Related
Dec 2, 2009
How Can i take this to make a default empty value and force users to make a decision?
<select id="preservetitletest"
name="titletest"
dojoType="$testWidget"
style="width:50%;font-family:Courier;"
[Code]....
View 1 Replies
View Related
Mar 2, 2009
I want to create an associative array dynamically pulling the index values from an array (propertyArray); Associative array is created inside create function and then returned. But after it is returned, I cant use index names to retrieve values. It returns undefined as below code shows.
Code JavaScript:
var propertyArray=["a","b","c"];
function create(){
var array=[];
[code]....
View 2 Replies
View Related
Jan 21, 2011
Modifying my code:
I have this C# code that is connecting to database and creating a array(list)
Code:
I'm trying to pass it to a javascript function so I can then pass it to a silverlight page so I was able to create this easy javascript that show a aleart box on startup of the list(array)
Code:
But I want to do something like this and can't get it:
Code:
View 2 Replies
View Related
Feb 15, 2011
I am trying to understand somecode. I don't think I am understanding everything correctly. Can someone confirm or add to my understanding?
Here is the code, below is my explanation:
- CODE 1 - is saying if the the class subnav_dd is called on an anchor tag on a li, then make the function in the if statement "live". (Live in a sense binds the function to the condition, but unlike bind it allows the condition to be used more then once. ) So if the class subnav_dd is the parent, and has a class of .dis then prevent anything below it from firing. CSS - If code 1 is true, then I will only get the first li to fire, the remaining ones will not.
- CODE 2 - This one is a little tricky. Function ToggleOptions takes 3 variables (target, array, state). The condition is if the div subnav + target have siblings, then check to see how many siblings are there. Put the amount of siblings into an array, then check the state of each sibling. I don't completely the rest of it.
I think if the div subnav is called and something is found in the array then the class dis is either added or removed. Then what? I don't understand why I still need the else that adds a class to #subnav_ +.target
View 1 Replies
View Related
Sep 17, 2010
What is the correct syntax for an nested array where each array element has 3 elements, a number and two text strings?
Code:
array = ['1, Old Man, Old Man','2 Black Sheep, Black Sheep',....]
should the text strings be in double quotes("")?
Code:
array = ['1, "Old Man", "Old Man"','2 "Black Sheep", "Black Sheep"',....]
View 3 Replies
View Related
Apr 25, 2011
I am really hoping someone is willing to take the time to read this post and take a minute to take a look at my code. What is happening is there are some matches for a script I made and then an area for segments during an event. If you notice on the segment part of the form is that there is a dropdown that asks for where in the event that segment needs to go. With the Introduction or the different numbered matches. What I need to happen for a subArray I need it to take the introduction, all the matches, and all the segments and order them accordingly. With the introduction first, the matches in order based off there match number and then the segments in between the introduction or matches based off the user's input.[URL]..
View 7 Replies
View Related