[Proto-Scripty] A better Each

2008-10-06 Thread kstubs
I have a JSON array list, I am matching the Name item against 1 or more items in my match array. Pseudo: for each list.item if item Name contains one and every (must match every item in array) then: TRUE return new item to filtered list Example Data: Apple Martini Gin Martini Slippery Nipple

[Proto-Scripty] IE Problems - chiled element update() deleting parent content

2009-02-01 Thread kstubs
I have a child element. The child element is a container for a message, which is updated by client code using prototype update() method. I actually have 2 identical/similar html li objects, and in the issue is only present in the 2nd of the 2 li objects. These 2 li elements are identified as:

[Proto-Scripty] Re: Observe Document Load extended methods not found

2009-02-22 Thread kstubs
Ignore the fact that I said the update is on a div element, and the object error you see is on a UL element, the failure is the same for both objects. On Feb 22, 3:52 pm, kstubs kst...@gmail.com wrote: I am observing the document load like this: document.observe('dom:loaded', pageReadyEvent

[Proto-Scripty] Help with binding

2009-04-09 Thread kstubs
I am trying to bind a function to it's class, so in the below example I am expecting a result of X Class when I call method test(), instead I'm receiving undefined. I am trying this with and without the bind method for the function. What am I doing wrong? Karl.. var x = Class.create({ name:

[Proto-Scripty] Re: Help with binding

2009-04-09 Thread kstubs
: function() { return this.name; }.bind(this) } Ryan Gahl CEO Nth Penguin, LLChttp://www.nthpenguin.com -- Inquire: 1-920-574-2218 Blog:http://www.someElement.com LinkedIn Profile:http://www.linkedin.com/in/ryangahl On Thu, Apr 9, 2009 at 2:36 PM, kstubs kst...@gmail.com wrote: I am trying

[Proto-Scripty] Re: Help with binding

2009-04-09 Thread kstubs
, kstubs kst...@gmail.com wrote: var func = function() { this.Find(input, event, false); };            func = func.bind(this);            this.timer = setTimeout(func, 300); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[Proto-Scripty] Re: Help with binding

2009-04-09 Thread kstubs
, Apr 9, 2009 at 4:26 PM, kstubs kst...@gmail.com wrote: Well, I've tried a couple of different things, not the bindAsEventListener() yet. So thinking there might be a naming conflict, I opted to change the event parameter name to objEvent.  So now I have:    Find: function(input, objEvent

[Proto-Scripty] Re: Help with binding

2009-04-09 Thread kstubs
Profile:http://www.linkedin.com/in/ryangahl On Thu, Apr 9, 2009 at 4:55 PM, kstubs kst...@gmail.com wrote: var func = function(input, objEvent) { this.Find(input, objEvent, false); }; --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[Proto-Scripty] Re: Help with binding

2009-04-11 Thread kstubs
, 3:52 am, kstubs kst...@gmail.com wrote: So I'm trying to setup the keyup event for my form inputs like this:         this.MSOFindForm.getInputs('text').each(function(input) {             Event.observe(input, 'keyup', this.Find.bindAsEventListener

[Proto-Scripty] Re: Help with binding

2009-04-11 Thread kstubs
references and you need those new functions to be scope corrected via .bind(). Ryan Gahl CEO Nth Penguin, LLChttp://www.nthpenguin.com -- Inquire: 1-920-574-2218 Blog:http://www.someElement.com LinkedIn Profile:http://www.linkedin.com/in/ryangahl On Sat, Apr 11, 2009 at 4:46 PM, kstubs kst

[Proto-Scripty] Insert Adjacent Element

2009-04-19 Thread kstubs
I would like to insert a table-row adjacent to a given table-row. I have tr elements like this: tr id='2349'.../tr tr id='2456'.../tr tr id='2873'.../tr tr id='2294'.../tr so can easily get a reference to my tr element like this: var tr = $('2456'); So how do I achieve an insertion just

[Proto-Scripty] Re: Insert Adjacent Element

2009-04-20 Thread kstubs
That works great, thanks! Where is the insert syntax, specifically the position options described in the documentation? Karl.. On Apr 19, 8:01 pm, Walter Lee Davis wa...@wdstudio.com wrote: On Apr 19, 2009, at 10:25 PM, kstubs wrote: I would like to insert a table-row adjacent to a given

[Proto-Scripty] Re: Insert Adjacent Element

2009-04-20 Thread kstubs
services available On Apr 20, 8:45 am, kstubs kst...@gmail.com wrote: That works great, thanks! Where is the insert syntax, specifically the position options described in the documentation? Karl.. On Apr 19, 8:01 pm, Walter Lee Davis wa...@wdstudio.com wrote: On Apr 19, 2009, at 10:25

[Proto-Scripty] Prototypejs support for the Chrome browser

2009-04-26 Thread kstubs
Does anyone have relevant links or know of relevant discussions regarding this topic: prototypejs support in Chrome. I don't mean to seem misleading if I have the topic not quite right, I just know that my prototypejs code is not working in Chrome. Thanks, Karl..

[Proto-Scripty] Object.extend equivelant

2009-11-07 Thread kstubs
The following is working, but I am looking for the pure prototypejs equivelant. So, what would the equivilant code be for var GymnastFind = Class.create(); Object.extend(Object.extend(GymnastFind.prototype, GridBuild.prototype)); Object.extend(Object.extend(GymnastFind.prototype,

[Proto-Scripty] Re: Some basic basic stuff

2009-11-07 Thread kstubs
Try naming the ID attribute different than the NAME attribute. On Nov 7, 12:49 pm, bill will...@techservsys.com wrote: Eugene Hourany wrote: Hi all, I'm tearing my hair out trying to figure out why I keep getting a element is null error. Here's what my code looks like:

[Proto-Scripty] Re: Object.extend equivelant

2009-11-08 Thread kstubs
as well, just include them as an object as a third parameter. [1]http://api.prototypejs.org/language/class.html HTH, -- T.J. Crowder Independent Software Consultant tj / crowder software / comwww.crowdersoftware.com On Nov 7, 6:21 pm, kstubs kst...@gmail.com wrote: The following

[Proto-Scripty] Re: Object.extend equivelant

2009-11-08 Thread kstubs
Independent Software Consultant tj / crowder software / comwww.crowdersoftware.com On Nov 7, 6:21 pm, kstubs kst...@gmail.com wrote: The following is working, but I am looking for the pure prototypejs equivelant.  So, what would the equivilant code be for var GymnastFind = Class.create

[Proto-Scripty] Re: Object.extend equivelant

2009-11-09 Thread kstubs
. :-) On Nov 9, 2:18 am, kstubs kst...@gmail.com wrote: If I do something like this: var GymnastFind = Class.create(GridBuild, Ajax.Application.Base.Prototype, UserState, {     HEAD: ['MSOID', 'USAG', 'Description', 'DOB'],     initialize: function(container, url) {         this.url

[Proto-Scripty] Ajax Request PDF to IFRAME

2010-02-08 Thread kstubs
I'm fetching (with Ajax call) a dynamic PDF from the server and would like the results to load into an Iframe (or other html embeded/ object). Is this possible? Karl.. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to

[Proto-Scripty] Re: Ajax Request PDF to IFRAME

2010-02-08 Thread kstubs
, at 23:34, kstubs wrote: I'm fetching (with Ajax call) a dynamic PDF from the server and would like the results to load  into an Iframe (or other html embeded/ object). Is this possible? You should be able to set the location or src of the iframe from an   Ajax call, which would

[Proto-Scripty] Re: Ajax Request PDF to IFRAME

2010-02-08 Thread kstubs
, of course. I use something similar with a frame (not an iframe), but the concept should be transferrable. HTH, -- T.J. Crowder Independent Software Consultant tj / crowder software / comwww.crowdersoftware.com On Feb 8, 10:34 pm, kstubs kst...@gmail.com wrote: I'm fetching (with Ajax

[Proto-Scripty] Safe Browser Resize

2010-02-09 Thread kstubs
I'm trying to write the following jquery sample code in prototype. I am stuck, and do not understand the following: http://noteslog.com/personal/projects/wresize/1.1/jquery.wresize.js this.each( function() { if ( this == window )

[Proto-Scripty] Re: Ajax Request PDF to IFRAME

2010-02-11 Thread kstubs
happy. (I wondered if I might need a defer in there, but apparently not.) HTH, -- T.J. Crowder Independent Software Consultant tj / crowder software / comwww.crowdersoftware.com On Feb 9, 12:03 am, kstubs kst...@gmail.com wrote: It must be a post to the server, not a get

[Proto-Scripty] Re: divide one long table into multiple 40 rows

2010-02-12 Thread kstubs
Indeed this is a discussion of architecture and design. In my case, on the backend my data layer takes a from and a limit and rips off the results and delivers to the client a json result. On the client, the user can page forwards, backwards, jump to pages, and even change the result limit to

[Proto-Scripty] new Element insert problem

2010-02-20 Thread kstubs
What is wrong with the following, the bad result is the new input elements are not contained by the new div element: Javascript: var div1 = div.insert(new Element('div', { 'class': 'new-section' })); div1.insert(new Element('input', { 'name': 'newsection-name-' + count, 'class': 'newsection-name

[Proto-Scripty] Re: new Element insert problem

2010-02-21 Thread kstubs
to     var div1 = new Element('div', { 'class': 'new-section' });     div.insert(div1); ...and the rest should work. HTH, -- T.J. Crowder Independent Software Consultant tj / crowder software / comwww.crowdersoftware.com On Feb 20, 6:24 pm, kstubs kst...@gmail.com wrote: What is wrong

[Proto-Scripty] Create OnMouseOver event for a div

2010-03-25 Thread kstubs
I'd like to add an event to a div on the page, the onMouseOver event. I need to add it after the page loads because that particular object should not be available for the first couple seconds, beside, and you can witness it here, thing seem to fire out of sequence and break the javascript code for

[Proto-Scripty] invoke method update

2010-08-25 Thread kstubs
I'd expect all div.out containers to be updated with the value testing, but just getting the first one. What is wrong with the following code? Expected: testing testing testing testing Actual: testing The code: ul libutton onclick=$

[Proto-Scripty] Re: invoke method update

2010-08-26 Thread kstubs
                div class=out out2                         ...                         /div                 /div         /div     -Original Message- From: prototype-scriptaculous@googlegroups.com [mailto:prototype-scriptacul...@googlegroups.com] On Behalf Of kstubs Sent: Wednesday

[Proto-Scripty] Object extend magic

2010-08-31 Thread kstubs
Hello, Full credit to: Matthew Foster for the code below. I'd like an explanation of the below. I'm having some troubles with Object extend and would like a better explanation of the magic that occurs below. $C = function(name, options) { return

[Proto-Scripty] Re: Object extend magic

2010-08-31 Thread kstubs
rquadl...@gmail.com wrote: On 31 August 2010 17:49, kstubs kst...@gmail.com wrote: Hello, Full credit to: Matthew Foster for the code below.  I'd like an explanation of the below.  I'm having some troubles with Object extend and would like a better explanation of the magic that occurs

[Proto-Scripty] Re: Object extend magic

2010-08-31 Thread kstubs
you desire? Thanks, Karl.. On Aug 31, 11:20 am, kstubs kst...@gmail.com wrote: Thanks Richard for your answer on this!  Question regarding this: Object.extend(..., options || {}) // Extend the object created about Is it necessary to || {} (empty object) so as to not break the Object.extend

[Proto-Scripty] Maintaining context in each enumeration

2010-09-01 Thread kstubs
I am losing the context of the row object parameter as in this example: 1. loadTable: function(row, itt) 2. { 3.this.HEAD.each(function(head, itt2) { 4. var cellNode = this.getCell(itt, itt2); 5. if(cellNode) 6. cellNode.innerHTML = row[head.text]; 7. }, this); 8. } On line

[Proto-Scripty] Re: Maintaining context in each enumeration

2010-09-04 Thread kstubs
2, 6:48 am, kstubs kst...@gmail.com wrote: I am losing the context of the row object parameter as in this example: 1.  loadTable: function(row, itt) 2.  { 3.    this.HEAD.each(function(head, itt2) { 4.     var cellNode = this.getCell(itt, itt2); 5.     if(cellNode) 6

[Proto-Scripty] Re: Maintaining context in each enumeration

2010-09-08 Thread kstubs
-- T.J. On Sep 4, 8:39 pm, kstubs kst...@gmail.com wrote: I mention line 4 because I am actually stepping through the code and on line 4, so after entering the #each, my row object goes missing. I don't understand it at all.  There must be something else wrong I guess.  Ugg

[Proto-Scripty] Scope in mixed modules and classes

2010-09-12 Thread kstubs
I'm extending a class with the below module. I'm expecting this.Session available to the class but it is not, it loses scope. Do I have to define this.Session in the original class? My class definition: var _sess = new Class.create(msoMeet, {}); Extending _sess:

[Proto-Scripty] Re: Scope in mixed modules and classes

2010-09-12 Thread kstubs
Never mind! A little confused, but none the less I solved the problem. I needed to bind the object like this: _sessionGrid.addEventListener('cellclick',_sess.show.bind(_sess)); On Sep 12, 11:18 am, kstubs kst...@gmail.com wrote: I'm extending a class with the below module.  I'm expecting

[Proto-Scripty] chain findall each

2010-09-16 Thread kstubs
How do you chain together findAll and each? I have a Json object which I would like to filter, and was thinking to findAll, followed by an each on the findAll results. What is the best approach? Thanks, Karl.. -- You received this message because you are subscribed to the Google Groups

[Proto-Scripty] Binding class method problem with this

2010-09-18 Thread kstubs
In my test class, I call show() method externally and then internally but the internal calls are not working when binding this. The expected console results for the following implementation: _test = new test(); _test.show('outer', 0); _test.hide('outer'); EXPECTED CONSOLE LOG: show:

[Proto-Scripty] Re: Binding class method problem with this

2010-09-19 Thread kstubs
= myObj.myMethod.bind(myobj);     $('someElement').observe('click', handler); [1]http://api.prototypejs.org/language/function/prototype/bind/ HTH, -- T.J. Crowder Independent Software Engineer tj / crowder software / com www / crowder software / com On Sep 18, 7:36 pm, kstubs kst...@gmail.com

[Proto-Scripty] Re: Binding class method problem with this

2010-09-19 Thread kstubs
is to set this.active = false; This document mouseover could occur in the 2 second delay. I am expecting that setting this.active = false will cancel expanding the banner. Does this clear things up? Karl.. On Sep 19, 4:33 pm, kstubs kst...@gmail.com wrote: My Challenge: I have a banner on my

[Proto-Scripty] Re: Binding class method problem with this

2010-09-19 Thread kstubs
body div input type='button' id='btnGo' value='Go'/ /div div id=out style=background-color:#ccc; padding:5px; border:#999 /div /body /html On Sep 19, 6:12 pm, kstubs kst...@gmail.com wrote: Does it mean:  if I am using a member variable (ie., this.active = false

[Proto-Scripty] Re: Binding class method problem with this

2010-09-20 Thread kstubs
). Here's an example that uses the handle returned by Function#delay instead:http://jsbin.com/asefu4/2 HTH, -- T.J. Crowder Independent Software Engineer tj / crowder software / com www / crowder software / com On Sep 20, 2:12 am, kstubs kst...@gmail.com wrote: Does it mean:  if I am

[Proto-Scripty] Re: Binding class method problem with this

2010-09-20 Thread kstubs
Back to happy. All is working. Thanks again TJ, and I love when things work as expected! I have been pulling my hair out all weekend! Karl.. On Sep 19, 11:25 pm, kstubs kst...@gmail.com wrote: Oh my gosh!  OK, I never considered that bind() returns a function. Wow... that changes everything

[Proto-Scripty] Re: Prototype - Close div when click off?

2010-09-20 Thread kstubs
TJ, you inadvertently disabled Edit using JS Bin for this example :) Who is JS Bin, is that yours? Very cool. On Sep 20, 5:12 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi, Not entirely sure what you're trying to do, but this will fail:     $(document.body).descendants().observe    

[Proto-Scripty] IE Issues

2010-09-21 Thread kstubs
Anyone care to look at this page: http://www.meetscoresonline.com/results.aspx?tax=1meetid=11590 On the left is the navigation bar (in blue): - show all S - show session L - show level D - show division On rollover the navigation bar expands, but the problem is the icons shift with the

[Proto-Scripty] Re: IE Issues

2010-09-21 Thread kstubs
OK, I've been through and cleaned up a number of the issues. If the remaining issues seem to be the culprit to such miss behaviors in IE, please let me know. Otherwise, I'm going to assume that the issues are related to unsupported (or miss-supported) CSS in IE. Any help would be great! Karl..

[Proto-Scripty] Re: IE Issues

2010-09-21 Thread kstubs
rolled over and ignoring h2 items but I'd like to report this as a possible bug before fixing. Karl.. On Sep 21, 8:13 pm, kstubs kst...@gmail.com wrote: OK, I've been through and cleaned up a number of the issues.  If the remaining issues seem to be the culprit to such miss behaviors in IE

[Proto-Scripty] Google Compiler warnings: dangerous use of the global this object

2010-11-24 Thread kstubs
I'm interested in compiling prototype and scriptaculous library with Google Compiler. I get lots of warnings dangerous use of the global this object when compiling level = ADVANCED_OPTIMIZATIONS. Ignoring the warnings, my code no longer runs correctly. Any ideas? -- You received this message

[Proto-Scripty] Re: Google Compiler warnings: dangerous use of the global this object

2010-11-26 Thread kstubs
script.aculo.us, and you could combine the result into a single file to minimize HTTP requests. FWIW. -- T.J. Crowder Independent Software Engineer tj / crowder software / com www / crowder software / com On Nov 24, 7:40 pm, kstubs kst...@gmail.com wrote: I'm interested in compiling

[Proto-Scripty] Selector onchange

2010-12-20 Thread kstubs
What am I doing wrong? I have a selector and want to fire an event when the selection is changed. I thought this was a walk in the park but the darn thing isn't firing! In a dom:loaded event function I have: $('pagePageSelector').observe('onchange', function(event) { alert('ding'); });

[Proto-Scripty] Re: Selector onchange

2010-12-20 Thread kstubs
Nevermind, needed event name to be change, not onchange. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to

Re: [Proto-Scripty] Selector onchange

2010-12-20 Thread kstubs
Yes, got it, thanks David. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to

[Proto-Scripty] Observe form submit which button clicked?

2010-12-22 Thread kstubs
I have an event to observe a form submit like this: Event.observe('paging', 'submit', _msoS.handlePagingSubmit.bindAsEventListener(_msoS)); Well on my form there are a number of submit buttons that can be clicked to cause a submit, and I realize that a form can be submitted with the enter key

Re: [Proto-Scripty] Observe form submit which button clicked?

2010-12-22 Thread kstubs
OK, just observing click event for the submit button is working fine. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group,

[Proto-Scripty] Behavioral of select option

2010-12-22 Thread kstubs
I have a select option, in HTML It is empty like this: select id=myselect name=selectoroption//select After page load I make ajax request and finish loading the selector with additional option(s). So I might have: select id=myselect name=selector option1/option option2/option

[Proto-Scripty] Re: Behavioral of select option

2010-12-23 Thread kstubs
Chris, the selector is valid, I have an input with a class=previous within a form container id=paging Colin, after the select option list is dynamically constructed I set the first item in the list like this: pagePageSelector.options.selectedIndex = (currentpage - 1); I've stepped through the

[Proto-Scripty] Re: Observe form submit which button clicked?

2010-12-23 Thread kstubs
T.J., Duhh! Thanks for pointing out the obvious. I was stuck on observing submit. Now, I've tested your page in Chrome and FF, but doesn't seem to be working, instead I am taken straight to Google. -- You received this message because you are subscribed to the Google Groups Prototype

[Proto-Scripty] Passing context

2010-12-24 Thread kstubs
OK, I'm confused. I'm observing a custom event MeetQuery:lookup_scores which is working fine (not the problem as I can see) and I need to call _msoSGrid.load in the context of _msoSGrid. As is, the context of this in the load event is Window; it should be _msoSGrid. ** below code set on

[Proto-Scripty] Re: Passing context

2010-12-24 Thread kstubs
Surrounding code and NOTE, this code: _msoS.Get(meetid), it's ajax response, triggers the event MeetQuery:lookup_scores. document.observe('dom:loaded', function() { var meetid = $('MEET_ID').innerHTML; _msoAM = new msoActiveMeets(); _msoRE = new msoRecentEvents(); _msoS = new

[Proto-Scripty] Re: Passing context

2010-12-26 Thread kstubs
T.J. I've moved on from this but shall return. I'm having a similar problem with bindAsEventListener, I have the following: document.observe('MeetQuery:lookup_scores', _msoRSess.appear.bindAsEventListener(_msoRSess, $('SCORES').down.bind('div.grid table')); Where the 2nd argument in

[Proto-Scripty] Re: Passing context

2010-12-26 Thread kstubs
This works by the way: document.observe('MeetQuery:lookup_scores', function(event) { _msoRSess.appear($('SCORES').down('div.grid table')); }); I'm confused, since this is similar, minus the bindAsEventListener. -- You received this message because you are subscribed to the Google Groups

[Proto-Scripty] How to observe pure xmlHttpRequest response

2010-12-28 Thread kstubs
I'd like to observe pure XmlHttpRequest, in other words, an Ajax request made by code not written for prototype.js. Is this possible? Ultimately, I am working with an existing .NET web application and I'd like to add additional features to the resulting client side script without busting open

[Proto-Scripty] Re: click on a frame

2010-12-29 Thread kstubs
I am hooking into a frame event, this is what I am doing: 1) after main frame loaded, use setTimeout technique to observe child frame head element ready 2) inject prototype code into header 3) register click event for this frame NOTE BELOW: I need help with the bindAsEventListener statement,

[Proto-Scripty] Encoding parameters in Ajax Request

2011-01-01 Thread kstubs
I'm passing a parameter string to parameter: of the Ajax.Request object. My string looks like: stamp=1293946016965LookupIndex=1p_meetid=10066p_session=5p_division=Sr+16%2bp_level=8page=1limit=50query_name=lookup_scores See: p_division=Sr+16%2b (this is correct at this point) When I examine

[Proto-Scripty] Re: Encoding parameters in Ajax Request

2011-01-02 Thread kstubs
Hi TJ, I've spent this morning walking through the code and have determined that prototype indeed calls the toQueryString() function when the original parameter is passed as type string. For reference I'm here in the prototype code: Ajax.Base = Class.create({ initialize:

[Proto-Scripty] Re: Encoding parameters in Ajax Request

2011-01-03 Thread kstubs
Hey, I'll try that! Didn't see the 1.7 announcement. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to

[Proto-Scripty] Re: Encoding parameters in Ajax Request

2011-01-03 Thread kstubs
OK, testing 1.7 and am finding that my encoded parameter is being decoded with decodeURIComponent in toQueryParms: function toQueryParams(separator) { var match = this.strip().match(/([^?#]*)(#.*)?$/); if (!match) return { }; return match[1].split(separator || '').inject({ },

[Proto-Scripty] Re: Encoding parameters in Ajax Request

2011-01-03 Thread kstubs
Follow up: walking through the code, where my value is decoded to: Sr+16+, if I update (fix) the value back to Sr+16%2b and then send the request through, when I look at the Post values in the Console the value becomes: Sr 16+. I'm not sure when the value becomes this, and this doesn't work,

[Proto-Scripty] Re: Encoding parameters in Ajax Request

2011-01-04 Thread kstubs
Hey TJ, I have walked Ajax#Request as you have and concur with your findings. On the backend is C#. The code is encoded like this: string val = System.Web.HttpUtility.UrlEncode(dr[m.GetAttribute(encode)].ToString().TrimEnd()); w.WriteAttributeString(m.GetAttribute(name).ToString(),

[Proto-Scripty] New Element code

2011-02-19 Thread kstubs
I'm looking for something cleaner than what I have pasted below, which works fine but I don't feel like I'm taking advantage of Prototype magic, or maybe object inheritance or something. Please offer a suggestion to improve the below. End Result: Div container with unhandled error message,

[Proto-Scripty] Re: New Element code

2011-02-20 Thread kstubs
Thanks T.J., very helpful. My final implementation is this: catch(e) { document.fire('MSO:error', {ID: 'errorEventReg', Routine:'pageReadyEvent', JSFile: 'Event.Registration.js', Message:e.message}); } This works nicely since the host page now can subscribe to to MSO:error event. I'm

[Proto-Scripty] Re: New Element code

2011-02-20 Thread kstubs
T.J., one question for: div = $(#errordlg); if (div) { // Paranoia div.remove(); I don't recognize this syntax: $(#errordlg); This is different than (what I would typically write): $('errordlg'); What am I missing? -- You received this message because you are subscribed to the

Re: [Proto-Scripty] Re: New Element code

2011-02-20 Thread kstubs
Well quite directly, is this illegal syntax: var div = $('#errordlg'); Should it have been: var divs = $$('#errodlg'); Which I understand, collect all elements who's ID is errordlg... -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us

Re: [Proto-Scripty] Re: New Element code

2011-02-20 Thread kstubs
Got it! Wasn't sure if that was syntactical sugar or not.. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to

[Proto-Scripty] Delay function fails element.GetElementsByTagName is not a function

2011-02-28 Thread kstubs
I'm getting the error element.GetElementsByTagName is not a function when using the delay function like this: $('test').update.delay(3,'update text'); Am I doing something wrong? Karl.. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us

[Proto-Scripty] Testing with IE Tester

2011-02-28 Thread kstubs
Anyone using IE Tester to test their code? I'm not having any luck with it, first of all doesn't seem to support the dom:loaded event. Maybe I should be more persistent with this utility; let me know if you have good/bad success with this utility. Thanks, Karl.. The site:

Re: [Proto-Scripty] Testing with IE Tester

2011-02-28 Thread kstubs
Just took a peek at my analytics and 48% of all traffic is IE, and here is the breakdown of IE versions, where 78% is version 8.0, so that is good: 1.

[Proto-Scripty] Closure compiler externs for prototype.js

2011-03-06 Thread kstubs
Has anyone written externs for Google's closure compiler? I'm attempting to do so now, but not sure I'm doing it correctly. For example, I have written the following externs for the compiler, and does this look correct? // externs var document = { observe: function (eventName, handler) {

[Proto-Scripty] Cufon fonts

2011-03-12 Thread kstubs
Anyone using Cufon font technique in their web projects? Any issues with it or or the javacript and prototype? Has anyone wrote a prototype extension for cufon (well, ported the code over to prototype)? Karl.. -- You received this message because you are subscribed to the Google Groups

[Proto-Scripty] Observe a click event

2011-03-26 Thread kstubs
I am making an element like this: var a_next = new Element('a', {'Id': 'nav_slider_next', 'href':'#', 'class':'next'}).update('img src=/images/transparent.gif/'); I am observing the click like this: a_next.observe('click', this.__navigate.bindAsEventListener(this)); In my __navigate routine,

[Proto-Scripty] Re: Observe a click event

2011-03-26 Thread kstubs
Thinking the update on the end of new Element() was causing an issue I've changed my script to: var a_next = new Element('a', {'id': 'nav_slider_next', 'href':'#', 'class':'next'}); a_next.insert('img src=/images/transparent.gif/'); I'm still not have any luck with a click of the a tag, it

[Proto-Scripty] Generating invalid HTML for purpose of custom attributes

2011-03-26 Thread kstubs
Is it bad, or does it make parsing objects unstable if you append custom attributes to an HTML tag? Lets say I want to keep track of a number, maybe a customers ID, so I do something like: var div = new Element('div', {'customerID':1234}); which should result in: div customerID=1234/div

Re: [Proto-Scripty] Generating invalid HTML for purpose of custom attributes

2011-03-26 Thread kstubs
Data prefix? -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to

[Proto-Scripty] Re: Generating invalid HTML for purpose of custom attributes

2011-03-27 Thread kstubs
Perfect, thanks! -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to

[Proto-Scripty] parent subclasses undefined

2011-03-29 Thread kstubs
Hi, I'm trying to create a new class with an existing superclass but am getting the error: parent.subclasses is undefined What does this mean? Karl.. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send

[Proto-Scripty] Help with xml attributes in json object

2011-03-29 Thread kstubs
I'm getting json back from an ajax request looking something like: {@attributes:{id:Detail_full_id,name:Detail_full,threshold:rawdata2},point:[{@attributes:{fecha:23-MAR-11,codigo:23,provincia:Jaen,cantpedsterm:5,cantlineasser:151,cantuniser: ... I'm having trouble in javascript writing the

[Proto-Scripty] Re: Help with xml attributes in json object

2011-04-02 Thread kstubs
Good to know. Thanks. -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to

[Proto-Scripty] Parse html

2011-04-02 Thread kstubs
I have a simple Ajax.Request that fetches an html page from my site. I'd like to parse the html, preferably I'd like to use prototype selectors to get at specific elements and content. Is this possible? Karl.. -- You received this message because you are subscribed to the Google Groups

[Proto-Scripty] Fade effect to 80% fades 100% black first

2011-04-03 Thread kstubs
Can someone tell me why this fades 100% black first then snaps back to 80% fade? Click on any link at bottom of the page: http://beta.meetscoresonline.com/ -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group,

[Proto-Scripty] Re: Parse html

2011-04-03 Thread kstubs
I now have a simple Ajax.Request that fetches json. I thought a little nifty trick is to add mime type .json and serve back application/json. Nice! So now, if I just want static content for my rich client pages I can drop a little json on the server like this:

[Proto-Scripty] Re: Parse html

2011-04-04 Thread kstubs
Thanks for the reply Alphonso. I have almost completely abandoned Xml manipulation on the client-side now. I was only thinking of parsing the HTML as a way to reuse an info page that I have created as static HTML. Well, I'm back to JSON. Loving JSON on the client-side, but wish I was more

Re: [Proto-Scripty] Re: Parse html

2011-04-04 Thread kstubs
I write my own JSON on the backend. I use JSON.net if I need a JSON writer for code in C#. I just developed an object in PHP that sends JSON down the pipe to a requesting page. At first I was using the built-in json_encode function from a SimpleXmlElement but eventually I wrote my own as I

[Proto-Scripty] Scope of variables when bindAsEventListener and Ajax Request

2011-04-16 Thread kstubs
In the following, assuming jsonDataM is defined top of my script (so scope of this variable should be good): mapqueryform.observe('submit', fetchData.bindAsEventListener(mapqueryform, jsonDataM)); fetchData routine make an ajax request, passes along jsonDataM to the handler routine, at which

[Proto-Scripty] Re: Scope of variables when bindAsEventListener and Ajax Request

2011-04-18 Thread kstubs
Thanks, and no apologies necessary for the *complete* response! Why global variables? This is a mixture of good code and bad code, so a hack together. I'm tending to develop more and more with objects now (thanks to Prototype) in my client-side code. I'm big on event driven code methods,

[Proto-Scripty] Parse URL into parts

2011-04-20 Thread kstubs
I need to parse URL into parts, including domain, folders, page name, and querystring. I'd like a nice object to work with when parsed. Any suggestions to existing code out there? -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group.

[Proto-Scripty] Problem filtering list

2011-04-26 Thread kstubs
The following is not working, even though I am certain it should. I initialize each self.resultsFilter property to null, so in this case, the desired result is to return *all* from the original listResults. Am I doing something wrong here? var list =

[Proto-Scripty] Re: Problem filtering list

2011-04-26 Thread kstubs
This works: // filter results var list = this.listResults.result.row.select(function(row) { return (row.sess == self.resultsFilter.session || self.resultsFilter.session == null) (row.level == self.resultsFilter.level ||

[Proto-Scripty] Re: FInd and iterate over ProcessingInstruction nodes?

2011-04-27 Thread kstubs
Probably your best best is REGEX result = subject.match(/\?[a-zA-Z0-9 :;]*\?/img); result is an array of matches. So, result[0], result[1], and so on... -- You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send

  1   2   3   >