[Proto-Scripty] Re: Help needed, its got to be simple

2010-07-15 Thread Zortag
Thanks, TJ. Especially for the explanation and the pointers, that "this" is not automatic clears up a lot. On Jul 15, 5:41 am, "T.J. Crowder" wrote: > Hi, > > > Why does the function "quotes" (within the class) fail when the exact > > same function "dquote" (outside the class) works fine. > > Th

[Proto-Scripty] Re: Help needed, its got to be simple

2010-07-15 Thread T.J. Crowder
Hi, > Why does the function "quotes" (within the class) fail when the exact > same function "dquote" (outside the class) works fine. The function's fine; what's happening is that you're trying to use an undefined symbol (in `doc_name`, `quotes` is undefined). `this` is *never* implicit in JavaScr

[Proto-Scripty] Re: Help Needed !

2009-10-29 Thread T.J. Crowder
Hi, > ...i cudnt > find a COMPLETE WORKING example. The API docs for Class[1] have one (an "Animal" class and a "Snake" class that derives from it), but ignore the links they have to the "tutorial on classes and inheritance", it's out of date and misleading if you're using version 1.6. [1] http

[Proto-Scripty] Re: Help needed

2008-11-28 Thread jason maina
Finally it works after creating another function to update div but with a delay that was the result now its ok On Fri, Nov 28, 2008 at 1:49 PM, jason maina <[EMAIL PROTECTED]> wrote: > Hi guys/gals, > > I have made a select control used by 3 different pages but create from the > master page b

[Proto-Scripty] Re: Help needed

2008-11-21 Thread jason maina
Thanks for the contribution. Finally have it working! While indexing the rows i inserted leading & trailing single quotes to the index, must have been absent minded then, that was the problem. Fixed it now its working. Once again thanks for the input, gave me hope solution was on the way. Regards

[Proto-Scripty] Re: Help needed

2008-11-21 Thread Matt Foster
Hmm, I've double checked this idea, I have no problems with replacing a TR element. > element.parentNode.replaceChild(content, element) => element is null I'd have to make the assumption that your trId value doesn't correlate to an ID of any element in the document. On Nov 21, 12:06 pm, "jas

[Proto-Scripty] Re: Help needed

2008-11-21 Thread jason maina
Thanks kangax, Element#insert is not appropriate because im not adding to the table im replacing a whole row which is indexed with controls to facilitate editing of the data that was in that position, however, in another similar situation I've had to clear the tbody section loop through a json obj

[Proto-Scripty] Re: Help needed

2008-11-21 Thread kangax
On Nov 21, 4:28 am, "jason maina" <[EMAIL PROTECTED]> wrote: > [code] > $('tableID').down('tbody').replaceChild(trID, tr) > > error: > uncaught exception:[Exception... "Could not convert JavaScript argument arg > 1 [nsIDOMHTMLTableSectioElement.replaceChild]" nresult:"0x80570009 > (NS_XPC_BAD_CONV

[Proto-Scripty] Re: Help needed

2008-11-21 Thread jason maina
[code] $('tableID').down('tbody').replaceChild(trID, tr) error: uncaught exception:[Exception... "Could not convert JavaScript argument arg 1 [nsIDOMHTMLTableSectioElement.replaceChild]" nresult:"0x80570009 (NS_XPC_BAD_CONVERT_JS)" location:"JS frame :: http://projectpath/myfile.js:: flirtFert ::

[Proto-Scripty] Re: Help needed

2008-11-20 Thread kangax
On Nov 20, 2:37 pm, "jason maina" <[EMAIL PROTECTED]> wrote: > $('tableID').down('tbody').replaceChild(rowID, newTr); > Not working, Element.replace(rowID, newTr) generating errors have run > out of ideas. [...] Yes, tables are a PITA. Which errors do you get? If it's not working - it's a bug. Wo

[Proto-Scripty] Re: Help needed

2008-11-20 Thread jason maina
$('tableID').down('tbody').replaceChild(rowID, newTr); Not working, Element.replace(rowID, newTr) generating errors have run out of ideas. On 11/20/08, Matt Foster <[EMAIL PROTECTED]> wrote: > > What is going wrong with your current approach, should be no reason > you can't generate a new TR elem

[Proto-Scripty] Re: Help needed

2008-11-20 Thread Matt Foster
What is going wrong with your current approach, should be no reason you can't generate a new TR element and replaceChild on the tbody object... On Nov 20, 11:46 am, "jason maina" <[EMAIL PROTECTED]> wrote: > Hi, > > Is it possible to replace a whole row with new data/controls without > interfe

[Proto-Scripty] Re: Help needed

2008-11-20 Thread jason maina
Hi, Is it possible to replace a whole row with new data/controls without interfereing with the other part of the table. I have different sections in the table in question so i just want to change an indexed row. Trying to get the same effect as inplace editor but affecting a whole row instead of a

[Proto-Scripty] Re: Help needed

2008-10-21 Thread T.J. Crowder
Hi Jason, I'm afraid that loading that child page into a div on the parent page produces an invalid DOM tree, a document in which an ID is not unique. Gratuitous specs link: http://www.w3.org/TR/REC-html40/struct/global.html#h-7.5.2 Now, I'm not saying you won't get away with it a lot of the ti

[Proto-Scripty] Re: Help needed

2008-10-21 Thread jason maina
[code] parent page Some text child page(loaded in a div) Child some text [/code] [css] #tablist{ padding:3px 0; margin-left:0; margin-bottom:0; margin-top:0.1em; font:bold 12px Verdana, Arial, Helvetica, sans-serif; border-bottom:1px solid gray; } #tablist li{

[Proto-Scripty] Re: Help needed

2008-10-20 Thread T.J. Crowder
Hi, > considerations: 2 ul elements sharing id because of css styling. Not really, right? You mean they're sharing the same class or some such? You can't have two elements on a page with the same ID; IDs are required to be unique across the DOM. FWIW, -- T.J. Crowder tj / crowder software / c

[Proto-Scripty] Re: Help needed

2008-10-20 Thread kangax
On Oct 20, 7:40 am, "jason maina" <[EMAIL PROTECTED]> wrote: > [code] > function monitorMgr(){ > var myLi=$$('ul.flMgr > li'); > myLi.each(function(liItem){ > Event.observe(liItem, 'click', anFunction, false); `Event.observe`'s last argument - useCapture - is now deprecated (in 1.6), so you can s

[Proto-Scripty] Re: Help needed

2008-10-20 Thread darrinholst
> function anFunction(evt){ > alert($(evt).id);} you are trying to get the id of the event object here (which it undefined). I think what you want is the element that the event was fired on -- evt.element().id Darrin --~--~-~--~~~---~--~~ You received this messag

[Proto-Scripty] Re: Help needed with element.offsetHeight

2008-10-06 Thread Brian Williams
or i could just use Prototype.Browser.IE der... sorry, too many projects to memorize the API for everything... thanks for the help On Mon, Oct 6, 2008 at 11:01 AM, Brian Williams <[EMAIL PROTECTED]>wrote: > Kangax, thanks for the info on Position; however having made that change > didn't affe

[Proto-Scripty] Re: Help needed with element.offsetHeight

2008-10-06 Thread Brian Williams
Kangax, thanks for the info on Position; however having made that change didn't affect my issue. using javascript:alert(document.compatMode) confirms that ie6 is in compatibility mode. I can only assume that it is being affected by CSS inheritance -- for how I have hard coded top and left through

[Proto-Scripty] Re: Help needed with element.offsetHeight

2008-10-04 Thread kangax
On Oct 3, 6:14 pm, "Brian Williams" <[EMAIL PROTECTED]> wrote: > hey everyone, yeah, i know this is a stupid newb questions, but it seems to > be slipping my mind. > > I have ye olde code using ye olde version prototype 1.6.0.2 > > var pos = Position.cumulativeOffset(element); > landing.style.top