June 26, 2004

Passing a variable to any page by clicking a link

I am working on a game which requires people to log in by selecting whichever team they are on. Each team is made up of several departmental units.

People probably won't know what team they belong to the first time they play. There is no list of all the potential players, so it isn't possible to automatically associate users with teams. So we constructed an entry page which lists all the departments and which teams they belong to. People find their department, and are automatically associated with a team.

It required creating a little script to pass the name of the team along to the game login page.

Presumably people WILL know what department they are in, and will be able to select their team in that manner.

The problem was, the team name has to be passed to Questionmark Perception's login page, since it requires the team name to send whatever points are earned to the appropriate team.

I used the following javascript to set a hidden field "GROUP" on Questionmark's login page, when a player clicks the team link on the Entry page.

The team link opens the login page then passes the variable, so they can type in their name and start the game. I probably could have had the script submit both name and group through the login page, but decided against it. The login page is the only one that can pass the variable to the game - there are security features that ensure it only comes from that page. And I wanted them to be properly awed by the cool graphics on the login page.

Each team name link is set up like this:

Posted by ellen at 10:03 PM

June 16, 2004

Retrospect 5 for Mac won't see files on Samba Shares in Panther

Apparent solution: upgrade to Retrospect 6 - it sees the files again, but then I have been getting Assert Error 1582 on starting the backup. Looking at the Dantz Knowledgebase, it says to patch Retrospect with their driver upgrade for Retrospect 6 - Driver Update 5.4.104. Turns out there is some issue with having more than 2 gigs of RAM and Retrospect.

I'll be patching soon, and will post the results.
I need to backup my PC drive, so I hope it works!

Posted by ellen at 11:31 AM

Swap style sheets in iFrame contents based on parent window size

Link to this javascript in the head of the iFrame content document (the child document).

if (window.parent.screen.height >= 700) { document.write(''); } else { document.write(''); }

Of course this could be used for redoing the styles of the iFrame contents based on any other property of the parent document as well. For example you could say

Parent.document.body.some.property= 'a value"
instead of
window.parent.screen.height
Posted by ellen at 11:24 AM

Scroll wheel changes selection in drop-down menus

In some of the Questionmark quizzes I've made there are "selection" questions, which are simply pull down menus with several possible answers to a question. I started getting emails from scroll wheel users complaining that Questionmark was changing their answers.

It turned out users would make a selection, then immediately start scrolling the wheel without deselecting the menu, so the scroll wheel would scroll within the menu. I didn't want to disable the scroll wheel or something like that, so I looked for a way to jump the cursor out of the menu when something is selected.

 
# #redefine selection question to remove scrollwheel problems
SEL=
%START_sel%
<TD>
%CHOICE.CONTENT%
</TD><TD>
<INPUT TYPE=HIDDEN NAME="%QUESTION.ID%" VALUE="%CHOICE.ID%">
<SELECT NAME="%CHOICE.ID%" %DO_SEL% onchange="self.focus();" onfocus="options[0].selected = true; return false;" tabindex="-1">
<OPTION VALUE=""></OPTION> # empty option
%CHOICE.OPTION%
</SELECT>
</TD>
%END_sel%

# # this is the definition of DO_SEL, which already includes an onChange statement, so if I were using QXQ, I would remove the variable and replace it with a javascript where both scripts are combined in one onChange statement. But for the moment I don't need to worry about that.

DO_SEL=
_IF %USE_QXQ% = 1
onChange="DoChange(%QUESTION.NUMBER%,this); "

Thank you to tommy916 on the devshed forums for the javascript: Unfocus on drop down list

Posted by ellen at 11:00 AM

June 8, 2004

The Wacom Tablet and Fireworks MX 2004

Macromedia vector applications- Fireworks and Freehand - all seem to share problems with the Wacom tablets and have for quite a while. It used to be that the problems with Freehand and Fireworks could be fixed by setting the button on the pen tool to be ignored, but now that does not do the trick. Apparently Macromedia is aware of this as an "emerging" issue, but has not yet fixed it. I hope they do, since Fireworks MX 2004 is nearly unusable for those of us who are addicted to the tablet.

Update:
Post on the Macromedia forums:

"Download Wacom tablet driver version 4.7.6-3 from the following URL:
ftp://ftp.wacom-europe.com/pub/Mac/mac_x_4.7.6-3_en.sit.hqx

This is an older version of the Wacom Tablet software. To work around the issues discussed in this thread, uninstall the newer Wacom Tablet software, then download version 4.7.6-3 from the ftp URL provided and install it. "
- Marisa
Macromedia Fireworks, QA

Posted by ellen at 10:28 AM

June 4, 2004

Getting back my Windows drive shares on my Mac

I was having this weird problem on the network, and it started suddenly. Everything had been working fine, then suddenly I could no longer connect to my Windows drive shares (from a Win2K box). I could see the server in the finder, but could no longer connect. I would get the error "wrong name or password" with "try again" which would never work.

I'm running 10.3.4 on a Mac in an otherwise totally Windows environment. I need to reach a shared folder on my Windows 2000 computer. I have tried remaking the share, specifying other workgroups in Directory Access on the Mac, and even installing and using Dave which I had not needed since upgrading to Panther. Dave did not help get this share back.

Things got a little messed up when I changed settings too much in Directory Access, and even browsing the network became a dicey proposition for a while, but I got DA back to normal. I finally solved this one after setting it down in frustration for a few days. I did several things, and am not sure which of them actually fixed it:

  1. I turned on Active Directory in Directory Access on the Mac.
  2. I un-installed the checkpoint VPN client from the PC, which I remembered I had installed around the time the network problems started. I had installed it to get some settings off it to use on my home Mac, but perhaps it was interfering with drive sharing.
  3. I remade the shares on the PC being careful to share the entire drive and the folder.
  4. I made sure the share of the drive was not just an administrative share, but the other kind (whatever the heck they call it). So instead of D$ it's D.
  5. I double checked the permissions on the shares to make sure what workgroup and what names were allowed.
  6. On the mac, I connected using "command-K" and then
    smb://my.full.machine.nameandpath/D
    instead of
    smb://my.full.machine.nameandpath/shared_foldername

    where D is the shared drive which contains the shared folder.

  7. When I changed the smb:// path as described above and hit "connect" it suddenly asked for my workgroup, name and password! No more "not found" messages. yay!

    Note 12-2-04: I've found that sometimes spontaneously, windows servers will stop being accessible, unless you use their fully qualified name, not just the network name you would accessing them from a windows box:

    So instead of "cifs://server01"
    you would type "cifs://server01.full.domain.name"


    I hope this helps someone else!

    Another note to people that are having trouble accessing a server: you often need to specify the exact share, for example: yourservname.com/E$ or D$, or you will get "cant be found" errors upon entering your name and password.


    Here are some links to other information that may be helpful with this kind of issue.
    Specifying workgroup in SMB://urls
    Mac OS X and SMB HOWTO
    Auto mount Samba (windows) sharepoints at boot.
    Automounting Sharepoints at Startup
    Avoid error -5000 with SMB from Windows 2003 servers

    Posted by ellen at 8:05 PM

The Story of Eggdrop, Part II

"going UP!"
To read Part I, click here

Eggivation!

After he had been back in the goldfish tank a while, I got the idea that changed Eggdrop's life. I installed a bubbler in the tank to aerate the water at the bottom better, since the tank was pretty tall. One day we looked over at the tank and there was Eggie, shooting up to the top of the tank on a geyser of bubbles. After watching this for a few weeks, I got another idea - give him MORE bubblers. I put a row of four bubblers across one half of the tank's back wall. Eggie took to them like he had been born to fly! He would surf from bubbler to bubbler for hours. When tired, he would sink down and go into a flower pot to sleep.

Eggie stops for a nap

A video of him surfing is HERE

However a side-effect of all that the bubble surfing began to occur. His tankmates had never nibbled on Eggie before, but now that he was in their faces all day long, someone in the tank started chewing on him. We could not tell who it was at first, but Eggdrop's fins started to look pretty ragged. At first we accused Piggum (the orange fantail) and watched him carefully, but it turned out it was actually Tottle that was sneaking midnight chews. I don't think Tottle wanted to hurt Eggdrop, but those shiny fins floating in front of his nose must have looked pretty tasty, and Tottle was always hungry! He was definitely trying out for the Oranda Olympics in the size category. When I figured out that he was eating his brother, I took him out of the tank, and dropped him into another tank with my parrot cichlids.

Ordinarily mixing goldfish and cichlids wouldn't be such a great idea, but Tottle was as big as the biggest parrot cichlid, and twice as thick, so he could take care of himself. After a little pushing and shoving they settled down and accepted him. Meanwhile, back in the goldfish tank, Eggdrop began to float, all on his own, apparently as a result of guzzling so much air from the bubblers, and so we turned them off. In a few weeks, he sank to the ground again.

After a nice long "time-out" period, we put Tottle back in the goldfish tank and he was so grateful to be back, he was good for about a year. But eventually he started chewing Eggdrop's fins again, and we had to move Eggdrop out of the goldfish tank to recuperate.

Eggdrop's new home is a little 10 gallon tank next to the piano. He loves music, and starts wiggling vigorously whenever Chopin is played. Eggdrop's center of gravity changed again, and he now lay on his side all the time, so his mouth could not reach the gravel to forage for food. So, we started hand feeding him cichlid sticks and peas. He would rip the cichlid sticks right out of our hands, so I knew he was very healthy. But he seemed bored with just lying there all day. His bright eyes would follow us as we moved around the living room, but he couldn't move much. I tried putting one bubbler in the tank, and he would scrabble over to it and surf it as best he could, but it didn't go nearly as high as in the bigger tank, so the ride wasn't as much fun.

Finally I put all 4 bubblers in a row again, and started an Eggie renaissance! He began surfing all day long. We'd go upstairs at night, after seeing him "go to sleep" in his corner, then come down at 2am and see him surfing! The constant air guzzling caused him to float again after about two weeks, so we removed the bubblers, since he does not need them to get around. While he is floating, he has the run of the tank since he can use his fins as little "propellers" to push himself around like a toy boat. His big challenge these days is to reach the bottom of the tank to get a piece of gravel to chew with. He manages to do this about 5 times a day with a superhuman effort, after which he shoots back to the surface like a cork! To make it easier for him I put in a "feeding station" where he can reach the gravel more easily.

At first when he began floating, I panicked because I was worried he might get dropsy, which claimed poor Tottle a few months ago. But it turned out that Eggdrop was fine, with no signs of infection. He just can't get rid of all that air right away. He is now starting to sink down, and rises to the top more slowly after getting gravel.

Eggdrop in his feeding station

Update: It took a few weeks, but Eggdrop finally sank all the way to the bottom, so I decided to "gas him up" again. I put one bubbler back into the tank, and he immediately hopped over to it on his nose, and sat on top of it, as if to say "I'm waiting to fly!" With only one bubble stream, it took him a while to catch the bubbles under his fins and tail, but he finally shot up to the top of the tank, and then slowly drifted down. This morning I came in, and he was floating up at the top of the tank again - he must have been sucking on bubbles all night!






Posted by ellen at 12:39 PM