I wouldn't consider myself a newbie, but this problem is making desire
nothing more than a sledgehammer and enough money to buy a new computer
(but don't kill the messenger, I suppose).
I'm trying to make a site-specific javascript prompt box. That is, I
need to get info from the user when they click a link to activate an
AJAX function. I was using a simple prompt() to get it, but then I
looked at my site in aIEe and realized what a POS prompt box they had
going. So I decided to make my own, and my troubles began.
The box actually works flawlessly, even if the code is a garbled mess,
and here's what happens:
1) user clicks link
2) box pops up
3) user enters data
4) box disappears
The box is a DIV, and I'm loading a DIV inline in the HTML, and then
using javascript to build the content. The DIV itself has been
repositioned via CSS.
Here's the problem: the DIV is taking up space in the table it's a
child of. That is, there is an empty DIV of 0x0 pixels when the page
loads. When the page loads, the DIV is repositioned elsewhere. After
the page loads, some javascript comes in and gives the DIV content,
stretching it. At this point, the DIV begins taking up space at its
original place of residence.
Result: pain; suffering; etc.
Here's a link to the site:
http://www.routeslipper.org/testbin/nodes/nodes.new.php
The bug is on line 63 in the code (just south of the first big JS
block). Unfortunately, it's all (as I said) a garbled mess, as I'm
stupid in my use of tables (need to wean...), so rather than Ctrl+C
Ctrl+V a line in here, I figure it's best just to provide context.
The box pops up when you click "quick zoom". Try "palo alto, ca" if you
want the map to do something.
SERIOUS NOTE: this thing is no problem in Firefox. It was, but then I
height:0px'd it. Wooo, bootstrapping.
The way I see it, I'm overlooking something painfully obvious. As of
right now, I'm just hoping the answer isn't, "Well, you need to
restructure the page."
Thanks for the help, and happy new year.