Okay, first off, I have used inline layers exclusively. I understand that
there are those who don't feel there is a need for inline layers, and feel
that DynAPI is not very inline friendly. I'd have to agree that it isn't
the most friendly.
I use inline layers incase you change your window (or screen) size, in case
you change your font size, incase we add a larger header I don't have to
figure out positioning, and as always, the page is being dynamicly
generated, I don't know how many messages are going to appear before the
layers.
So, here is my problem. I want to create a Date Picker that will show up at
the pointers position when a input box is clicked. You can, ofcourse, enter
the date with the keyboard, or select from the little picker. I figure the
Date Picker doesn't have to be an inline layer, and I could eventually use
the same Picker on more than one input field.
But I can't call it from the onClick event of the input box (which is what I
want to do). So I put the input box in an inline layer, and while I can
call it, I can't get it to show up in the right place. Instead of showing
up at the PageX and PageY, it shows up on the page with the X and Y
coordinates within the inline layer.
I'm not sure if that makes sense, so my test is below. This is actually
extracted from a larger template file I'm using (which I could send).
-----
var InputBox = this.document.getAll()['InputBox'];
InputBox.setVisible(true);
var InputEvent = new EventListener(DynAPI.document);
InputEvent.onclick = function(e) {
var DatePicker = new DynLayer(null, e.getPageX(), e.getPageY(),
100, 100, 'red');
DatePicker.setHTML("Calendar Here");
DynAPI.document.addChild(DatePicker);
};
InputBox.addEventListener(InputEvent);
<div id='InputBox' style='position:absolute;
visibility:hidden;'><input type='text'></div>
------
Travis Garris, Ciber
Winston-Salem, NC
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help