The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

thartdyke (6) [Avatar] Offline
I've been tearing my hair out for the last few days trying to get the typeahead suggest example to work properly in Firefox ( Windows). The following section from listing 10.14 was causing errors:

... = selectedPosX';
if(theTextBoxInt.obj.matchTextBoxWidth) = theElemWidth; = selectedPosY + theElemHeight;
... etc.

The assignments for .left, .width and .top would fail, causing error reports in the Javascript console, and the drop down would be positioned at the top left of the screen.

It turns out Firefox (at least my version) insists on units. The following fixed my problem: = selectedPosX + 'px';
if(theTextBoxInt.obj.matchTextBoxWidth) = theElemWidth + 'px'; = selectedPosY + theElemHeight + 'px';

IE and Opera seem to be happy with either, but I would think that having the units would be more 'standards compliant', hence Firefox's fussiness.

Pascarello (208) [Avatar] Offline
Re: Typeahead CSS in Firefox
Yes you are right, Firefox needs the units. I willl add that to the Errata.