> document.ElementById has a bug in ie6 and ie7 that will return an
> element with a name attribute of the same value. Use $('#today')
> instead.
Got it. Thanks!
> todayEl.innerHTML = "something" can cause memory leaks if events are
> added to DOM objects inside of todayEl and then just written
> ...what is wrong with just having:-
> var todayEl = document.getElementById("today");
> todayEl.innerHTML = formatDate(new Date);
document.ElementById has a bug in ie6 and ie7 that will return an
element with a name attribute of the same value. Use $('#today')
instead.
todayEl.innerHTML = "so
> If you want to format a local date, . . .
>
> var todayEl = document.getElementById("today");
> todayEl.innerHTML = formatDate(new Date); // [1]
> [1]http://www.jibbering.com/faq/#formatDate
This also worked, but produced a format very different from that
required by the context in which the
Thank you for the warning with regard to the use of the document.write
statement and the alternative format for writing text to an HTML
document. It will likely prove invaluable in the future.
Roddy
With minor modifications I was able to achieve my goal with the sample
code that you provided. So that I do not feel compelled to ask this
question could you confirm or disconfirm whether the below statement
is correct.
In order to create a jQuery method from a JavaScript function not
encoded i
On 14 Apr., 19:15, dhtml wrote:
> > problem is that that Dreamweaver method is using document.write which
> > can cause a problem depending on where the function is being called
> > and which is usually avoided in jQuery land.
>
> Calling document.write in a jQuery ready callback won't work
> con
On Apr 14, 8:58 am, Klaus Hartl wrote:
> On 14 Apr., 15:41, MorningZ wrote:
>
> > So what is the error
>
> The error is obviously that toDate is not a jQuery method. Another
Right.
> problem is that that Dreamweaver method is using document.write which
> can cause a problem depending on wher
Your calling toDate() as a method on the jQuery object, which it
isn't; it's simply a function that prints out the date (and you should
maybe rethink the document.write, it's deprecated). If you want the
output to appear as the content of the element with id 'today' then do
something like
$("div
On 14 Apr., 15:41, MorningZ wrote:
> So what is the error
The error is obviously that toDate is not a jQuery method. Another
problem is that that Dreamweaver method is using document.write which
can cause a problem depending on where the function is being called
and which is usually avoided in j
So what is the error?
And realize something: jQuery *is* JavaScript, don't think of it like
two different things
On Apr 14, 4:21 am, kiusau wrote:
> I am new to jQuery, but understand enough to have already begun
> targeted experimentation. I have run into a snag. In brief, I am
> trying to
10 matches
Mail list logo