Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] To DOM or not -- calendar popup
- From: sclay at ufl.edu (Steve Clay)
- Subject: [Javascript] To DOM or not -- calendar popup
- Date: Wed Mar 29 13:43:10 2006
Wednesday, March 29, 2006, 1:58:48 PM, Bill Moseley wrote:
> 2) or in the script search for the input field and then append the
> <img> to the field's parent node list?[1]
var myInput = document.getElementById('myInput');
var myImg = document.createElement('img');
if (myInput.nextSibling) {
myInput.parentNode.insertBefore(myImg, myInput.nextSibling);
} else {
myInput.parentNode.appendChild(myImg);
}
If you use an anchor (around the img) this could be keyboard accessible (if
the calendar widget is).
Steve
--
http://mrclay.org/
- Follow-Ups:
- [Javascript] To DOM or not -- calendar popup
- From: Nick Fitzsimons
- [Javascript] To DOM or not -- calendar popup
- References:
- [Javascript] To DOM or not -- calendar popup
- From: Bill Moseley
- [Javascript] To DOM or not -- calendar popup
- Prev by Date: [Javascript] dom question
- Next by Date: [Javascript] To DOM or not -- calendar popup
- Previous by thread: [Javascript] To DOM or not -- calendar popup
- Next by thread: [Javascript] To DOM or not -- calendar popup
- Index(es):