Waste of time? Maybe.
Nov. 7th, 2006 01:51 am![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Tonight, in Internet Scripting Languages, there was no lecture to speak of. The instructor handed out a lab exercise and we spent the entire three hours working on it. Oy.
Apparently, though, I tried to get too fancy... we were supposed to be writing a number-guessing game, where a random number from 0 to 100 is generated. The player has five guesses, and after each one, the Javascript is supposed to return a line of text saying whether the guess was too high, too low or correct and write it to the HTML page. I got bored and started trying to make the input a form rather than a Windows prompt, but apparently the HTML button's onClick method can't access the Javascript variable that contains the randomly-generated number. (What good is that?) There has to be a way...
I've gotten my first assignment done for the class, which is due Wednesday night, though. As described in my last post, it's supposed to be an airline website, with pages for user registration and login, a search page for flights, a page for specific flight information, FAQs, and a panel of advertising. It's here, if anyone wants to have a look. But be warned, it's not pretty. A designer I am not. ;) And since we don't yet know how to link to a database, obviously the data for the search and flight info pages had to be hard-coded just to prove that the functionality to display the information would work. I leave it as an exercise for the reader to find out just what the information is for that one flight. ;) Oh, and it should work in both InternetExploder Explorer and Firefox. I don't know about any other browsers.
Apparently, though, I tried to get too fancy... we were supposed to be writing a number-guessing game, where a random number from 0 to 100 is generated. The player has five guesses, and after each one, the Javascript is supposed to return a line of text saying whether the guess was too high, too low or correct and write it to the HTML page. I got bored and started trying to make the input a form rather than a Windows prompt, but apparently the HTML button's onClick method can't access the Javascript variable that contains the randomly-generated number. (What good is that?) There has to be a way...
I've gotten my first assignment done for the class, which is due Wednesday night, though. As described in my last post, it's supposed to be an airline website, with pages for user registration and login, a search page for flights, a page for specific flight information, FAQs, and a panel of advertising. It's here, if anyone wants to have a look. But be warned, it's not pretty. A designer I am not. ;) And since we don't yet know how to link to a database, obviously the data for the search and flight info pages had to be hard-coded just to prove that the functionality to display the information would work. I leave it as an exercise for the reader to find out just what the information is for that one flight. ;) Oh, and it should work in both Internet
no subject
Date: 2006-11-07 07:42 pm (UTC)no subject
Date: 2006-11-07 08:59 pm (UTC)no subject
Date: 2006-11-08 08:11 pm (UTC)no subject
Date: 2006-11-08 08:39 pm (UTC)