Mmm, cookies!
Nov. 16th, 2006 01:05 am![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Tonight, the Scripting Languages instructor asked if he was going too slowly, too quickly or just right. When nobody complained, he proceeded to cover two whole chapters in tonight's lecture. Oy. I think my brain exploded. (He confirmed that the midterm is going to be this Monday, so I guess he wanted to get through all of the remaining material.)
Mostly, though, we learned about cookies, the object model, the event model, collections and dynamic HTML. I've had "C Is For Cookie" going through my head all evening as a result. As for the lab exercise, he kicked us out at 9:45, and I still wasn't quite finished - for some reason my webpage isn't storing the cookie it's supposed to be creating, so when I reload the page, it's blank. Argh.
I got home and, while preparing dinner, proceeded to have an incident that could only occur to me - I was thinking that
james_nicoll might have experienced something like this, but there was no physical damage done to my body, so perhaps not. Anyway, I was holding a bag of frozen vegetables when it exploded.
Yeah. Exploded.
Okay, let me explain - when I took the bag out of the freezer, I could feel that there were a couple of clumps which were going to be too big to get out of the hole I'd cut in the top of the bag. I knew that I only had enough left for this one meal, so I could have just cut a bigger hole, but no - I decided to squeeze the clump of frozen veggies to try to break it apart. Instead of breaking apart, however, the entire bag broke apart, and veggies went everywhere. Fortunately, I was holding it over the sink (because it was dripping bits of ice from having been in the freezer), so only a couple of peas ended up on the floor. Also fortunately, the sink was clean, so I was able to rescue the veggies. Including the clump that refused to break.
So, not quite a Nicoll event - that would have been if one of the bits of cauliflower had flown up and taken out an eye - but this is why I spend as little time cooking as possible.
I was going to do a couple of loads of laundry tonight, but I don't feel up to it now. It can wait until tomorrow, even if it means that I have to wear my knee-high woolen socks that I bought a couple of kilt rentals ago.
Mostly, though, we learned about cookies, the object model, the event model, collections and dynamic HTML. I've had "C Is For Cookie" going through my head all evening as a result. As for the lab exercise, he kicked us out at 9:45, and I still wasn't quite finished - for some reason my webpage isn't storing the cookie it's supposed to be creating, so when I reload the page, it's blank. Argh.
I got home and, while preparing dinner, proceeded to have an incident that could only occur to me - I was thinking that
![[livejournal.com profile]](https://www.dreamwidth.org/img/external/lj-userinfo.gif)
Yeah. Exploded.
Okay, let me explain - when I took the bag out of the freezer, I could feel that there were a couple of clumps which were going to be too big to get out of the hole I'd cut in the top of the bag. I knew that I only had enough left for this one meal, so I could have just cut a bigger hole, but no - I decided to squeeze the clump of frozen veggies to try to break it apart. Instead of breaking apart, however, the entire bag broke apart, and veggies went everywhere. Fortunately, I was holding it over the sink (because it was dripping bits of ice from having been in the freezer), so only a couple of peas ended up on the floor. Also fortunately, the sink was clean, so I was able to rescue the veggies. Including the clump that refused to break.
So, not quite a Nicoll event - that would have been if one of the bits of cauliflower had flown up and taken out an eye - but this is why I spend as little time cooking as possible.
I was going to do a couple of loads of laundry tonight, but I don't feel up to it now. It can wait until tomorrow, even if it means that I have to wear my knee-high woolen socks that I bought a couple of kilt rentals ago.
no subject
Date: 2006-11-16 06:52 am (UTC)no subject
Date: 2006-11-16 10:16 am (UTC)I think that the problem was that my script was in the wrong place. I'm looking for the cookie, and if I find it, I'm setting the value of my Name field (in a form on the page) to the value found in the cookie file. However, since the HTML that defined the form fields was being interpreted after the Javascript that was doing this, I was getting an error that "Name is not defined." I don't know why I wasn't getting a popup telling me this - I found the message in the Javascript console in Firefox. (Maybe the popups are an IE thing? We're using IE at school, but I use Firefox here at home.)
Technically, I suppose I could have put the Javascript that looked for the cookie into a function that would be invoked on the onload event of the page... I'm not sure if that's the preferred way or not, though.
Now I'm getting a warning message that I should be using GetElementID instead of referencing the field directly, but it's working.
The other weird thing is that while the cookie is listed when I use Firefox's "View Cookies" function (in the Privacy settings section of Tools/Options), there doesn't seem to be a file in my Temporary Internet Files or my Cookies directories on my C drive. I don't know where it's actually putting the cookie.
no subject
Date: 2006-11-16 04:52 pm (UTC)no subject
Date: 2006-11-18 08:10 am (UTC)And my C# instructor showed me how to use GetElementByID last night, when I showed up early for class.
no subject
Date: 2006-11-16 06:01 pm (UTC)C:\Documents and Settings\\Application Data\Mozilla\Firefox\Profiles\\cookies.txt
(Note that the "Application Data" folder is hidden)
Where good apps store their data. :-)
no subject
Date: 2006-11-16 06:03 pm (UTC)This is how that should read:
C:\Documents and Settings\<windows_username>\Application Data\Mozilla\Firefox\Profiles\<profile_name>
no subject
Date: 2006-11-18 08:14 am (UTC)no subject
Date: 2006-11-18 08:19 am (UTC)Not sure about how reading the file off the local drive would effect things.
no subject
Date: 2006-11-18 10:51 am (UTC)I'm going to have to test it in IE as well, because I'm curious as to whether IE registers cookies differently. (I've noticed a lot of separate .txt files in my C:\Documents and Settings\Lance\Cookies directory, called things like lance@yahoo[1].txt, for example.)
To clarify, it's not that there are no files in my Application Data\... folder, it's that I was expecting to see individual files, with names like the one I mentioned above, rather than one cookies.txt file.
no subject
Date: 2006-11-16 03:38 pm (UTC)Several years back I was making some Hamburger Helper and heard a strange "pop" and there was a little splatter of helper on my face. Weird, I thought. Then I smelled burning food. I thought something had spilled on the cooking element (electric stove). I lifted the skillet and saw the helper dripping from the bottom of it. Turns out the element had actually exploded and had done so with enough force to blow a small hole (about the size of the tip of my pinky finger) through the bottom of the skillet.
no subject
Date: 2006-11-18 08:16 am (UTC)