[jQuery] Re: Javascript question.

2008-11-09 Thread George
I guess I figured it out myself :) function GetD(tb) { $this = document.getElementById(tb); var obj = new MyData($this); return obj; } function MyData(tb) { this.init(tb); } MyData.prototype = { init : function (tb){ this.div = tb; this.refresh(); },

[jQuery] Re: Javascript question: Get elementid inside an element

2007-06-02 Thread Mark
it`s unlikely but possible for an id to be in the page for more than once.. i will try to avoid it :) And thanx for the reply`s. it has been very helpfull. 2007/6/1, Sean Catchpole <[EMAIL PROTECTED]>: As stated, the document.getElementById will only work on document, and will only return the

[jQuery] Re: Javascript question: Get elementid inside an element

2007-06-01 Thread Sean Catchpole
As stated, the document.getElementById will only work on document, and will only return the unique id. It is in fact very bad practice to have multiple id's and it is not unreasonable for javascript to fail if there are more than one. Just use a class instead of an id if there needs to be multip

[jQuery] Re: Javascript question: Get elementid inside an element

2007-06-01 Thread March
getElementById() is an Document object method, doesn't belong to Element object, so can not use it as Element.getElementById(); maybe you can do it like this (without jQuery): var children = document.getElementById('001').childNodes; for(var i=0;i wrote: > Could you also post the non jquery code

[jQuery] Re: Javascript question: Get elementid inside an element

2007-06-01 Thread Mark
Could you also post the non jquery code? (i just would like to know :)) 2007/6/1, Juha Suni <[EMAIL PROTECTED]>: Well id's really should always be unique. But if you really want to do this, try: alert($('#001').children('#0011').html()); - Original Message - *From:* Mark <[EMAIL PR

[jQuery] Re: Javascript question: Get elementid inside an element

2007-06-01 Thread Juha Suni
Well id's really should always be unique. But if you really want to do this, try: alert($('#001').children('#0011').html()); - Original Message - From: Mark To: jquery-en@googlegroups.com Sent: Friday, June 01, 2007 5:22 PM Subject: [jQuery] Javascript question: Get elementi

[jQuery] Re: JavaScript question (don't think it's jQuery related)

2007-05-31 Thread Brian Ronk
I'm positive that finishNote is running. I put in an alert before the parseNote, and even inside parseNote, and those run. I get the alert right before the return in parseNote even. I have tested in FireFox with Firebug, and I haven't seen any errors as of yet. Here is a copy of the data I got

[jQuery] Re: JavaScript question (don't think it's jQuery related)

2007-05-31 Thread Rob Desbois
Can you / have you tested it with Firefox & Firebug? Can you provide an example of the JSON data? Are you certain that the finishNote function is being executed? I'm just thinking that it may be that the JSON data is malformed in some way and that jQuery is failing before it gets called. One thin