xx********@supergambler.com wrote:
I am writing a function that will create different type of input
ranges, example one function that will create date range inputs with
drop down calendars, another will be for currency ranges, another for
uppercase input, etc.... anyway, the drop down calendar I am using has
a javascript you call after the html of your edit box and object to
click on to drop the calendar....is there a way or is it correct to
say, that if you use innerHtml of the body that it will work, or am I
It may 'work', but you might have other criteria - such as efficiency,
maintainability, compatibility, etc. - not satisfied by innerHTML.
over complicating things and should just call the javascript function
Calendar.setup() passing all the parameters within the javascript that
creates the controls?? Thanks in advance for any advice and
Without knowing your requirements in any detail, it's hard to say what
is best. Presumably a user will select some option or enter some data,
and based on that you will calculate a range. You will then either
build some option lists, or modify some existing lists, that offer
values within the calculated range.
Search through this group for 'dynamic option list'.
In general, manipulation of HTML elements should be done using the DOM,
not innerHTML. There are plenty of quirks when using DOM, and variances
between browsers, but overall it is 'better' than innerHTML.
You may get better responses if you use reasonable punctuation and
formatting. The quality of responses is usually directly proportional
to the effort put into posting.
--
Rob