[Proto-Scripty] Re: Does $A('.classname').invoke('setValue',...) work on checkboxes?

2009-11-12 Thread Szymon Wilkołazki
joe t. wrote: i agree on that. setValue has its purpose pretty much in the name. Set the value of a control. For checkboxes, setChecked (bool) (also applying to radios?) would have made a lot more sense. Yes, it does apply to radios to. It's a shame that the docs aren't clear on this

[Proto-Scripty] Does $A('.classname').invoke('setValue',...) work on checkboxes?

2009-11-10 Thread Szymon Wilkołazki
Hi, I just bumped into a weird bug in my code. The thing is, that I am trying to update value of several checkboxes with a value received in a result of ajax call. Anyway, I have following construction: input name=someName class=APP_CHANGELOG_LOG_ID value= type=checkbox/ The checkboxes are

[Proto-Scripty] Re: Does $A('.classname').invoke('setValue',...) work on checkboxes?

2009-11-10 Thread Szymon Wilkołazki
Hi, I found where is the problem. I assumed, that the Form.Element.setValue method sets the value of an element. In case of checkboxes that is not true. The method changes the state of checked/unchecked instead, and leaves the value attribute unchanged. The example might be found here:

[Proto-Scripty] Re: YSlow's rule JavaScript at the bottom w/Prototype

2009-09-17 Thread Szymon Wilkołazki
skaiuoquer pisze: disccomp, Richard, Alex; thanks for your replies. The problem with minified compressed versions is that they will never get cached on the client side. I mean, they will, but you will still be sending them each one of the different combinations--so instead of loading

[Proto-Scripty] Re: Prototype and Xhtml validation

2009-09-14 Thread Szymon Wilkołazki
Alex McAuley pisze: I am not trying to validate javascript with the validator lol... My page includes it .. and having src=. is bad coding practise due to parralell downloads ... i munge all the javascript together into one script and compress it all before output - this is not the

[Proto-Scripty] Re: Client side searching

2009-07-06 Thread Szymon Wilkołazki
Jeztah wrote: Good morning I have a site that can be heavy server load and decided to try and take out some filtering on a page.. Example. I have a page with a table of search results and would like to be able to put client side searching (ala Crtl+f on firefox) What i would

[Proto-Scripty] escapeHTML incomplete?

2009-06-24 Thread Szymon Wilkołazki
Hi, I just tried to put a json object inside an attribute an I bumped into an issue with String#escapeHTML(). The method does escape all the ampersands and the greater/less than signs, but it does nothing to the quots. This make the method completely unusable for writing attributes (for

[Proto-Scripty] Re: escapeHTML incomplete?

2009-06-24 Thread Szymon Wilkołazki
T.J. Crowder wrote: Hi, String#escapeHTML escapes HTML. Double quotes, single quotes, and newlines are all valid in HTML, so IMHO it's out of scope for escapeHTML to escape them. FWIW, I'd say the requirement you're describing is specific enough to you that you should probably just add

[Proto-Scripty] Re: Doctypes

2009-06-16 Thread Szymon Wilkołazki
Chris Sansom wrote: I'm curious about the recent discussion that's arisen as a sideline from the 'Creating new lines and bypassing them through escapeHTML' thread. I've been using Prototype for a little while now (though not Scriptaculous - yet!). I'm not by any stretch of the

[Proto-Scripty] Re: HTML breaks JSON

2009-06-05 Thread Szymon Wilkołazki
Matt wrote: Hi Alex, Still didn't work for me :( Just produced broken HTML output again. If your html code is not broken on inside of php variable, then it won't break anything inside json_encode; [code] ?php $html = ' div id=someIdthis is correct html span

[Proto-Scripty] Re: Last table row

2009-06-05 Thread Szymon Wilkołazki
Jeztah wrote: Morning... Very silly and easy question but my brain isn't working today How can i get the last row of a table (table id=foo) ... The row is inserted dynamically via an ajax request so its not on the page at load time!. $('foo').select('tr:last'); Unlike jQuery,

[Proto-Scripty] Re: Create event observer for focus?

2009-05-22 Thread Szymon Wilkołazki
louis w wrote: This is what I ended up doing: if (_is_ie) { // IE Only focus/blur event listeners f.observe('focusin', this.onFocus.bind(this));

[Proto-Scripty] Re: builder does not work

2009-05-19 Thread Szymon Wilkołazki
ioustinos wrote: I have been using scriptaculous in one application of mine. Everything runs smoothly. Then i added the builder.js and changed the inclusion line into this script type=text/javascript src=js/scriptaculous.js? load=effects,dragdrop,controls,builder/script Just a guess, but

[Proto-Scripty] Re: document.viewport.getDimensions() not working

2009-05-06 Thread Szymon Wilkołazki
Bertrand wrote: Thanks for your kind answer, it did help a lot. It should help, as it tells you are looking for the problem in wrong place. Try to look for the problem in your own code and not blame prototype.js when you're not sure. I think the problem you might have is the lack of DOCTYPE

[Proto-Scripty] Re: $(dialog_1) is null by firebug

2009-04-15 Thread Szymon Wilkołazki
SamuelXiao wrote: I am writing an application using prototype.js and dialog.2.0.js (http://roland.devarea.nl/dialog/#e6) the iframe effect. But I encountered a problem when I try to fitting it into my application. What I want to do is that when a user click a href=# id=dialog_1Show Iframe/a

[Proto-Scripty] Re: Named functions in onComplete not waiting for completion

2009-04-15 Thread Szymon Wilkołazki
Diodeus wrote: [...] In another situation, I need to pass parameters to the callback. So would I do it this way? var temp = handleCompletion(5) wrapAjaxUpdater('showsomething.php?id=5', 'somediv', temp); That still is not correct. This would assign the *result* of the handleCompletion

[Proto-Scripty] Re: show hidden div if js is disabled

2009-04-10 Thread Szymon Wilkołazki
swdean wrote: I am quite new to coding and I am trying to show div in case js is disabled the reason is because I set it to display: none You should do it completely otherwise. Show div always, and hide it if javascript is enabled. div class=hideOnLoad /div script type=text/javascript

[Proto-Scripty] Re: show hidden div if js is disabled

2009-04-10 Thread Szymon Wilkołazki
swdean wrote: Hey thank you guys I am gonna do a bit more homework on this Thanks for the tips for now! :) You should read about the techniques of progresive enhancement and unobtrusive javascriot. The first one stays, that a website should be one hundred percent usable without any

[Proto-Scripty] Re: Associative arrays vs hash

2009-04-02 Thread Szymon Wilkołazki
Diodeus wrote: I'm building the following array: var ax = [] ax['aaa'] = 1 ax['aab'] = 2 ax['aac'] = 4 ax['aad'] = 6 I would like to loop though all of the values in this array. [...] What am I doing wrong here? You use an Array while you should use either Hash, or plain

[Proto-Scripty] Re: Ajax.Updater home-brew autocompletion timing issue

2009-03-20 Thread Szymon Wilkołazki
Matt Foster wrote: [...] To address the wrong order issue, you could create a queue of requests such that each request is asynchronous but stacked such that it will not be sent until the previous request has returned. I've written something for this for prototype 1.5 as Ajax.RequestQueue

[Proto-Scripty] Re: Shrinking JS

2009-03-20 Thread Szymon Wilkołazki
2009/3/20 Jeztah webmas...@thecarmarketplace.com: After a little playing ove the last couple of days i came up with a nice easy way of shrinking many js files on the fly into 1 file ... this will speed up load time heavily on heavy javascript loaded sites . the code is php and is very

[Proto-Scripty] Changes in getStyle() between 1.6.0.2 and trunk?

2009-03-17 Thread Szymon Wilkołazki
Hi, We had used a patched 1.6.0.2 prototype version for some time now. I had little time to upgrade to 1.6.0.3, cause I needed to patch and test the patched version before using it. I decided to do it now. The only thing I patched was getDimensions() method, as I didn't know at the time that

[Proto-Scripty] Re: element.fire problem, firing custom event

2009-03-13 Thread Szymon Wilkołazki
Hey, input onclick=firePrototypeEvent(document.getElementById ('example5'),'event_2'); value=fire event_2 type=buttonbr You can only fire custom event that is namespaced, that is: contains a prefix and : sing. Eg. 'myEvents:event_2'. You also need to specify the prefix when observing.

[Proto-Scripty] Re: Scrolling Tables

2009-03-12 Thread Szymon Wilkołazki
Lee Jenkins wrote: Hi all, I'm trying to implement a scrolling table myself since my needs are very simple. I'm placing the table that represents the grid cells within a div with overflow:auto set and it scrolls. However, IE and FF seem to calculate the width differently in

[Proto-Scripty] Re: Download page via prototype. with making all scripts on page. Help with code.

2009-03-12 Thread Szymon Wilkołazki
kevin wrote: i just wanted to download page. page has script tags. download page with result of this script. i've made it. but there is a problem. i can't do that from my subdomain. only on MY domain. how can i break it? You can't. This is a security limitation of browsers. You can read

[Proto-Scripty] Re: Ajax.Request and php global variable

2009-03-03 Thread Szymon Wilkołazki
Alex Mcauley wrote: global how .. that doesnt really explain much If you mean globaly accessible to javascript then you need to do something like ?php $bar='bar'; echo(scriptfoo=$bar/script); ? marioosh, you also need to properly quote strings, or convert php variables to

[Proto-Scripty] Re: Ajax.Request and php global variable

2009-03-03 Thread Szymon Wilkołazki
marioosh wrote: Explaining [sorry for my english ;)]: I need $var that is object of some class, and $var will point to the same object in test1.php, test2.php, test3.php ... where: test1.php, test2.php ... are scripts that will be used in new Ajax.Request(... I need something like

[Proto-Scripty] Re: Ajax.Request and php global variable

2009-03-03 Thread Szymon Wilkołazki
Alex Mcauley pisze: Quoting does not allways matter when setting javascript vars ... Plus not every version of php has json_encode() installed on it Yeah, your right. To much of intranet coding, when you know exactly what you have on server, and if there's something you need and it's not