On May 10, 5:16 am, kstubs wrote:
> Ok, yep cool, nice demo!
> So the select() is easy enough, but what about: selecting the word "gently"
> in a textarea? So you might have:
>
> row row row your boat gently down the stream
It's not specific to Prototype, but you might find Rangy useful:
http
Ok, yep cool, nice demo!
So the select() is easy enough, but what about: selecting the word "gently"
in a textarea? So you might have:
row row row your boat gently down the stream
--
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" gro
Selecting all text in a textarea is as simple as $
('theIdOfTheBox').select();
I have written an example that works with any text on the page,
inspired by the New York Times' definition widget.
http://scripty.walterdavisstudio.com/lookup
Walter
On May 9, 2011, at 10:33 PM, kstubs wrote:
C
Can anyone recommend code or library that helps with making text selections?
For example, selecting all text in a texarea? Does Prototype help with
this at all?
Karl..
--
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post t
Ahhh, I found the issue. My page was including mootools automatically
(it's a Joomla template). That was preventing my elements from being
extended properly. Thanks
On May 9, 11:16 am, "T.J. Crowder" wrote:
> Hi,
>
> That's strange, if you're getting the element from $(), it should
> already b
To boil it down to the essentials, the following statement is failing
with 'Object doesn't support this property or method'. 'root' is a UL
element:
$('root').hasClassName("level");
On May 9, 11:16 am, "T.J. Crowder" wrote:
> Hi,
>
> That's strange, if you're getting the element from $(), it s
This page is still really invalid. For example, there is a close body
tag, but no open body tag. It works fine in Safari, but that's just
Safari being kind, I think.
Also, each of your form elements that you're sorting has a mis-match
between name and id attributes, and that's another thing
Thanks for your reply.
Yeah, I'm using IE8's crappy debugger; I can see the this.element
exists and the methods on it - they're the standard methods. It is
really strange.
Well, if anything else occurs please let me know.
--
You received this message because you are subscribed to the Google Grou
Okay. So the Self-contained test you provided works just fine in IE7.
here's mine:
http://test.tpionline.com/Audrey/TPI_new_platform/dynamic_invoicing/test.php
It still fails in IE7 to allow the first element to be reordered. Still not
sure what's going on with it. I appreciate all the help!
Tha
Hi,
That's strange, if you're getting the element from $(), it should
already be extended (and if not, explicitly extending it should work).
My only thought is that for some reason, the element lookup isn't
working at all and so it's not that it's not extended, but that the
element isn't there. T
My script is throwing an error on 'this.element.hasClassName()' in IE
(only, Chrome works fine). Debugging, I see that the method is not
present on the element. I gather that this is because the element is
not automatically Extended. I put the line
'Element.extend(this.element)' before it in the s
I ran into this recently - I thought that in the past it had been
recursive.
But, the code I see looks like:
cleanWhitespace: function(element) {
element = $(element);
var node = element.firstChild;
while (node) {
var nextNode = node.nextSibling;
if (node.nodeType == 3 &
Fruit of my labors:
http://beta.meetscoresonline.com/results/11827
Now the results grid should populate on initial load of the page, so that is
a bug (works locally, of course). To get it to populate, you just need to
drop down a navigation selection.
Currently working well on FF.
TJ., the li
Hi,
> Hey, what stops me from this:
Nothing at all (since `Array#sort` operates on the array in place, but
does return the array reference as a return value as well). Well,
nothing other than the missing "e" on `reverse`. ;-)
Note that if you do that, `list` will be an `Array`, regardless of
wha
Hey, what stops me from this:
list = list.sortBy(function(s) {
if(field.field.startsWith('EventScore') || field.field ==
'AAScore')
return Number(Object.values(s)[index]);
else
return Object.values(s)[index];
It does! OK, so I had this:
var copylist = list;
list = new Array();
for(i = copylist.size(); i>0; i--) {
list.push(copylist[i - 1]);
}
No I have this:
list = list.reverse();
Works!
Thanks,
Karl.
Hi,
On May 9, 9:27 am, kstubs wrote:
> OK TJ, I understand what to do, but is there a way to iterate backwards
> through the enumeration? I guess I can get the size, and iterate over it
> with a decremental index value.
I'd use `Enumerable#toArray` and then either reverse it or loop
through it
OK TJ, I understand what to do, but is there a way to iterate backwards
through the enumeration? I guess I can get the size, and iterate over it
with a decremental index value.
--
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To
Hi,
So to answer your questions that were asked at first :
- To sort descending an Array :
- You sort it with the JS native function sort()
- You use sortBy and return "-your_array.indexOf(current_element)"
- To sort alphanumeric fields :
- It's already done by the sort function, but if you
Hi,
Sorry, I gave you a bum steer there. `sortBy` works completely
differently from `sort`. Apparently, you only get given one element
(and its index, as a second parameter the documentation doesn't
mention, perhaps it's not explicitly supported) and you're meant to
return some piece of informatio
Thanks Crowder. The latest version has solved my problem [?]
On Mon, May 9, 2011 at 12:31 PM, T.J. Crowder wrote:
> Hi,
>
> OMG. Out of curiousity, I looked at the prototype.js file you
> referenced in that file; wow was I in for a shock: You're using
> Prototype 1.3.1?!?!?!!
>
> That version was
Hello,
Have you tried to return with a minus operand to reverse the order ?
Regards,
Julien.
On May 9, 9:46 am, kstubs wrote:
> Thanks for the tips. Since my posting I discovered sortBy(). So I'm close,
> but don't see how/where to pass in the 2nd argument to compare. I have:
>
> list = list
Thanks for the tips. Since my posting I discovered sortBy(). So I'm close,
but don't see how/where to pass in the 2nd argument to compare. I have:
list = list.sortBy(function(s) {
if(field.field.startsWith('EventScore') || field.field ==
'AAScore')
return N
On May 9, 3:40 am, kstubs wrote:
> How do you sort descending? Also, how do you distinguish between Alpha,
> Alpha-numeric, and Numeric sorts?
>
> Thanks, loving the methods like sort() and uniq() off enumerable?
>
> Karl..
`Enumerable` doesn't have a `sort` function. `Array` does, it's part
of
Hi,
OMG. Out of curiousity, I looked at the prototype.js file you
referenced in that file; wow was I in for a shock: You're using
Prototype 1.3.1?!?!?!!
That version was superceded more than SIX YEARS AGO. I don't actually
know when, because the Prototype changelog doesn't go back that far,
but w
25 matches
Mail list logo