second floatbox and IE7

Page: 1

Author Post
theprodigy
Guest
I have floatbox working perfectly in FF3 and Safari, but for some reason in IE7 I can't get it work bring up a second floatbox. It keeps loading it in the float box that is already there.

The setup:
It's a registration form, that once you pick a state from the drop down, a hidden table row becomes visible. This hidden table row has a dynamically populated drop down and a link. The link opens another floatbox with a form in it to add something to the drop down that became visible. In FF3 and Safari, this works perfectly. In IE7, the link makes the new form show up in the current floatbox, not create another one.

The site:
The site is KollegeLife. Click the big red Register button. This brings up the first floatbox. In the form that appears, select a state from the drop down. This will make the colleges drop down and a link appear. Click on the link. In FF3 or Safari it brings up a new floatbox, in IE7 it shows up in the current floatbox.

I'd appreciate any help you can offer. Thanks!
Administrator
Registered: Aug 2008
Posts: 3382
This looks like an IE bug. It appears to be failing to return that particular anchor when floatbox's tagAnchors routine requests getElementsByTagName('a').

A possible workaround might be to try changing the problematic anchor from:
<a href="/login/add_college" rel="floatbox" rev="width:375 height:275 outsideClickCloses:false enableKeyboardNav:false">College Not Found?</a>
to:
<a href="/login/add_college" onclick="fb.loadAnchor(this); return false;" rev="width:375 height:275 outsideClickCloses:false enableKeyboardNav:false">College Not Found?</a>
theprodigy
Guest
still not working. IE is still putting it in the same floatbox and FF3 and Safari are still opening in new floatboxes.

Your code seems to work on your demo page, but not on my page.

The only differences I can see are the outsideClickCloses and the enableKeyboardNav attributes. I have them in my code but you don't have them in your demo. Could these be affecting it somehow?

Thanks
Administrator
Registered: Aug 2008
Posts: 3382
I can't see those two options having any effect.

Another experiment you could try is adding "sameBox:false" to the rev tag.

I'd like to tear into this a bit and see what's going on. It's bad behaviour for sure, and behaviour that I've not seen before. What would you think of pointing your floatbox includes to my test server for a while so I can try to debug what's going on? This would entail having all your floatbox.js and floatbox.css include lines point to http://test.randomous.com/floatbox/floatbox.[js|css]. I would have time to bang on this around 6:30pm or so today (Pacific Standard Time, about 4 hours from now).
theprodigy
Guest
sameBox:false did not work. I have pointed both the javascript and the css files for all three files (login, register, add_college) to the files on your server. I really appreciate your help in this matter.

I won't be around much longer today, so if you find anything, I won't be able to get to it until 8am tomorrow (Eastern Standard Time).

Once again, thanks for your help.
Administrator
Registered: Aug 2008
Posts: 3382
Found it.

I was way off the mark, and you were spot on. enableKeyboardNav:false was the trigger.
Patch the floatbox.js as follows:

Near the bottom of the addEventHandlers function is a block that looks like this:
	} else if (document.keydownSet) {
document.onkeydown = this.priorOnkeydown;
document.keydownSet = false;
}

Insert "|| null" as follows:
	} else if (document.keydownSet) {
document.onkeydown = this.priorOnkeydown || null;
document.keydownSet = false;
}


And near the top of the "end" function, add the "|| null" bits to this block of code:
		if (document.keydownSet) {
document.onkeydown = this.priorOnkeydown || null;
document.keydownSet = false;
}
if (document.keypressSet) {
document.onkeypress = this.priorOnkeypress || null;
document.keypressSet = false;
}


Of course, these changes will be baked into the next release.
Thanks very much for letting me bang on your page to find this. I couldn't have found it without your participation.
(Don't forget to pull your onclick action and go back to rel="floatbox" on that anchor.)
theprodigy
Guest
worked like a charm. Thanks a bunch. You are a life saver!!!

Page: 1