lance_sibley: (Hold Me - by Raelala)
[personal profile] lance_sibley
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 [livejournal.com profile] 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.

Date: 2006-11-16 06:52 am (UTC)
From: [identity profile] minotaurs.livejournal.com
Check your browser privacy settings - that can fuck with cookie placement. So can expiration times.

Date: 2006-11-16 10:16 am (UTC)
From: [identity profile] boywhocantsayno.livejournal.com
Thanks - I checked, though, and my privacy settings were set to allow cookies.

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.

Date: 2006-11-16 04:52 pm (UTC)
From: [identity profile] minotaurs.livejournal.com
Hmm, maybe the Javascript can't access the form elements until the form is finished being created? Have you tried putting the Java after the /form tag?

Date: 2006-11-18 08:10 am (UTC)
From: [identity profile] boywhocantsayno.livejournal.com
That's what I ended up doing, and it worked. Thanks.

And my C# instructor showed me how to use GetElementByID last night, when I showed up early for class.

Date: 2006-11-16 06:01 pm (UTC)
From: [identity profile] thegrandepoobah.livejournal.com
Firefox stores cookies in:

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. :-)

Date: 2006-11-16 06:03 pm (UTC)
From: [identity profile] thegrandepoobah.livejournal.com
Darn < and >'s

This is how that should read:

C:\Documents and Settings\<windows_username>\Application Data\Mozilla\Firefox\Profiles\<profile_name>

Date: 2006-11-18 08:14 am (UTC)
From: [identity profile] boywhocantsayno.livejournal.com
Weird - I still couldn't find any files there, though the console shows that the cookie exists. I wonder if it's because I'm loading the page directly off my C drive, rather than uploading it to my webspace? I understand that cookie files are usually named something with the URL of the site embedded - if there's no URL, it obviously can't do that.

Date: 2006-11-18 08:19 am (UTC)
From: [identity profile] thegrandepoobah.livejournal.com
On my machine it looks like all of firefox' cookies are stored in the cookies.txt file in that directory.

Not sure about how reading the file off the local drive would effect things.

Date: 2006-11-18 10:51 am (UTC)
From: [identity profile] boywhocantsayno.livejournal.com
Yes, I do have a cookies.txt file. It's pretty unreadable, though, with a lot of funky codes in it, so I'm not sure whether or not my cookie is actually included (though since it's listed in the console, I can only assume that it is).

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.

Date: 2006-11-16 03:38 pm (UTC)
From: [identity profile] eviljade.livejournal.com
On the subject of kitchen related things exploding:

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.

Date: 2006-11-18 08:16 am (UTC)
From: [identity profile] boywhocantsayno.livejournal.com
Oh my. Do you know what caused it? Was it just an old stove, or was there something else at work? (I hope it's not the reverse, where the Hamburger Helper had eaten partially through the skillet and the grease set off the element - I tend to eat HH at least once or twice every other week on average. I'd hate to think of what it was doing to my stomach...)

Profile

lance_sibley: (Default)
lance_sibley

June 2009

S M T W T F S
 123456
78910111213
14 151617181920
21222324252627
282930    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 10th, 2025 04:23 pm
Powered by Dreamwidth Studios